How to Run SQL Regression Tests
Loading Test Database
To run the SQL regression test, you must first load the test dataset into your source DBMS. It is necessary to load our test dataset in the traindb-core/src/test/resources/datasets directory. The following test datasets are used in our SQL regression tests.
instacart_small: a small part of instacart dataset
Since the loading script is included, you can create the test database and load data by running the script.
For example, the instacart_small dataset can be loaded into MySQL as follows.
$ mysql -u [user id] -p < load_mysql.sql
Configuring Test Database
You can find the traindb-test-config.json.template file in the traindb-core/src/test/resources directory.
Rename this file to traindb-test-config.json, and fill in your test database information.
Running SQL Regression Tests
Our project runs SQL regression tests using the Quidem framework along with Apache Calcite.
The SQL test scripts have an extension of .iq and are located in the traindb-core/src/test/resources/sql directory.
You can run SQL regression tests using maven as follows.
$ mvn test -DskipTests=false
Quidem has the unique feature that its output is identical to its input if a script succeeds. You can easily add test scripts using this feature.