Skip to content
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

Merged
merged 4 commits into from
Feb 2, 2022

Conversation

dalexandrov
Copy link
Contributor

@dalexandrov dalexandrov commented Nov 25, 2021

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.

@dalexandrov
Copy link
Contributor Author

dalexandrov commented Jan 18, 2022

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.

@dalexandrov dalexandrov marked this pull request as ready for review January 18, 2022 17:38
@dalexandrov dalexandrov self-assigned this Jan 19, 2022
== Usage - per method CDI container
A test can be annotated as follows:

`@HelidonTest(resetPerTest = true)`
Copy link
Member

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.

Copy link
Contributor Author

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.

microprofile/tests/testng-tests/pom.xml Outdated Show resolved Hide resolved
@tomas-langer tomas-langer added the dependencies Pull requests that update a dependency file label Feb 2, 2022
Copy link
Member

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dalexandrov dalexandrov merged commit c9d3dc3 into helidon-io:master Feb 2, 2022
@dalexandrov dalexandrov deleted the 3263_TestNG_Support branch February 2, 2022 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants