Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
</note>
<para>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
<literal>XQSuite</literal>
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
<link condition="_blank" xlink:href="https://github.com/eXist-db/generator-exist">yeoman templates</link>.</para>
<para>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.</para>
Expand Down Expand Up @@ -123,7 +123,7 @@
<para>You can simply execute the Cypress test command inside your CI test script after the unit test command we added earlier.</para>
<programlisting language="yaml" xlink:href="listings/travis-4.txt"/>
<para>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.</para>
<programlisting language="json" xlink:href="listings/cypress.txt"/>
<programlisting language="javascript" xlink:href="listings/cypress.txt"/>
<para>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
<link condition="_blank" xlink:href="https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests.html#Folder-Structure">Cypress documentation</link>.</para>
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
language: java
dist: bionic

jdk:
- oraclejdk8
- oraclejdk11
- openjdk8
- openjdk11

# Tell Travis that we are using Docker.
services:
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
language: java
dist: bionic

jdk:
- oraclejdk8
- oraclejdk11
- openjdk8
- openjdk11

services:
- docker
Expand All @@ -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

Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
language: java
dist: bionic

jdk:
- oraclejdk8
- oraclejdk11
- openjdk8
- openjdk11

services:
- docker
Expand All @@ -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

Expand Down