I am using GitLab and my test cases are written in C# Speflow. I have configured the pipeline to execute the complete automation suite before deployment but my pipeline does not fail and terminate on test case failure it keeps going and even when the complete suite is executed it's still not failing or stopping. The pipeline will only stop when the runner timeout limit is reached. Please see below image:
I want to stop the pipeline and mark it as failed as soon as any of the test cases fail. I used "allow_failure: false" but it didn't work. Can someone please help me with this? So in short I want to terminate the CI pipeline and fail it as soon as my first test case is failed and don't want my pipeline to continue with other remaining test cases.
My GitLab yml file is as below:
demo_job_1:
stage: test
tags:
- tags
script:
- Root dir location path
- 'dotnet restore <path to the ProjName.sln>'
- 'dotnet msbuild <path to the ProjName.sln>'
- 'dotnet test <path to the ProjName.sln>'
allow_failure: false