--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/f4nrUfFOUkoJ.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
That is what I thought too. I found the behavior varies between which type of parallel run you use though when it comes to how or when global variables are initialized. In any case I choose to try something I found on the forum and that was simply@AfterMethodpublic void freeData (ITestResult tr) {String host = (String) tr.getParameters()[0];Host.freeHost(host);}Now the other problem I have though. Is there a way to make an AfterMethod run only when a specific DataProvider has been called?
Ah I missed the parallel bit.Then store these values in a ThreadLocal field?
Hi
I’m wondering if it is possible to create my own annotation, which will be picked up by test-ng? Kind of extending the @Test annotation in a way test-ng recognize it.
So my test methods would look something like this.
@MyTestMethod
public void testSomething(){
// test-something
}
/Alex
We use our own testautomation framework with its own annotations. This framework uses test-ng in the background and adds functionality on top of test-ng. Which means the number of annotations per test-method is increasing. I was trying to minimize the number of annotations needed per test-method.
It was just a though, and nothing of priority.
Thanks for the answer.
/Alex