At present, I have two types of execution choices in my project:
- testSuite.xml: where I am able to include methods and classes of my choice to each suite
- Added a runtime argument in maven goals in jenkins job.
-Dsomeproperty=propetyValue
: reading that through system properties as any VM arg, which is giving me choice inside the test methods to execute a certain condition. For example, if I do a transaction and the application allows negative balance in the account, then I can write the argument as-DallowNegativeBalance=true
and read that inside the test method, when true, it will not fail the validation due to negative balance. Just an example.
Now I want to add more granularity to have more controls, for example,
- Control the conditions within the test method.
- Control the entire test method.
- Control the entire test class.
- Control the entire test suite.
And all this not inside program only, ideally one should be able to control that depending upon the stage of deployment (means one stage can have a specific flow of deployment, for example, with allow negative balance true as above), so the CI FT job should be in such a way that above mentioned controls are possible. Like, within the testSuite also, some methods dont get executed, or even some classes which are not relevant to that negative balance flow are not executed. How can I achieve that?
I am a Java dev with little exp in TestNG limited to the suites and the maven arg mentioned in the beginning. Help is appreciated.
Aucun commentaire:
Enregistrer un commentaire