-
Notifications
You must be signed in to change notification settings - Fork 98
Testing Framework
Guodong Jin edited this page Apr 8, 2021
·
1 revision
The usage of the testing framework requires a user to:
- write a test file, an example can be found in
test/runner/basic_scan.test
.
# description: Basic scan test
-INPUT dataset/tinysnb/
-PARALLELISM 1
-NAME SimpleMatchTest
-QUERY MATCH (a:person)
---- 7
One test file is expected to hold a test suite, including a configuration of graph (csv files) input dir (-INPUT
), parallelism of the processor (-PARALLELISM
), and also one or multiple queries.
Each query consists of a name, -NAME
, and the cypher -QUERY
, followed by the number of tuples, e.g., ---- 1
.
Comparison on the query result is not supported for now (will be added in a later version).
- add test file into the unittest's data dependency
filegroup(
name = "testfiles",
srcs = [
"basic_extend.test",
"basic_hash_join.test",
"basic_scan.test",
],
visibility = ["//visibility:public"],
)
To read these files in bazel test system, we need add them as data dependency, so they can be exposed and read in the bazel sandbox.
- create a unittest
TEST(BasicTest, BasicScan) {
TestHelper testHelper;
ASSERT_TRUE(testHelper.runTest("test/runner/basic_scan.test"));
}
To use the test in unittest, we need add a unittest function to specify the path of the test file.
- Coding Style
- Casting Rules
- Frontend
- Processor
- Storage
- Test