Here there is a group "nonExistingReferralSearch" that I don't want to be dependent upon any other group. But I want it to be executed in the specified order and I have set "preserve-order" as true for the<test>. While execution, I find that TestNG does not execute the non-dependent group in order. It executes that group immediately after the group "openlogin" whereas I am expecting it to get executed in the end.
Is it wrong to define dependencies as well as tell TestNG to maintain an order of execution? Is there an unknown priority defined that TestNG will execute any non-dependent tests/groups first and then the dependent tests? I hope it is not that inflexible.
Even for a generic scenario in a <test>, is it not possible to run some test methods/groups without any dependency and some test methods/groups with dependencies, in an order?
I have read about IMethodInterceptor but it doesn't seem to be useful for ordering groups. Can someone please help? I am stuck and cannot move ahead without solving this issue.