-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IAnnotationTransformer: Class level @Test annotoation causes "transform()" method invocation multiple times. #2730
Comments
I think that's working as designed. The documentation may have not been updated to reflect this. This is because the annotation transformer needs to run before any other annotations are processed and so it cannot be supported via |
OK, that's reasonable, thanks for clarification. |
Hi @bj-9527 |
@David91 - Couple of questions
The implementation is such that the transformer gets called multiple times at multiple phases etc., So this could perhaps be a bit of a tricky issue to solve. |
Hi @krmahadevan
|
Ok in that case, a class that has only 1
Yes, that's correct. But it doesn't call out how many times would the transform be invoked, which is what I was alluding towards :) |
TestNG version - 7.5
Java version - 17.0.2
Build tool - Maven, surefire plugin version 3.0.0-M5
IDE -InteliJ
When
@Test
annotation is set at class level andIAnnotationTransformer
interface is implemented,transform()
method gets invocated multiple times. I saw the same issue had been reported before and got fixed, but it appears again.Here is my
testng.xml
file content attached.The Test Class
IAnnotationTransformer
implementation classAnd here is the output:
The text was updated successfully, but these errors were encountered: