mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
factory. Moved few stand-alone tests from Test/ to this framework. In Test: 2005-09-01 Sureshkumar T <[email protected]> * ProviderTests: Added a new framework for testing Data Providers. This framework is based on nunit category tests and also the provider factory provided by Mono.Data. In Test/System.Data.SqlClient: 2005-09-01 Sureshkumar T <[email protected]> * SqlDataReaderTest.cs: moved to ProviderTests and integrated with connected mode tests * SqlCommandTest.cs: -- do -- * SqlConnectionTest.cs: -- do -- * SqlTransactionTest.cs: -- do -- * SqlDataAdapterTest.cs: -- do -- In Test/System.Data.Odbc: 2005-09-01 Sureshkumar T <[email protected]> * OdbcDataAdapterTest.cs: moved to ProviderTests and integrated with connected more framework. * OdbcCommandTest.cs: -- do --. * OdbcParameterCollectionTest.cs: Removed ParameterLengthTrimTest to ProviderTests. In Test/ProviderTests/sql: 2005-09-01 Sureshkumar T <[email protected]> * SCHEMA: schema specification. * sqlserver.sql: sql script file to create test schema for mssql database. added. * mysql.sql: sql script file to create test schema for mysql database. added. In Test/ProviderTests/System.Data.Odbc: 2005-09-01 Sureshkumar T <[email protected]> * OdbcCommandBuilderTest.cs: Added tests for OdbcCommandBuilder.cs * OdbcCommandTest.cs: pulled from Test/System.Data.Odbc * OdbcDataAdapterTest.cs: pulled from Test/System.Data.Odbc * OdbcDataReaderTest.cs: pulled from Test/System.Data.Odbc * OdbcParameterCollectionTest.cs: pulled from Test/System.Data.Odbc In Test/ProviderTests/ProviderIndependant: 2005-09-01 Sureshkumar T <[email protected]> * IDbCommandTest.cs: Added. Provider independent Command tests. * DataReaderTest.cs: Added. Provider independent DataReader tests. In Test/ProviderTests: 2005-09-01 Sureshkumar T <[email protected]> * System.Data.Connected.Tests.dll.sources: source files. * app-default.config: * app-net_2_0.config: configuration files for profiles and lists the assembly informations for the Provider factory. * odbc.config: * sqlserver.config: connection string info for respective databases. * README: initial. pulled connected mode test-cases around Test/* directory into this new framework. This framework is based on nunit category based test-cases and uses Provider Factories provided in Mono.Data.dll to write provider independent code. In Test/ProviderTests/Common: 2005-09-01 Sureshkumar T <[email protected]> * DBHelper.cs: Added. Class to provide helper methods for other tests. * ConnectionManager.cs: Added. Class to manage connections In Test/ProviderTests/System.Data.SqlClient: 2005-09-01 Sureshkumar T <[email protected]> * SqlCommandBuilderTest.cs: added tests for SqlCommandBuilder * SqlCommandTest.cs: pulled from Test/System.Data.SqlClient * SqlConnectionStringBuilderTest.cs: pulled from Test/System.Data.SqlClient * SqlConnectionTest.cs: pulled from Test/System.Data.SqlClient * SqlDataAdapterTest.cs: pulled from Test/System.Data.SqlClient * SqlDataReaderTest.cs: pulled from Test/System.Data.SqlClient * SqlTransactionTest.cs: pulled from Test/System.Data.SqlClient Added attribute Category ("sqlserver") to all these test fixtures. svn path=/trunk/mcs/; revision=49260
99 lines
3.3 KiB
Plaintext
99 lines
3.3 KiB
Plaintext
RUN
|
|
===
|
|
|
|
Do this Once before running tests
|
|
---------------------------------
|
|
* edit the connection string (app setting entry "ConnString")
|
|
- if you want to run odbc test cases, edit odbc.config
|
|
and edit the entry with "ConnString" with appropriate
|
|
DSN, User Id and Password.
|
|
|
|
* run the sql schema and test pool data under directory sql to
|
|
the respective databases, using a appropriate client.
|
|
|
|
eg.
|
|
tsql -S server -U user -P pwd < sql/sqlserver.sql
|
|
mysql -u user -p < sql/mysql.sql
|
|
|
|
To run the tests
|
|
----------------
|
|
|
|
* make clean
|
|
* make run-test DATABASE=<ur-database>
|
|
valid database strings are :
|
|
sqlserver, odbc
|
|
|
|
GUIDELINES for test-case developers
|
|
----------------------------------
|
|
|
|
general
|
|
=======
|
|
|
|
* Provider specific test case to go into their specific
|
|
subfolders named after their namespaces. All odbc specific
|
|
test-cases to go into System.Data.Odbc, etc.
|
|
|
|
* all tables to have a unique id column
|
|
|
|
* if you modify any data from a test case make sure, you
|
|
revert it at the end of test case, either through
|
|
try..finally block or using transactions
|
|
|
|
* if you intend to insert from code, insert value above 6000
|
|
(randomly chosen)
|
|
|
|
|
|
* if you create a stored procedure from code, create with a
|
|
prefix 'tmp_'.
|
|
|
|
* if you create a table from code, create with a prefix
|
|
'tmp_'.
|
|
|
|
sqlserver
|
|
=========
|
|
|
|
* for temporary per-test-case tables/stored-procedures, prefix
|
|
the name with "#" so that mssql removes the object
|
|
automatically.
|
|
|
|
|
|
Extending to a new database
|
|
---------------------------
|
|
|
|
* All new databases can run the tests provided in
|
|
ProviderIndependant tests. Include your category in each of
|
|
the test cases. Say, if you want to extend these test cases
|
|
to a database provider 'xyz', include a line [Category
|
|
("xyz")] with each of the test cases.
|
|
|
|
* add a sql script file for you database to generate the test
|
|
data with same name you have given to the category with an
|
|
extension ".sql". For example, write a script file "xyz.sql"
|
|
under the sub-directory "sql".
|
|
|
|
The test pool data can be obtained from either of the
|
|
existing sql script files say "mysql.sql".
|
|
|
|
If your database does not support a datatype that are
|
|
used in other database script files, do *not* remove the
|
|
datatype instead, add a datatype nearly matching your local
|
|
type. For example, if your database does not support bigint,
|
|
add a column named type_bigint, but with type as "numeric
|
|
(19,0)".
|
|
|
|
* Add a subdirectory with the name of the your provider's
|
|
namespace. If your provider is, say, XYZ, with namespace
|
|
System.Data.XYZ, Add a sub-directory System.Data.XYZ. Add
|
|
your provider specific tests to this directory with each
|
|
test case assigned to your category.
|
|
|
|
* Add an application config file named after your database
|
|
name, same as the category name. Add an application key
|
|
called ConnString with the correct Connection String to your
|
|
database. This entry will be changed by the user when he
|
|
wants to run test on a different physical database.
|
|
|
|
|
|
IMPORTANT:
|
|
* Do *not* move any of the test cases to generic until you are
|
|
sure that they will run in all databases that are categorized. |