Skip to content

Commit b1fd33c

Browse files
authored
Introduce testcontainers for integration tests (#1122)
`testcontainers` replaces `boltkit` as library to start docker containers. The container should be able to start when `npm run test`, `npm run test::integration` and `npm run test::browser` are run if methods are not called from testkit. Running the tests direct from the IDE should be also an supported usecase. * [x] `npm run test::integration` * [x] `npm run test` * [x] `npm run test::browser` * [x] Don't conflict with testkit * [x] Start container for run tests from IDE (lite-driver) * [ ] Start container for run tests from IDE (driver)
1 parent e8bddb7 commit b1fd33c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2899
-592
lines changed

TESTING.md

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -66,43 +66,22 @@ More details about how to use Testkit could be found on [its repository](https:/
6666

6767
## Testing (Legacy)
6868

69-
Tests **require** latest [Boltkit](https://github.com/neo4j-contrib/boltkit) and [Firefox](https://www.mozilla.org/firefox/) to be installed in the system.
70-
71-
Boltkit is needed to start, stop and configure local test database. Boltkit can be installed with the following command:
72-
73-
```
74-
pip3 install --upgrade boltkit
75-
```
69+
Tests **require** [Docker](https://www.docker.com/) and [Firefox](https://www.mozilla.org/firefox/) to be installed in the system.
7670

7771
To run tests against "default" Neo4j version:
7872

7973
```
80-
./runTests.sh
74+
npm test
8175
```
8276

8377
To run tests against specified Neo4j version:
8478

8579
```
86-
./runTests.sh '-e 4.2.0'
80+
TEST_NEO4J_VERSION=5.9 npm test
8781
```
8882

89-
Simple `npm test` can also be used if you already have a running version of a compatible Neo4j server.
90-
91-
For development, you can have the build tool rerun the tests each time you change
92-
the source code:
83+
If you already have a running version of a compatible Neo4j server, you can run:
9384

9485
```
95-
gulp watch-n-test
86+
TEST_CONTAINERS_DISABLED=true npm test
9687
```
97-
98-
If the `gulp` command line tool is not available, you might need to install this globally:
99-
100-
```
101-
npm install -g gulp-cli
102-
```
103-
104-
### Testing on windows
105-
106-
To run the same test suite, run `.\runTest.ps1` instead in powershell with admin right.
107-
The admin right is required to start/stop Neo4j properly as a system service.
108-
While there is no need to grab admin right if you are running tests against an existing Neo4j server using `npm test`.

0 commit comments

Comments
 (0)