-
Notifications
You must be signed in to change notification settings - Fork 874
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
support running tests from non default test folders #4924
Conversation
@neilcsmith-net : You pointed a week ago how to fix that issue and in fact it simplifies the fix. Can you maybe have a look again? |
@Honza-cz thanks for the contribution. Kicked off tests and requested reviews. Some of us tied up with finalising NB16 release at the moment, so might take a little while. |
packClassname.append(test | ||
.stream() | ||
.map(String::trim) | ||
.collect(Collectors.joining(",")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check whether syntax with comma-separated package names (not paths) works in ancient Surefire version - according to docs, there were some significant changes in Surefire 2.19. We recommend Surefire 2.22 for Junit5, and surefire 2.8 (which may fail with this syntax) for single test run. See org.netbeans.modules.maven.ActionProviderImp::checkSurefire
for details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a test with junit:4.12 and maven-surefire-plugin:2.8. In Netbeans I selected 2 packages and execute them. It generated -Dtest=some.it.pkg.other.**,some.it.pkg.**
and it run the tests in those packages as expected:
Running some.it.pkg.ItTest ... Running some.it.pkg.other.It3Test ...
Is a such manual test enough?
.../maven/test/unit/src/org/netbeans/modules/maven/execute/DefaultReplaceTokenProviderTest.java
Show resolved
Hide resolved
let me know in case of any doubts. thx in advance. @sdedic , @neilcsmith-net |
@sdedic , @neilcsmith-net : any update? This fix will help me in my day-to-day job to be able to run the tests by IDE directly and not by maven which is ok, but a bit unnecessary. |
@neilcsmith-net, @sdedic : Kind reminder |
Apologies - pings lost in the mail traffic. Looks good; thanks for the patience / persistence. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me too.
PR is reviewed and it looks like all questions were sufficiently answered. Tests are included which cover this change and everything is green.
@Honza-cz congrats to your first contribution -> merging
squashing locally + rebase force push. will merge when green on all tests - don't want to risk anything one day before freeze. |
…olders which were added by maven plugin: build-helper-maven-plugin/add-test-source
90126ff
to
9ecdd96
Compare
Netbeans are not able to run the test in extra test source folder added by
build-helper-maven-plugin
maven plugin ...If I run the test by Ctrl+F6, netbeans is not able to replace
packageClassName
by a test nameAfter fix:
The updated code is covered by UT.
This pull request is linked to my previous one which I decided to close due to wrong fix.