I have a jenkins job that runs regression scenarios using maven plugin. I want to run a small sanity scenario with one or two tests before starting the regression scenario and if that sanity scenario failed I want to fail the whole job. I want this to run in one single job (it will be another build step) and not split it to two jobs, is there a recommended way to check the sanity scenario status to know if to fail the job?
Currently I'm parsing the JUnit XML report to see if it has any errors using some windows commands, but is there a better way? maybe there's some env variable that JSystem manages?
Thanks,
Michal
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes but this is a post build step so this can run only at the end and it's not what I want. I want in the same job to run one scenario and if it passed run the full regression tests. If it failed I want to fail the job.. unless am missing something..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh.. Sorry, didn't read you post carefully enough. I don't think there is a better way. Why don't you want to split it to two jobs and create a downstream as Alex suggested? I think it is more elegant than parsing the XML.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a jenkins job that runs regression scenarios using maven plugin. I want to run a small sanity scenario with one or two tests before starting the regression scenario and if that sanity scenario failed I want to fail the whole job. I want this to run in one single job (it will be another build step) and not split it to two jobs, is there a recommended way to check the sanity scenario status to know if to fail the job?
Currently I'm parsing the JUnit XML report to see if it has any errors using some windows commands, but is there a better way? maybe there's some env variable that JSystem manages?
Thanks,
Michal
There is no need to parse xml, jenkins can do it by itself, just add JUNIT plugin to jenkins
Hi, thanks for the answer.
Can you be more specific? Which plugin and how do I use it in the job for my purpose?
Check out the reporting section in the following blog:
http://jsystem.org/703/
Yes but this is a post build step so this can run only at the end and it's not what I want. I want in the same job to run one scenario and if it passed run the full regression tests. If it failed I want to fail the job.. unless am missing something..
try downstream project
Oh.. Sorry, didn't read you post carefully enough. I don't think there is a better way. Why don't you want to split it to two jobs and create a downstream as Alex suggested? I think it is more elegant than parsing the XML.
Well, I've never tried it so could be I am mistaken but I am not sure I can get the requested behavior, lets say the following: