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

Notify jUnit of test system exceptions #716

Merged
merged 4 commits into from Apr 23, 2015

Conversation

Projects
None yet
2 participants
@fhoeben
Contributor

fhoeben commented Apr 17, 2015

Pass information on test system exceptions to jUnit's RunNotifier, also reporting if tests were skipped because of this, #714.
Furthermore allow subclasses of FitNesseRunner to control which listeners are used in a test run.

@@ -27,4 +40,35 @@ protected FitNesseContext createContext(Class<?> suiteClass) throws Exception {
return super.createContext(suiteClass);
}
}
public static class ListenerExtension extends JUnitRunNotifierResultsListener {

This comment has been minimized.

@amolenaar

amolenaar Apr 18, 2015

Collaborator

Why this subclass?

This comment has been minimized.

@fhoeben

fhoeben Apr 19, 2015

Contributor

I actually used it to test (with debugger) that my behavior was called. I apologize for such a rude form of testing. I could have just deleted it.

@amolenaar

This comment has been minimized.

Collaborator

amolenaar commented Apr 18, 2015

Looks good. How can I test it?

@amolenaar amolenaar added this to the Next release milestone Apr 18, 2015

@fhoeben

This comment has been minimized.

Contributor

fhoeben commented Apr 19, 2015

I was wondering about that myself. In my real-world environment I had a test that caused Slim to be aborted. But I don't think I can introduce that in the unit-test set of FitNesse, without breaking its unit test suite.

Maybe we can use an in-memory wiki-page, combined with a mock notifier. But I saw no way to easily wire that up, not in any way that was proportional in complexity to the change itself. Do you see a way to do that?

I did not think just calling the method directly (i.e. NOT in context of a run by MultipleTestsRunner) and seeing that the notifier was called (i.e. a true unit-test) was a test that added much value. That could easily be done, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment