is it possible to pause suite while running the suite in testNG?

I am running my build using tesNg and ant. I want to pause the suite before running and ask do you want to continue? If it Yes suite will be execute otherwise it should be skip. Is it possible in testNg?

Add Comment
1 Answer(s)

You are looking for an Input task. You can do that by adding similar node. Get the value of  addproperty=“yesOrNo”  attribute
<input message=“Do you want to run TestNG tests?” addproperty=“yesOrNo” validargs=“Bob,Fred” />

one you are done with that check the value of ${yesOrNo} with the required “Yes” or “No” string values like this

<if>
<equals arg1=”${yesOrNo}” arg2=”Yes” />
<then>
“Run your test NG task here”
</then>
<else>
“Move ahead without running testing task”
</else>
</if>


Thanks
Virender

Virender Singh Professor Answered on April 1, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.