Allow Run Tests to be bypassed if there are no test cases
complete
T
Tawny Panther
When the build step of type Tests runs it will fail if there are no tests to run. This is not always desirable and there should be a way to disregard this step if no tests are present. Most build tools compile test source into a standard directory and if that is empty it could meet this criteria. Other languages that are not compiled may call for a creative solution or just some mechanism versatile enough for a general case like some combination of file search and grep of files for a 'test flag'.
Log In
N
Nofar Bluestein
complete
N
Nofar Bluestein
Hey,
you can set the Test step's failure strategy to ignore failure, and have an additional step of type Plugin that is using Test Analysis Plugin (see links below) to parse the results and define your own strategy for when to fail the build.
Regards,
Nofar Bluestein
CI product team
N
Nofar Bluestein
pending feedback
Hey Justin / Will ,
I was trying this with a Java/Maven app and the Test step on an app with no unit tests, and my step didn't fail. Could you share the pipeline execution (you can share with me directly on our slack channel )
One thing that could also help here is to set the Test step to fail/ignore , so it doesn't fail. and use a following step to check for unit test reports files.
Thanks,
Nofar Bluestein
CI Product Team