mvn test -DsuiteXmlFile=src/res/testSuite.xml -DmyCustomProp=true
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users+unsubscribe@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
I use test groups for this. But that approach only works if you know what test methods and classes should be grouped together in advance. If you need the tests to make that decision solely at runtime, you'll need something more sophisticated.Todd.
On Thu, Oct 26, 2017 at 8:07 AM, Rajdeep Biswas <raj.my...@gmail.com> wrote:
Hi all.I have a testSuite.xml and for some conditions, say, depending upon the environment of application deployment, to run or not run validations inside test methods, I am also passing an arg in maven goals in CI. Like
mvn test -DsuiteXmlFile=src/res/testSuite.xml -DmyCustomProp=trueHow do I add more granularity like controlling the classes/methods when to turn on and off?For example, I may want to run a particular suite in one of the FT jobs, but decide to not run a few classes or methods because they don't need to be based on the application deployment environment. In brief, I have been told to do these:
- Control the conditions within the test method. (I think the argument I specified above does this)
- Control the entire test method. (Todo)
- Control the entire test class. (Todo)
- Control the entire test suite. (Todo. May be when one suite references other sub suites, and we want to enable/disable some)
How to achieve these?ThanksRajdeep
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users+unsubscribe@googlegroups.com.
Thank you Todd. Do you mean that you have created suites and grouped methods inside them and pass during runtime? Can you give a sample or any link of this where one can turn on/off certain groups in the suite, using arguments, for example from the CI.Like, running a suite with certain group once and another group included in different run.
-DexcludeGroups=group1,group2