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

Consider magically adding @Testable to JMH annotations #15

Open
sbrannen opened this issue Dec 18, 2018 · 1 comment
Open

Consider magically adding @Testable to JMH annotations #15

sbrannen opened this issue Dec 18, 2018 · 1 comment

Comments

@sbrannen
Copy link
Contributor

The README suggests that users manually add @Testable to benchmark methods.

That of course works; however, it would be nice if @Testable could be magically added to annotations such as @Benchmark transparently for the user -- for example, by modifying the byte code when such annotation classes are loaded, such as via a ClassFileTransformer.

Just a thought...

@mp911de
Copy link
Owner

mp911de commented Dec 18, 2018

Thanks for raising the issue. This would work for non-IDE environments such as Maven/Gradle plugins. In our case, we need to cheat the IDE.

Typically, IDE's use files under META-INF (such as Spring Boot) for static extension information that allow 3rd party implementors to provide metadata for components that are not under their control. JUnit platform assumes that test method/test class annotations are under control of the TestEngine author so she can add @Testable onto these.

Right now, @Testable is an initial cosmetic problem that requires to launch an entire benchmark first to then select the desired benchmark to run. Our JUnit 4 integration allows launching every method as soon as a custom Runner is associated (at least for IntelliJ).

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