-
Notifications
You must be signed in to change notification settings - Fork 557
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
TestNG support (#3263) #3672
TestNG support (#3263) #3672
Conversation
I have decided to remove all the functionality with injection of method parameters and constructor args, since TestNG life cycles do not support this dynamism. This may be achieved with a lot of reflection. I propose this iteration to include all but this functionality. |
== Usage - per method CDI container | ||
A test can be annotated as follows: | ||
|
||
`@HelidonTest(resetPerTest = true)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should not be allowed at all (and the test should fail with message saying resetPerTest
is not supported).
This whole section will not work as described, and is not much useful, when you cannot obtain a client to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly, that I had some support requests from users, that require just to restart the container on each test. With no changes to configuration. I would rather keep this option for now.
examples/integrations/cdi/jpa/src/main/resources/META-INF/microprofile-config.properties
Outdated
Show resolved
Hide resolved
examples/integrations/cdi/pokemons/src/main/resources/META-INF/microprofile-config.properties
Outdated
Show resolved
Hide resolved
...e/tests/testng/src/main/java/io/helidon/microprofile/tests/testng/HelidonTestNGListener.java
Show resolved
Hide resolved
microprofile/tests/testng/src/main/resources/META-INF/services/org.testng.ITestNGListener
Outdated
Show resolved
Hide resolved
3e9d1d6
to
5283fde
Compare
...e/tests/testng/src/main/java/io/helidon/microprofile/tests/testng/HelidonTestNGListener.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is a Draft PR for TestNG support in Helidon. Following the issue #3263
This integration provides the same functionality as the JUnit integration.
Currently there is a blocking issue in TestNG not allowing automatic object instantiation.
testng-team/testng#2676
Thus, it is it is a good idea to wait for release 7.5.0 of TestNG
Update: Using TestNG 7.5.0.