| Auszug | ||
|---|---|---|
| ||
Nuclos Integrationstests: IntelliJ, Docker, Selenium, standalone-chrome, groovy, /etc/hosts, VM-Parameter, JUnit. |
Sprache: Deutsch · English
Integrationstests in IntelliJ ausführen – Server-Tests (Groovy) und Webclient-Tests mit Selenium/Docker.
| Status | ||||
|---|---|---|---|---|
|
| Status | ||||
|---|---|---|---|---|
|
| Status | ||||
|---|---|---|---|---|
|
| Status | ||||
|---|---|---|---|---|
|
| Panel | ||||||
|---|---|---|---|---|---|---|
| ||||||
Auf dieser Seite
|
...
...
Server- und Webclient-Integrationstests in IntelliJ ausführen – die Webclient-Tests nutzen einen Selenium-Container via Docker.
Navigation im Projekt zu
...
localhost starten.nuclos-integrationstests/src/test/groovy/org/nuclos/test....
...
Eine *.groovy-Datei unter
...
server
...
Starten des Docker-Containers "selenium/standalone-chrome-debug" auf port 4444
z.B. mit:
(oder das ganze Verzeichnis) per Run/Debug starten und die Ergebnisse abwarten.
| Codeblock | ||
|---|---|---|
|
...
docker run -d -p 4444:4444 -p 5900:5900 selenium/standalone-chrome-debug |
...
Nötige Hosts in
...
/etc/hosts
...
(Windows:
...
%windir%\system32\drivers\etc\
...
| Codeblock |
|---|
127.0.0.1 host.docker.internal |
hosts) eintragen, Webclient starten und in IntelliJ die VM-Parameter setzen (Edit Configurations → JUnit → Edit configuration templates…).
Starten des Webclients mit:
| Codeblock |
|---|
ng serve --host host.docker.internal |
Einrichten der VM Parameter in IntelliJ mit "Edit Configurations" → "JUnit" → "Edit configuration templates..."
Beispiel:
| Codeblock |
|---|
-ea
-Dselenium.server=http://127.0.0.1:4444/wd/hub
-Dnuclos.server.host=host.docker.internal
-Dnuclos.server.port=8080
-Dnuclos.webclient.host=host.docker.internal
-Dnuclos.webclient.port=4200
-Dnuclos.webclient.screenshots=false
-Dnuclos.failing.videos.path=/home/honk/videos |
...
| Info | ||
|---|---|---|
| ||
Ohne gesetzten |
|