memgraph/tests/gql_behave
Marko Budiselić eb3f96d1f6
Bring changes from master to project-pineapples (#477)
* Fix aggregation functions on `null` and group-by inputs (#448)
* Upgrade Antrl to 4.10.1 and remove antlr_lock (#441)
* Update clang-tidy job (#476)
* Add parser stress test (#463)

NOTE: Doing this to have buildable comments on the project-pineapples branch

Co-authored-by: gvolfing <107616712+gvolfing@users.noreply.github.com>
Co-authored-by: Jure Bajic <jure.bajic@memgraph.com>
2022-07-28 15:36:17 +02:00
..
steps Add license to cpp/hpp/py test files (#283) 2021-10-26 08:53:56 +02:00
tests Bring changes from master to project-pineapples (#477) 2022-07-28 15:36:17 +02:00
.gitignore Clean and upgrade openCypher and stress tests (#27) 2020-11-24 13:09:14 +01:00
continuous_integration Clean and upgrade openCypher and stress tests (#27) 2020-11-24 13:09:14 +01:00
environment.py Add license to cpp/hpp/py test files (#283) 2021-10-26 08:53:56 +02:00
README.md Clean and upgrade openCypher and stress tests (#27) 2020-11-24 13:09:14 +01:00
requirements.txt Update pyyaml version (#305) 2021-11-25 10:12:33 +01:00
run.py Add license to cpp/hpp/py test files (#283) 2021-10-26 08:53:56 +02:00

Memgraph GQL Behave Tests

Python script used to run graph query language behavior tests against Memgraph.

To run the script please execute:

source ve3/bin/activate
./run.py --help
./run.py memgraph_V1

The script requires one positional parameter that specifies which test suite should be executed. All available test suites can be found in the tests/ directory.

Graph Sizes

IMPORTANT: Please prepare small graphs, up to 1000 nodes+edges because this engine is not optimized to run on a huge graphs. Furthermore, semantics should always be tested on a small scale.

openCypher TCK Tests

The script uses Behave to run Cucumber tests.

Some gotchas exist when adding openCypher TCK tests to the engine:

  • In some tests example injection did not work. Behave stores the first row in Cucumber tables as headings and the example injection failed to work. To correct this behavior, one row was added to tables where injection was used.

  • Some tests don't have fully defined result ordering. Because the tests rely on result order, some tests fail. If you find a flaky test to ignore output ordering you should change the tag "the result should be" to "the result should be (ignoring element order for lists)".

  • Behave can't escape character '|' and it throws a parse error. The query was then changed and the result was returned with a different name.

Comparability.feature tests are failing because integers are compared to strings what is not allowed in openCypher.

The Engine Issues

Comparing tables with ordering doesn't always work, example:

ORDER BY x DESC
| x | y |    | x | y |
| 3 | 2 |    | 3 | 1 |
| 3 | 1 |    | 3 | 2 |
| 1 | 4 |    | 1 | 4 |

Side effect aren't tracked or verified, example:

| +properties | 1 |
| -properties | 1 |

This is because Memgraph currently doesn't give out the list of side effects that happend during query execution.