I was trying to implement IAnnotationTransformer2 based listener for my
TestNG Factory. Right now though my factory runs multiple testcases,
the listener only gets called once. it calls both of the following
method once
public void transform(ITestAnnotation annotation, Class
testClass,Constructor testConstructor, Method testMethod)
public void transform(IFactoryAnnotation arg0, Method arg1)
but I was expecting it to call them once for each testcase.
just to give you guys context, I am trying to transform group
annotations for each of my @factory testcase.
is there some other way to achieve it?
Best,
Pranav
on second thoughts, this is never suppose to happen, coz if I understand
right, testng scans/loads annotations at the start, hence transforming
should happen at that time only....and I wanted to change them during
the test run. It probably against the design to up[date the annotations
during test execution... can somebody please confirm that ?
Best,
Pranav
> **/*Cédric*
> /
>
Are there any other plugins available to integrate Maven with TestNG?
Though, I've managed to do the same using ITestListener, which is
working fine. Actually, I just wanted to log following:
--- <TestMethodName> : START ---
before test and following:
--- <TestMethodName> : END ---
after test.
You might ask why I didn't use @Before and @After annotations, thats
because I didn't find a way to get the actual test method name
Thanx for the pointer.
I am using 5.9, which does not supports ITestResult parameter
injection in @AfterMethod and I tried using Method parameter injection
and it works ! However, nowhere in the doc
(http://testng.org/doc/documentation-main.html#dependency-injection)
is mentioned that @AfterMethod also supports Method parameter
injection.