4 Do this Once before running tests
5 ---------------------------------
6 * edit the connection string (app setting entry "ConnString")
7 - if you want to run odbc test cases, edit odbc.config
8 and edit the entry with "ConnString" with appropriate
9 DSN, User Id and Password.
11 * run the sql schema and test pool data under directory sql to
12 the respective databases, using a appropriate client.
15 tsql -S server -U user -P pwd < sql/sqlserver.sql
16 mysql -u user -p < sql/mysql.sql
22 * make run-test DATABASE=<ur-database>
23 valid database strings are :
26 GUIDELINES for test-case developers
27 ----------------------------------
32 * Provider specific test case to go into their specific
33 subfolders named after their namespaces. All odbc specific
34 test-cases to go into System.Data.Odbc, etc.
36 * all tables to have a unique id column
38 * if you modify any data from a test case make sure, you
39 revert it at the end of test case, either through
40 try..finally block or using transactions
42 * if you intend to insert from code, insert value above 6000
46 * if you create a stored procedure from code, create with a
49 * if you create a table from code, create with a prefix
55 * for temporary per-test-case tables/stored-procedures, prefix
56 the name with "#" so that mssql removes the object
60 Extending to a new database
61 ---------------------------
63 * All new databases can run the tests provided in
64 ProviderIndependant tests. Include your category in each of
65 the test cases. Say, if you want to extend these test cases
66 to a database provider 'xyz', include a line [Category
67 ("xyz")] with each of the test cases.
69 * add a sql script file for you database to generate the test
70 data with same name you have given to the category with an
71 extension ".sql". For example, write a script file "xyz.sql"
72 under the sub-directory "sql".
74 The test pool data can be obtained from either of the
75 existing sql script files say "mysql.sql".
77 If your database does not support a datatype that are
78 used in other database script files, do *not* remove the
79 datatype instead, add a datatype nearly matching your local
80 type. For example, if your database does not support bigint,
81 add a column named type_bigint, but with type as "numeric
84 * Add a subdirectory with the name of the your provider's
85 namespace. If your provider is, say, XYZ, with namespace
86 System.Data.XYZ, Add a sub-directory System.Data.XYZ. Add
87 your provider specific tests to this directory with each
88 test case assigned to your category.
90 * Add an application config file named after your database
91 name, same as the category name. Add an application key
92 called ConnString with the correct Connection String to your
93 database. This entry will be changed by the user when he
94 wants to run test on a different physical database.
98 * Do *not* move any of the test cases to generic until you are
99 sure that they will run in all databases that are categorized.