-
Notifications
You must be signed in to change notification settings - Fork 72
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 #41
Comments
I have plans for a Java 8 version of this library that does not need JUnit rules. Which version of Java do you use? |
@stefanbirkner It would be cool if this library could be framework-agnostic. I use Java 8. |
It will. Unfortunately it will not be as easy to use as the rules and TestNG is does not have any extension points like rules. (http://stackoverflow.com/questions/6099633/does-testng-support-something-like-junit4s-rule) |
Which rule are you looking for foremost? |
@stefanbirkner As for now, I'm using ExpectedSystemExit. I haven't found any other way to test code that calls System.exit(). |
I keep you updated on the progress of the new library. Hopefully I can provide a first release for testing |
@stefanbirkner Thanks! |
Would this work for you: @Test
public void test() {
int statusCode = catchSystemExit(() -> {
//here comes your code that calls System.exit(...)
});
assertEquals(0, statusCode);
} |
@stefanbirkner Sure, looks right. |
I started to create a library called System Lambda that solves the same testing problems like System Rules but without a dependency to a test framework. If that solves your problem, I will not provide a specific TestNG extension. |
Are TestNG listeners suitable? http://testng.org/doc/documentation-main.html#testng-listeners |
Hi.
Is there any chance for TestNG support?
The text was updated successfully, but these errors were encountered: