-
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
Add BeforeClass/AfterClass like on ITestListener #776
Labels
Comments
You are asking a listener way to do @BeforeClass and @afterclass, isn't it? |
Exactly. Without the need to touch my test classes. It should be transparently available to them without requiring specific superclasses etc. |
Would you like to try to add it yourself and propose it? |
juherr
changed the title
add onTestClass event to ITestListener
Add BeforeClass/AfterClass like on ITestListener
Aug 6, 2015
I'll check with my manager :). |
cbeust
added a commit
that referenced
this issue
Nov 5, 2015
Fix issue #776: Add IClassListener, a @BeforeClass/@afterclass alternative
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be great, if the ITestListener would offer a method that is invoked, when a Test Class is created and gets executed.
I'm trying to write a TestNG listener that is fired once on each test class to print the test class name to the log/console. I tried it with ITestListener onTestStart(), but this is called per test - as the name states. To log only once, I would have to synchronize it somehow when e.g. running in a multithreaded test (threadPoolSize=..) - otherwise it would log n times (once per thread).
Referencing this discussion:
http://testng.1065351.n5.nabble.com/Getting-an-event-when-test-class-is-created-td21715.html#a21735
The text was updated successfully, but these errors were encountered: