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

Add support for TestNG #21

Closed
dodie opened this issue Oct 30, 2016 · 4 comments
Closed

Add support for TestNG #21

dodie opened this issue Oct 30, 2016 · 4 comments

Comments

@dodie
Copy link
Owner

dodie commented Oct 30, 2016

Scott supports JUnit4 and 5, but It would be nice to support TestNG as well.

To achieve this, the system has to be extended in at least the following places:

  • This class is responsible to determine what methods should be instrumented to track behavior. This should be modified to mark TestNG methods as well.
  • The same class is responsible to determine what classes should be instrumented with integration to the test framework. For example in the case of JUnit4, it marks a class to be injected with a ReportingRule it the class contains a @Test method. Similarly to the first point, this should be augmented to handle TestNG code.
  • Finally, the instrumentation part of the code has to be extended to inject TestNG specific code to the tests (marked by the previous point) to handle failing test cases and print the report. See visitMethod and visitEnd in this class to see how it's handled for the JUnit4 Reporting Rule.

For more info about the architecture, please see the development guide.

@dodie dodie added this to the Release 3.0.0 milestone Nov 29, 2016
@dodie dodie removed this from the Release 3.0.0 milestone May 7, 2017
@dodie dodie removed the help wanted label May 7, 2017
@dodie dodie changed the title TestNG support Add support for TestNG Oct 17, 2017
@dodie
Copy link
Owner Author

dodie commented Aug 8, 2021

Moved to the idea list in wiki.

@dodie dodie closed this as completed Aug 8, 2021
@geofflangenderfer
Copy link

geofflangenderfer commented Mar 11, 2023

I believe TestDiscoveryMethodVisitor was renamed to DiscoveryMethodVisitor

@dodie
Copy link
Owner Author

dodie commented Mar 16, 2023

Hi @geofflangenderfer,

Yes, TestDiscoveryMethodVisitor was renamed to DiscoveryMethodVisitor as part of an API stabilization when new configuration options were introduced. May I ask where did you bump into the old name? I'd be happy to clean up obsolete documentation.

Cheers,
Dávid

@geofflangenderfer
Copy link

I was thinking about using scott with testng. This is one of the first roadblocks I ran into. I thought I would share my findings for the next person. Hopefully I have time at some point to look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants