Setup:
- Jenkins
- NUnit
- Selenium
- Email-ext (Jenkins plugin)
We have a test suite in C# that does setup: it checks in TestRail for what tests exist in the test plan, and writes to a file that list of tests. The build in Jenkins has two build steps (after pull & build):
- Run the setup suite to get the list of tests to bother running.
- Run the suite, using the
/runlist
NUnit parameter to pull in that list.
This works fantastically when there are tests to be run.
However, due to [completely separate implementation], there will be times when that file is empty. Therefore, the NUnit result for the "run with list" build step:
Tests run: 0, Errors: 0, Failures: 0, Inconclusive: 0, Time: 0.010100375885762 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
This tells Jenkins that this step failed:
C:\Program Files (x86)\Jenkins\jobs\[job_name]\workspace>exit 0
Archiving artifacts
Recording NUnit tests results
No test report files were found. Configuration error?
Build step 'Publish NUnit test result report' changed build result to FAILURE
Email was triggered for: Failure
Sending email for trigger: Failure
What I want is one of two things:
- At the very least, it would not send out a failure email.
- Ideally, the result from the setup build step would tell the build to stop, as there's nothing to build. The "Aborted" email trigger would be sent.
How do I configure Jenkins/this build to have that happen?