Fail and continue
Hi experts:
I have a build in RTC that compile, package, deploy to a websphere appserver, and run some test.
I create and activity (using the startBuildActivity ant task) for the test phase, and some children activities (for every service I have to test).
ex.
Test services
- Test service 1
- Test service 2
- Test service 3
What I want to accomplish is:
Is Test service 2 fail, mark this activity as failed and continue with the other tests. I mean, I dont want to fail the complete build.
How can I do this?
Thank in advance
I have a build in RTC that compile, package, deploy to a websphere appserver, and run some test.
I create and activity (using the startBuildActivity ant task) for the test phase, and some children activities (for every service I have to test).
ex.
Test services
- Test service 1
- Test service 2
- Test service 3
What I want to accomplish is:
Is Test service 2 fail, mark this activity as failed and continue with the other tests. I mean, I dont want to fail the complete build.
How can I do this?
Thank in advance
One answer
Hi,
i am not completely sure about this, but I would play around with the attribute:
failOnError - If true (the default), the task fails if it encounters an error. If false, some errors are ignored and the task is completed.
It is available for several items e.g. start build activity. See Ant Task Reference:
http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.team.build.doc/topics/r_ant-tasks.html
i am not completely sure about this, but I would play around with the attribute:
failOnError - If true (the default), the task fails if it encounters an error. If false, some errors are ignored and the task is completed.
It is available for several items e.g. start build activity. See Ant Task Reference:
http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.team.build.doc/topics/r_ant-tasks.html