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

Run test under another folder than test is not working #35

Closed
GregoryBevan opened this issue Apr 9, 2019 · 8 comments · Fixed by #36
Closed

Run test under another folder than test is not working #35

GregoryBevan opened this issue Apr 9, 2019 · 8 comments · Fixed by #36

Comments

@GregoryBevan
Copy link

Hi,

I'm not pretty sure the problem I'm going to describe is due to jupiter-interface, but things gone well before migrating from JUnit 4 to JUnit 5.

In our project, we have two tests folders, the first one for unit test and the other for integration tests. Sbt has been configured to handle these two folders, but when I run the following command, sbt it:test, no tests are launched.

I've tried different sbt configuration without success, and I think maybe the jupiter launcher doesn't take the it-classes folder in its classloader for test scanning.

I have a sample project to reproduce the problem, junit5-sbt.

Thank you for your help even if you think the problem is not coming from your plugin.

@maichler
Copy link
Contributor

Hi,

it could be a classloading issue, I will look into it asap.

Thank you for providing such a detailed description !

@maichler
Copy link
Contributor

@GregoryBevan Problem is that plugin specific tasks get not added to your custom configuration. PR #36 makes JupiterPlugin.scopedSettings public so that it can be accessed. Could you please test with a local build from branch wip-ticket-36 (publishLocal and then reference version 0.8.2-SNAPSHOT in your project).

There are new test cases in src/plugin/sbt-test/basic, finds-test-from-extended-config and finds-test-from-it-config which you can use as reference.

Thx!

@GregoryBevan
Copy link
Author

Thank you for your work. I could only test it on monday, not at work today.

@maichler
Copy link
Contributor

maichler commented Apr 12, 2019 via email

@GregoryBevan
Copy link
Author

Hi Michael,

I've just tried to run integration tests with the last snapshot version, and it works.

Thank you

@maichler
Copy link
Contributor

Great !

Then I'm going to merge #36 and release another version.

@GregoryBevan
Copy link
Author

Thank you for the fast release. I'm going to use it right now.

@maichler
Copy link
Contributor

Binaries for 0.8.2 should be available now.

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

Successfully merging a pull request may close this issue.

2 participants