diff --git a/src/main/xar-resources/data/integration-testing/integration-testing.xml b/src/main/xar-resources/data/integration-testing/integration-testing.xml index 7be75560..77eca196 100644 --- a/src/main/xar-resources/data/integration-testing/integration-testing.xml +++ b/src/main/xar-resources/data/integration-testing/integration-testing.xml @@ -93,7 +93,7 @@ If you use more then one test runner, you can simply add additional test commands to the script parameter. In the case of our app, eXist-db is already running in the background, so it is also possible to run your XQSuite - unit tests. You can see how this is configured, for apps using our the + unit tests. You can see how this is configured, for apps using the yeoman templates. How to write good unit tests is beyond the scope of this article. Whenever you are struggling with your integration test, however, you should ask yourself if what you are trying to achieve might not be better served by creating unit tests. Whichever solution works best for you, you should not rely on either unit or integration tests alone, and both should be integrated into your CI pipeline. @@ -123,7 +123,7 @@ You can simply execute the Cypress test command inside your CI test script after the unit test command we added earlier. With Cypress you write your tests in the same fashion as you would with Mocha unit tests; however, you now address the rendered document inside a browser instead of individual JavaScript functions. - + The above example opens a page (the dashboard) in the browser, logs in, and closes the window it just opened. You can do many more things, but these examples are meant to provide a good starting point for creating your first integration test. If there are any console errors or problems with rendering content Cypress will create an error message and your tests will fail. To check the syntax of these commands, and to see many more examples please visit the Cypress documentation. diff --git a/src/main/xar-resources/data/integration-testing/listings/travis-1.txt b/src/main/xar-resources/data/integration-testing/listings/travis-1.txt index 8da3b0aa..139e0fcf 100644 --- a/src/main/xar-resources/data/integration-testing/listings/travis-1.txt +++ b/src/main/xar-resources/data/integration-testing/listings/travis-1.txt @@ -1,10 +1,11 @@ # Tell Travis that we want Java. language: java +dist: bionic # This should be the minimal Java version required by eXist-db. jdk: - - oraclejdk8 + - openjdk8 -# This makes the build command explicit. +# This makes the build command explicit. install: - ant diff --git a/src/main/xar-resources/data/integration-testing/listings/travis-2.txt b/src/main/xar-resources/data/integration-testing/listings/travis-2.txt index 94d0fa54..155bf699 100644 --- a/src/main/xar-resources/data/integration-testing/listings/travis-2.txt +++ b/src/main/xar-resources/data/integration-testing/listings/travis-2.txt @@ -1,8 +1,9 @@ language: java +dist: bionic jdk: - - oraclejdk8 - - oraclejdk11 + - openjdk8 + - openjdk11 # Tell Travis that we are using Docker. services: @@ -13,6 +14,11 @@ env: - img=existdb/existdb:latest - img=existdb/existdb:release +# Download exist into the test VM +before_install: + - docker pull $img + - docker create --name exist-ci -p 8080:8080 $img + install: - ant develop diff --git a/src/main/xar-resources/data/integration-testing/listings/travis-3.txt b/src/main/xar-resources/data/integration-testing/listings/travis-3.txt index 7c5063f7..1a644237 100644 --- a/src/main/xar-resources/data/integration-testing/listings/travis-3.txt +++ b/src/main/xar-resources/data/integration-testing/listings/travis-3.txt @@ -1,8 +1,9 @@ language: java +dist: bionic jdk: - - oraclejdk8 - - oraclejdk11 + - openjdk8 + - openjdk11 services: - docker @@ -11,6 +12,10 @@ env: - img=existdb/existdb:latest - img=existdb/existdb:release +before_install: + - docker pull $img + - docker create --name exist-ci -p 8080:8080 $img + install: - ant develop @@ -21,6 +26,6 @@ before_script: - sleep 30 - docker ps -# This makes the test command explicit. +# This makes the test command explicit. script: - ant test diff --git a/src/main/xar-resources/data/integration-testing/listings/travis-4.txt b/src/main/xar-resources/data/integration-testing/listings/travis-4.txt index 46fe10aa..9d8d7220 100644 --- a/src/main/xar-resources/data/integration-testing/listings/travis-4.txt +++ b/src/main/xar-resources/data/integration-testing/listings/travis-4.txt @@ -1,8 +1,9 @@ language: java +dist: bionic jdk: - - oraclejdk8 - - oraclejdk11 + - openjdk8 + - openjdk11 services: - docker @@ -11,6 +12,10 @@ env: - img=existdb/existdb:latest - img=existdb/existdb:release +before_install: + - docker pull $img + - docker create --name exist-ci -p 8080:8080 $img + install: - ant develop