Skip to content

Commit 156839e

Browse files
committed
fix(int-test): update listings
fix typo fix highlighting close #521
1 parent 845b83e commit 156839e

File tree

5 files changed

+28
-11
lines changed

5 files changed

+28
-11
lines changed

src/main/xar-resources/data/integration-testing/integration-testing.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
</note>
9494
<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
9595
<literal>XQSuite</literal>
96-
unit tests. You can see how this is configured, for apps using our the
96+
unit tests. You can see how this is configured, for apps using the
9797
<link condition="_blank" xlink:href="https://github.com/eXist-db/generator-exist">yeoman templates</link>.</para>
9898
<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.
9999
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>
@@ -123,7 +123,7 @@
123123
<para>You can simply execute the Cypress test command inside your CI test script after the unit test command we added earlier.</para>
124124
<programlisting language="yaml" xlink:href="listings/travis-4.txt"/>
125125
<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>
126-
<programlisting language="json" xlink:href="listings/cypress.txt"/>
126+
<programlisting language="javascript" xlink:href="listings/cypress.txt"/>
127127
<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.
128128
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
129129
<link condition="_blank" xlink:href="https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests.html#Folder-Structure">Cypress documentation</link>.</para>
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Tell Travis that we want Java.
22
language: java
3+
dist: bionic
34

45
# This should be the minimal Java version required by eXist-db.
56
jdk:
6-
- oraclejdk8
7+
- openjdk8
78

8-
# This makes the build command explicit.
9+
# This makes the build command explicit.
910
install:
1011
- ant

src/main/xar-resources/data/integration-testing/listings/travis-2.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
language: java
2+
dist: bionic
23

34
jdk:
4-
- oraclejdk8
5-
- oraclejdk11
5+
- openjdk8
6+
- openjdk11
67

78
# Tell Travis that we are using Docker.
89
services:
@@ -13,6 +14,11 @@ env:
1314
- img=existdb/existdb:latest
1415
- img=existdb/existdb:release
1516

17+
# Download exist into the test VM
18+
before_install:
19+
- docker pull $img
20+
- docker create --name exist-ci -p 8080:8080 $img
21+
1622
install:
1723
- ant develop
1824

src/main/xar-resources/data/integration-testing/listings/travis-3.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
language: java
2+
dist: bionic
23

34
jdk:
4-
- oraclejdk8
5-
- oraclejdk11
5+
- openjdk8
6+
- openjdk11
67

78
services:
89
- docker
@@ -11,6 +12,10 @@ env:
1112
- img=existdb/existdb:latest
1213
- img=existdb/existdb:release
1314

15+
before_install:
16+
- docker pull $img
17+
- docker create --name exist-ci -p 8080:8080 $img
18+
1419
install:
1520
- ant develop
1621

@@ -21,6 +26,6 @@ before_script:
2126
- sleep 30
2227
- docker ps
2328

24-
# This makes the test command explicit.
29+
# This makes the test command explicit.
2530
script:
2631
- ant test

src/main/xar-resources/data/integration-testing/listings/travis-4.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
language: java
2+
dist: bionic
23

34
jdk:
4-
- oraclejdk8
5-
- oraclejdk11
5+
- openjdk8
6+
- openjdk11
67

78
services:
89
- docker
@@ -11,6 +12,10 @@ env:
1112
- img=existdb/existdb:latest
1213
- img=existdb/existdb:release
1314

15+
before_install:
16+
- docker pull $img
17+
- docker create --name exist-ci -p 8080:8080 $img
18+
1419
install:
1520
- ant develop
1621

0 commit comments

Comments
 (0)