First readme version.
@@ -13,6 +13,8 @@ The engines and their respective binary crates are:
**Prerequisites:**
- Installed the stable Rust toolchain, at least version 1.39.0. You can get the toolchain at [rustup](https://rustup.rs/) or the package manager of your choice.
- Linux only: OpenSSL is required to be installed.
+- Installed `direnv`, then `direnv allow` on the repository root.
+ - Alternatively: Load the defined environment in `./.envrc` manually in your shell.
**How to build:**
@@ -30,9 +32,45 @@ Depending on how you invoked `cargo` in the previous step, you can find the comp
## Testing
-There are two test suites for the engines: Unit tests and integration tests.
+There are two test suites for the engines: Unit tests ("Cargo tests") and integration tests ("Connector TestKit").
-Unit tests are implemented in the Rust code, and can be invoked with `cargo test -- --test-threads 1`.
+The Unit tests are implemented in the Rust code. They test internal functionality of individual crates and components.
+
+The Connector TestKit is a separate Scala project found at `./query-engine/connector-test-kit` that runs GraphQL queries against isolated instances of the query engine and asserts that the responses are correct.
+
+### Set up & run integration tests:
+**Prerequisites:**
+- Installed Rust roolchain.
+- Installed Docker and Docker-Compose.
+- Installed Java, Scala, SBT (Scala Build Tool).
+- Installed `direnv`, then `direnv allow` on the repository root.
+ - Alternatively: Load the defined environment in `./.envrc` manually in your shell.
+
+**Setup**:
+There are helper `make` commands to set up a test environment for a specific database connector you want to test. The commands set up a container (if needed) and write the `current_connector` file, which is picked up by the integration tests:
+- `make dev-mysql`: MySQL 5.7
+- `make dev-mysql8`: MySQL 8
+- `make dev-postgres`: PostgreSQL 10
+- `make dev-sqlite`: SQLite
+
+As an optional but recommended step, you can run the tests by setting up an IntelliJ project for `./query-engine/connector-test-kit`, which makes test results much more accessible. You need to install the Scala plugin for Intellij if you want to do so.
+
+**Run:**
+If you're using Intellij, you can run all tests by right-clicking `src/test/scala` > `Run ScalaTests`.
+
+If you want to use the command line, start `sbt` in `./query-engine/connector-test-kit`, then execute `test` in the sbt shell.
+
+### Set up & run cargo tests:
+
+**Prerequisites:**
+- Installed Rust roolchain.
+- Installed Docker and Docker-Compose.
+- Installed `direnv`, then `direnv allow` on the repository root.
+ - Alternatively: Load the defined environment in `./.envrc` manually in your shell.
+- Start all test databases with `make all-dbs`.
+
+**Run:**
+Run `cargo test -- --test-threads 1` in the repository root.
## WIP Coding Guidelines
- Prevent compiler warnings
