Skip to content

Latest commit

 

History

History

e2e-tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Autogenerated Tests

This crate contains the build script necessary for autogenerated tests.

The tests directory is scanned for index usage and specification query tests. Each file is parsed in the build script to:

  1. determine if a test should be generated
  2. create the tests

Autogenerated tests may contain cases that are irrelevant for a particular test; this is fine because it's generated code and all tests eventually use all contents.

Running the tests

You can run specific test types with feature flags. The generated flag is required for any test type. -- --test-threads=1 is required to run any of the test suites, as they are not thread safe.

  • Query tests: cargo test --package e2e-tests --features generated,query -- --test-threads=1
  • Index tests: cargo test --package e2e-tests --features generated,index -- --test-threads=1
  • E2E tests: cargo test --package e2e-tests --features generated,e2e -- --test-threads=1
  • Error tests: cargo test --package e2e-tests --features generated,error -- --test-threads=1
  • ALL tests: cargo test --package e2e-tests --features generated,all -- --test-threads=1

Adding new tests to existing spec/query or index_usage

The easiest way to add new tests is to append to a file, or create a new file in the tests directory following the structure of a similar file. This will automatically be built into a new test file with test cases.

Adding new test types

See the readme in the build_utils