I want to read the gitlab console output to fail the job when the test fails. I am running SoapUI tests using maven. Please see the screenshot below. I am new to gitlab. I have been working on this issue for 2 weeks. Also it is becoming hard for me to click on each job to see if it has passed or failed. If I can read the console output, I can put an if condition in the yml file stating that it should fail the job if it see the text "failed"
Here is the .yml file
# Wa API
.wa-stage:
stage: wa
needs: []
TC-396:
extends: .wa-stage
image: adoptopenjdk/maven-openjdk11
variables:
MAVEN_CLI_OPTS: "-Dmaven.test.failure.ignore=false"
script:
- 'mvn -f ./S/Wa/TC-396-soapui/pom.xml $MAVEN_CLI_OPTS test'
allow_failure: true
when: always
TC-397:
extends: .wa-stage
image: adoptopenjdk/maven-openjdk11
variables:
MAVEN_CLI_OPTS: "-Dmaven.test.failure.ignore=false"
script:
- 'mvn -f ./S/Wa/TC-397-soapui/pom.xml $MAVEN_CLI_OPTS test'
allow_failure: true
when: always
TC-398:
extends: .wa-stage
image: adoptopenjdk/maven-openjdk11
variables:
MAVEN_CLI_OPTS: "-Dmaven.test.failure.ignore=false"
script:
- 'mvn -f ./S/Wa/TC-398-soapui/pom.xml $MAVEN_CLI_OPTS test'
allow_failure: true
when: always
TC-399:
extends: .wa-stage
image: adoptopenjdk/maven-openjdk11
variables:
MAVEN_CLI_OPTS: "-Dmaven.test.failure.ignore=false"
script:
- 'mvn -f ./S/Wa/TC-399-soapui/pom.xml $MAVEN_CLI_OPTS test'
allow_failure: true
when: always