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

2 test runs created for the same build #41

Closed
atodorov opened this issue Apr 3, 2019 · 2 comments
Closed

2 test runs created for the same build #41

atodorov opened this issue Apr 3, 2019 · 2 comments
Assignees

Comments

@atodorov
Copy link
Member

atodorov commented Apr 3, 2019

With the new auto-discovery changes the plugin seems to create 2 test runs for the same build:
https://tcms.kiwitcms.org/runs/125/
https://tcms.kiwitcms.org/runs/126/

from what I can tell each test run references the results from a separate .java file, however all of these results must be in the same test run.

The fact that both files and test classes are named very similarly desn't help either.

Note: README probably needs to be updated with some instructions how to use the auto-discovery mechanism.
Question: Is auto-discovery compatible with the @ExtendWith decorator?

@apetkova
Copy link
Collaborator

apetkova commented Apr 10, 2019

  • The PR addresses the multiple runs.
  • Re-question: Yes, auto-discovery can work with the declaration, it just makes it redundant
  • Re-README: It'd be nice if someone else can help with that; Here's the info that needs to be added re-auto loading (needs rephrasing, as this is taken from a blog post):

Automatic, Global Registration
If you have an extension that you think needs to be registered with all tests in a suite, don’t bother adding it everywhere – that’s what the registration via service loader is there for. Simply let your extension JAR proclaim that it provides implementations of org.junit.jupiter.api.extension.Extension and Jupiter picks it up.
Automatic registration is turned off by default, so you first need to configure Jupiter to auto-detect extensions by setting junit.jupiter.extensions.autodetection.enabled to true. While your at it, consider requiring explicit activation for your extension with your own parameter (you can query it with the store’s getConfigurationParameter method). This way you can use your extension JAR without all global extensions being registered all the time.

*Jupiter = JUnit 5

@atodorov
Copy link
Member Author

Fixed in #47

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