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: README.md
+8-1
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ This is a golang implementation of [MySQL Test Framework](https://github.com/mys
5
5
## Requirements
6
6
7
7
- All the tests should be put in [`t`](./t), take [t/example.test](./t/example.test) as an example.
8
-
- All the expected test results should be put in [`r`](./r). Result file has the same file name with the corresponding test file, but with a `.result` file suffix, take [r/example.result](./r/example.result) as an examle.
8
+
- All the expected test results should be put in [`r`](./r). Result file has the same file name with the corresponding test file, but with a default `.result` file extension, it can be changed by `-extension`, take [r/example.result](./r/example.result) as an examle.
9
9
10
10
## How to use
11
11
@@ -39,13 +39,20 @@ Usage of ./mysql-tester:
39
39
The user for connecting to the database. (default "root")
40
40
-xunitfile string
41
41
The xml file path to record testing results.
42
+
-check-error
43
+
If --error ERR does not match, return error instead of just warn
44
+
-extension
45
+
Specify the extension of result file under special requirement, default as ".result"
42
46
```
43
47
44
48
By default, it connects to the TiDB/MySQL server at `127.0.0.1:4000` with `root` and no passward:
45
49
```sh
46
50
./mysql-tester # run all the tests
47
51
./mysql-tester example # run a specified test
48
52
./mysql-tester example1 example2 example3 # seperate different tests with one or more spaces
53
+
# modify current example cases for .result output.
54
+
./mysql-tester -record=1 -check-error=1
55
+
49
56
```
50
57
51
58
For more details about how to run and write test cases, see the [Wiki](https://github.com/pingcap/mysql-tester/wiki) page.
Copy file name to clipboardexpand all lines: r/example.result
+3-3
Original file line number
Diff line number
Diff line change
@@ -18,17 +18,17 @@ SELECT 6;
18
18
6
19
19
6
20
20
1 SELECT;
21
-
Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 1 near "1 SELECT;"
21
+
Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 1 near "1 SELECT"
22
22
2 SELECT;
23
23
3 SELECT;
24
24
Got one of the listed errors
25
25
explain analyze format='brief' select * from t;
26
26
id estRows actRows task access object execution info operator info memory disk
0 commit comments