I am trying to use Regular Expression for TestNg dependsOnMethods, but TestNg is not identifying the method. As I had gone through the TestNg documentation we can use Regular Expressions for dependsOnMethods and dependsOnGroups.
For Example, I have method like below,
@Test
public void testParallel_1001(){
}
And I have another test method which depends on above method,
@Test(dependsOnMethods = { "(.*?)1001" }, alwaysRun=true)
public void testParallel_1003(){
}
But it is not working for me.
I have also used, /1001/
and *.1001.*
but no luck. Please someone help me.