Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ node_modules/*
node/*

maven-archiver/

src/test/cypress/videos/*.mp4
src/test/cypress/screenshots/**/*.png
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ env:
- img=existdb/existdb:latest
- img=existdb/existdb:release

cache:
directories:
- $HOME/.m2

before_install:
- docker pull $img
- docker create --name exist-ci -p 8080:8080 $img

install:
- mvn clean package
- mvn clean package -DskipTests -q

before_script:
- docker cp ./target/exist-documentation-*.xar exist-ci:exist/autodeploy
Expand All @@ -27,6 +31,7 @@ before_script:
script:
- mvn validate
- mvn test
- npm run cypress

after_success:
- docker ps
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ Should you encounter documentation for features that are deprecated in the minim
3. Install this file via the Dashboard > Package Manager.

## (WIP) Testing
Tests are executed locally by maven or on travis. To validate xml files run `mvn validate`, to run the javascript tests `mvn test` (xQsuite coming soon). We do **not** support testing via node alone, aka `npm test`, use the maven command instead.

### Unit tests
The full test-suite consists of validation, unit, and integration tests, it runs automatically on travis. To be able to run integration tests locally, contributors should run `npm i` to download and install [cypress.js](https://www.cypress.io). This is only required once. To execute the tests run the following commands:
- To validate xml files run `mvn validate`,
- to run the javascript tests `mvn test` (xQsuite coming soon). We do **not** support testing via node alone, aka `npm test`, use the maven command instead.
- To run the Integrations tests, however, use `npm run cypress`.

Both unit and integration tests, expect a running instance of exist with a copy of the documentation app installed reachable at `localhost:8080` and an empty admin password. It might be necessary to skip test execution during building from time to time, use: `mvn clean package -DskipTests`.

## License
LGPLv2.1 [eXist-db.org](http://exist-db.org/exist/apps/homepage/index.html)
11 changes: 11 additions & 0 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"baseUrl": "http://localhost:8080/exist/apps/doc",
"fileServerFolder": "src/main/xar-resources",
"ignoreTestFiles": "src/test/cypress/integration/examples/*.js",
"fixturesFolder": "src/test/cypress/fixtures",
"integrationFolder": "src/test/cypress/integration",
"pluginsFile": "src/test/cypress/plugins/index.js",
"screenshotsFolder": "src/test/cypress/screenshots",
"supportFile": "src/test/cypress/support/index.js",
"videosFolder": "src/test/cypress/videos"
}
Loading