You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/README.md
+38-17Lines changed: 38 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,38 @@
2
2
3
3
## Side-by-side Tests
4
4
5
-
The `SideBySide` project is intended to verify that the new MySql.Data implementation
6
-
is equivalent to the official ADO.NET connector in places where that is deemed important.
7
-
8
-
The tests require a MySQL server. Copy the file `SideBySide/config.json.example` to `SideBySide/config.json`.
9
-
Then edit the `config.json` file in order to connect to your server:
10
-
11
-
Data.ConnectionString: The full MySql Connection String to your server. You should specify a database name.
12
-
If the database does not exist, the test will attempt to create it.
13
-
14
-
Data.PasswordlessUser: Leave blank to disable passwordless user tests. Otherwise, this should be a user
15
-
on your database with no Password and no Roles.
16
-
17
-
Data.SupportsJson: True if your MySql server supports JSON (5.7 and up), false otherwise.
5
+
The `SideBySide` project is intended to verify that MySqlConnector doesn't break compatibility
6
+
with Connector/NET and that [known bugs have been fixed](https://mysql-net.github.io/MySqlConnector/tutorials/migrating-from-connector-net/#fixed-bugs).
7
+
8
+
The tests require a MySQL server. The simplest way to run one is with [Docker](https://www.docker.com/community-edition):
Copy the file `SideBySide/config.json.example` to `SideBySide/config.json`, then edit
13
+
the `config.json` file in order to connect to your server. If you are using the Docker
14
+
command above, then the default options will work and do not need to be modified.
15
+
Otherwise, set the following options appropriately:
16
+
17
+
*`Data.ConnectionString`: The full connection string to your server. You should specify a database name. If the database does not exist, the test will attempt to create it.
18
+
*`Data.PasswordlessUser`: (Optional) A user account in your database with no password and no roles.
19
+
*`Data.SecondaryDatabase`: (Optional) A second database on your server that the test user has permission to access.
20
+
*`Data.CertificatesPath`: (Optional) The absolute path to the server and client certificates folder (i.e., the `.ci/server/certs` folder in this repo).
21
+
*`Data.MySqlBulkLoaderLocalCsvFile`: (Optional) The path to a test CSV file.
22
+
*`Data.MySqlBulkLoaderLocalTsvFile`: (Optional) The path to a test TSV file.
23
+
*`Data.UnsupportedFeatures`: A comma-delimited list of `ServerFeature` enum values that your test database server does *not* support
24
+
*`Json`: the `JSON` data type (MySQL 5.7 and later)
25
+
*`StoredProcedures`: create and execute stored procedures
26
+
*`Sha256Password`: a user named `sha256user` exists on your server and uses the `sha256_password` auth plugin
27
+
*`RsaEncryption`: server supports RSA public key encryption (for `sha256_password` and `caching_sha2_password`)
28
+
*`LargePackets`: large packets (over 4MB)
29
+
*`CachingSha2Password`: a user named `caching-sha2-user` exists on your server and uses the `caching_sha2_password` auth plugin
30
+
*`SessionTrack`: server supports `CLIENT_SESSION_TRACK` capability (MySQL 5.7 and later)
31
+
*`Timeout`: server can cancel queries promptly (so timed tests don't time out)
32
+
*`ErrorCodes`: server returns error codes in error packet (some MySQL proxies do not)
33
+
*`Tls11`: server supports TLS 1.1
34
+
*`Tls12`: server supports TLS 1.2
35
+
36
+
## Running Tests
18
37
19
38
There are two ways to run the tests: command line and Visual Studio.
20
39
@@ -24,14 +43,16 @@ After building the solution, you should see a list of tests in the Test Explorer
24
43
25
44
### Command Line
26
45
27
-
To run the New tests against MySqlConnector:
46
+
To run the tests against MySqlConnector:
28
47
29
48
```
30
-
dotnet restore; dotnet test
49
+
cd tests\SideBySide
50
+
dotnet xunit -c Release
31
51
```
32
52
33
-
To run the Baseline tests against MySql.Data:
53
+
To run the tests against MySql.Data:
34
54
35
55
```
36
-
dotnet restore /p:Configuration=Baseline; dotnet test -c Baseline
56
+
cd tests\SideBySide
57
+
dotnet restore /p:Configuration=Baseline && dotnet test -c Baseline
0 commit comments