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

Events for @BeforeClass and @AfterClass in JSON output #61

Open
stanislawosinski opened this issue Feb 19, 2012 · 4 comments
Open

Events for @BeforeClass and @AfterClass in JSON output #61

stanislawosinski opened this issue Feb 19, 2012 · 4 comments

Comments

@stanislawosinski
Copy link
Contributor

If the execution of @BeforeClass and @afterclass code was marked in the executionEvents array, we'd be able to insert the right markers in the console output report. Currently, there's no reliable way to correctly attribute the non-test output events.

@ghost ghost assigned dweiss Feb 19, 2012
@dweiss
Copy link
Contributor

dweiss commented Feb 19, 2012

Sadly, there is no way to do it in the general case without altering JUnit. These are simply transparent -- there is even no way to easily distinguish class level and instance level hooks (or rules). We could add it in our own runner but it wouldn't be generally available for other runners.

@dweiss
Copy link
Contributor

dweiss commented Feb 19, 2012

I'm moving this to 2.0.0, but I think this isn't going to be possible without altering JUnit internals (or using runtime code transformations like aspect weaving).

@stanislawosinski
Copy link
Contributor Author

Ok, let's leave it for now. I could extrapolate this information to some extent, but it could be misleading.

@dweiss
Copy link
Contributor

dweiss commented Feb 19, 2012

No, don't try to estimate anything -- this will be confusing. The timestamps of "here the test started and here it ended" are all right and correct. The console output is complete (or should be!); if there's out-of-context output then it's a pity; somebody will have to correct his or her tests, we shouldn't try to cater for entirely broken code.

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

No branches or pull requests

2 participants