Open gaganangrish opened 8 years ago
Maybe you should wait to have more response on http://stackoverflow.com/questions/38364471/running-dependent-tests-in-testng-in-logical-or
What is the real life usecase behind your request?
I am testing some dynamic content on the web page which appears/don't appear based on the user data. The user flow is:
So in this case Test Case 3 should execute if either of Test Case 2A or 2B is passed. I have used dependsOnMethods in my tests so I was assuming that I could use dependsOnMethods to actually execute a test case based on Logical OR but seems like this is not possible.
The only possible solution for me atm is to change the structure of my tests (which would take lot of rework) but if this can be implemented in TestNG it'd be great.
Let me know if more information is needed. Thanks. Gagan
On Thu, Jul 14, 2016 at 5:22 PM, Julien Herr notifications@github.com wrote:
Maybe you should wait to have more response on http://stackoverflow.com/questions/38364471/running-dependent-tests-in-testng-in-logical-or
What is the real life usecase behind your request?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cbeust/testng/issues/1092#issuecomment-232583060, or mute the thread https://github.com/notifications/unsubscribe/AK0QYYvvXIQI01vRaUR03rmB9PAJuygmks5qVeOegaJpZM4JMIeB .
@juherr Should I spend time adding this feature? Or should it be closed as it can be handled programmatically?
@arham-jain Why not but in my opinion it is more important to fix current features than adding new ones.
Issue: Not able to run dependent tests with logical OR. TestNG is only running as in logical AND.
Use Case: In below code example, Test3 should only be executed if either of Test1 or Test2 has successfully passed.
by using
dependsOnMethods = {"Test1","Test2"}
on Test3, it checks if both Test1 and Test2 have passed i.e. in logical AND. There is no way (other then programmatically) in TestNG that it should check the dependent test in logical OR and then execute the test.As Test1 has been set to skip, Test3 is never running as not both of Test1 and Test2 are passing. I want to execute Test3 if either of Test1 or Test2 has been passed.