HodorNV / ALOps

ALOps
59 stars 24 forks source link

Make Test Runner fail, when no tests where executed #647

Closed epernst closed 11 months ago

epernst commented 1 year ago

Right now, when using the ALOpsAppTest task, if the app did not contain any tests, or if the tests were not executed, then the task is still a success. This have happened to us in serveral situations, primary with new pipelines, .e.i. the test suite was not created correctly (v14).

We would love to have a setting, so that if no tests were executed, then the task fails.

waldo1001 commented 1 year ago

Just a train of thoughts: after the test-step, you could test for the existence of "TestResults.xml" (even more: "c:\Run\DevOps\TestResults.xml" in the docker container (use ALOpsDockerExec)) .. if not .. throw error?

For outside-the-box stuff like this, we invented the ALOpsDockerExec (to perform your own script ;-)).

waldo1001 commented 1 year ago

We will do it as requested. This will make pipelines fail, I'm afraid, but .. in a way .. they should have been failing anyway .. .

AdminHodor commented 1 year ago

Implemented in v1.458