Skip to content

Commit 8fc0947

Browse files
Add Testkit instructions to README.md (#919)
1 parent afa6a87 commit 8fc0947

File tree

1 file changed

+31
-12
lines changed

1 file changed

+31
-12
lines changed

README.md

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,45 @@ To use the driver in a project, please use the released driver via Maven Central
9999

100100
#### Running Tests and Creating a Package
101101

102-
The driver unit tests relies on latest [`boltkit`](https://github.com/neo4j-drivers/boltkit) installed on your local machine.
102+
Our test setup requires a bit of infrastructure to run.
103+
We rely mostly on [`testkit`](https://github.com/neo4j-drivers/testkit).
104+
Testkit is a tooling that is used to run integration tests for all of the drivers we provide.
105+
106+
Some older tests still rely on [`boltkit`](https://github.com/neo4j-drivers/boltkit), the predecessor to Testkit.
103107
If `boltkit` is not installed, then all tests that requires `boltkit` will be ignored and will not be executed.
104108

105-
The following Maven command shows how to run all tests and build the source code:
109+
In case you want or can verify contributions with unit tests alone, use the following command to skip all integration tests:
110+
106111
```
107-
mvn clean install
112+
mvn clean install -DskipITs
108113
```
109-
When running integration tests, the driver would start a Neo4j instance and a Neo4j cluster on your local machine.
110-
Your tests might fail due to
111-
* a Neo4j server instance is already running on your machine and occupying the default server ports,
112-
* a lack of persmission to download Neo4j Enterprise artifacts.
113114

114-
To skip the integration tests, use:
115+
Otherwise, if you have Git, Python3 and Docker installed, please go ahead and clone Testkit and run as follows:
116+
115117
```
116-
mvn clean install -DskipITs
118+
git clone [email protected]:neo4j/neo4j-java-driver.git
119+
git clone [email protected]:neo4j-drivers/testkit.git
120+
cd testkit
121+
TEST_DRIVER_NAME=java \
122+
TEST_DRIVER_REPO=`realpath ../neo4j-java-driver` \
123+
TEST_DOCKER_RMI=true \
124+
python3 main.py --tests UNIT_TESTS --configs 4.3-enterprise
117125
```
118126

127+
To run additional Testkit test, specify `TESTKIT_TESTS`:
119128

120-
#### Windows
129+
```
130+
TEST_DRIVER_NAME=java \
131+
TEST_DRIVER_REPO=`realpath ../neo4j-java-driver` \
132+
TEST_DOCKER_RMI=true \
133+
python3 main.py --tests TESTKIT_TESTS UNIT_TESTS --configs 4.3-enterprise
134+
````
135+
136+
On Windows or in the abscence of a Bash-compatible environment, the required steps are probably different.
137+
A simple `mvn clean install` will require admin rights on Windows, because our integration tests require admin privileges to install and start a service.
121138
122-
If you are building on windows, you will need to run the install with admin rights.
123-
This is because integration tests require admin privileges to install and start a service.
139+
If all of this fails and you only want to try out a local development version of the driver, you could skip all tests like this:
124140
141+
```
142+
mvn clean install -DskipTests
143+
```

0 commit comments

Comments
 (0)