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
Testing SQL compabillity for [AlaSQL](https://github.com/agershun/alasql)
4
-
5
-
6
-
How?
7
-
----
8
-
9
-
Go get markdown summery run npm test :
10
-
11
-
npm test
12
-
13
-
Result will output to `results/output.md`
14
-
15
-
16
-
17
-
18
-
What?
19
-
-----
20
-
21
-
The output of `run.js` is the output of each test file followed by the total score. (so you can keep track on overall % of passed tests why its running)
22
-
23
-
There are about 2 million tests in the full test suite. Many of the tests will trigger the same kind of error - this is why the output will only print the same error the first time it comes forward. To have more examples it will randomly print errors even if it has been printes before. You can also choose to print all errors. Please see the config section in the run.js file.
24
-
25
-
Please note that the current version of the script **ONLY TESTS IF THE SQL CAN COMPILE** - not if the returned values are correct.
26
-
27
-
To make sure you are testing the lates stable release please run the following:
28
-
29
-
npm install alasql
30
-
31
-
Please see the config section of the `run` files to run tests on local version instead of npm version.
3
+
> Testing SQL compabillity for [AlaSQL](https://github.com/agershun/alasql) on the 5,047,257 tests from http://www.sqlite.org/sqllogictest
32
4
5
+
_See the [most recent result](./results/output.md)_
33
6
34
7
35
8
Why?
36
9
----
37
10
38
-
AlaSQL src should incooperate test cases from sqllogictest [1] to identify areas where AlaSQL does not comply with expectations to traditional SQL statements.
11
+
AlaSQL src should incorporate test cases from sqllogictest [1] to identify areas where AlaSQL does not comply with the expectations to traditional SQL statements.
39
12
40
13
The goal (for now) is not to pass all the tests, but to help us describe (in the documentation) what AlaSQL does not support - and by that identify areas to improve for the library.
The format of the tests are desribed here: http://www.sqlite.org/sqllogictest/doc/trunk/about.wiki
45
18
46
-
Supported
47
-
---------
48
19
49
-
- Verify that the parser parses all the tests
50
-
51
-
- Floating point values are rendered as if by printf("%.3f").
20
+
How?
21
+
----
52
22
53
-
- NULL values are rendered as "NULL". Empty strings are rendered as "(empty)". Within non-empty strings, all control characters and unprintable characters are rendered as "@".
23
+
Install dependencies `npm install and run all the tests with:
54
24
55
-
- Implement verification of returned valued with sortorder set
25
+
npm test
56
26
27
+
The result will output to `results/output.md`
57
28
29
+
To make sure you are testing the most recent version of AlaSQL please run the following:
58
30
59
-
ToDo
60
-
----
31
+
npm install alasql
61
32
33
+
Please see the config section of the `run` files to run tests on local version instead of npm version.
62
34
63
35
64
-
- Change the compabillity flags in alasql accordng to whats mimicked
65
36
66
-
- implement:
67
-
> The <label> argument is also optional. If included, sqllogictest stores a hash of the results of this query under the given label. If the label is reused, then sqllogictest verifies that the results are the same. This can be used to verify that two or more queries in the same test script that are logically equivalent always generate the same output.
37
+
What?
38
+
-----
68
39
40
+
The output of `run.js` is the output of each test file followed by the total score. (so you can keep track of the overall % of passed tests while its running)
69
41
42
+
There are 5,047,257 tests in the full test suite. Many of the tests will trigger the same kind of error - this is why the output will only print the same error the first time it comes forward. To have more examples, there is a (low) probability it print errors again even if it has been printed before. You can also choose to print all errors. Please see the config section in the run.js file.
70
43
71
-
**Not ToDo**
72
-
- Impelment mocha testframework (testresults does not get printed before all are done - so fills the memory)
44
+
Please note that the current version of the script **ONLY TESTS IF THE SQL CAN COMPILE** - not if the returned values are correct.
73
45
74
46
75
47
Output
@@ -82,11 +54,11 @@ The output from run.js is structured the following way:
82
54
-[notice if this does not represent all test files in the test folder]
83
55
- Listing path to each testfile to be used
84
56
- For each test file
85
-
- Name of the test file that is about to run
86
-
- If errors occure the original SQL triggering the error is printed followed by the javascript error description.
87
-
- Summery of error rate in this test file and time consumption
88
-
- Summery of error rate for all test file
89
-
- Note stating: "ALL TESTS COPMLETED"
57
+
- Name of the test file that is about to run
58
+
- If errors occure the original SQL triggering the error is printed followed by the javascript error description.
59
+
- Summary of error rate in this test file and time consumption
60
+
- Summary of error rate for all test file
61
+
- Note stating: "ALL TESTS COMPLETED"
90
62
91
63
The output from a single testfile could look like this
92
64
@@ -100,7 +72,7 @@ The output from a single testfile could look like this
@@ -112,4 +84,33 @@ It makes sense, as no errors was found. But it can also look like this:
112
84
> * 99% was OK
113
85
>
114
86
115
-
making less sense as an error was found but was not printed. Because there are about 2 million tests in the full testset the same errors will be found many times. To limit noise an error only gets printed first time its seen. Settings for printing errors can be found in the config section of run.js
87
+
making less sense as an error was found but was not printed. Because there are about 5 million tests in the full testset the same errors will be found many times. To limit noise an error only gets printed first time its seen. Settings for printing errors can be found in the config section of run.js
88
+
89
+
90
+
Supported
91
+
---------
92
+
93
+
- Verify that the parser parses all the tests
94
+
95
+
- Floating point values are rendered as if by printf("%.3f").
96
+
97
+
- NULL values are rendered as "NULL". Empty strings are rendered as "(empty)". Within non-empty strings, all control characters and unprintable characters are rendered as "@".
98
+
99
+
- Implement verification of returned valued with sortorder set
100
+
101
+
102
+
103
+
ToDo
104
+
----
105
+
106
+
107
+
108
+
- Change the compatibility flags in AlaSQL according to whats mimicked
109
+
110
+
- implement:
111
+
> The <label> argument is also optional. If included, sqllogictest stores a hash of the results of this query under the given label. If the label is reused, then sqllogictest verifies that the results are the same. This can be used to verify that two or more queries in the same test script that are logically equivalent always generate the same output.
112
+
113
+
114
+
115
+
## Not ToDo
116
+
- Implement mocha testframework (testresults does not get printed before all are done - so it fills the memory)
0 commit comments