netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Changes to fix run test issues

Open subhash-arabhi opened this issue 8 months ago • 1 comments

Changed the NBLaunchDelegate to use launchType instead of guessing it from file location. bug - #353

Similarly preferProjActions is picked up launch arguments (if available) instead of guessing it bug - #431




By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -

  • are all your own work, and you have the right to contribute them.
  • are contributed solely under the terms and conditions of the Apache License 2.0 (see section 5 of the license for more information).

Please make sure (eg. git log) that all commits have a valid name and email address for you in the Author field.

If you're a first time contributor, see the Contributing guidelines for more information.

If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.

PR approval and merge checklist:

  1. [ ] Was this PR correctly labeled, did the right tests run? When did they run?
  2. [ ] Is this PR squashed?
  3. [ ] Are author name / email address correct? Are co-authors correctly listed? Do the commit messages need updates?
  4. [ ] Does the PR title and description still fit after the Nth iteration? Is the description sufficient to appear in the release notes?

If this PR targets the delivery branch: don't merge. (full wiki article)

subhash-arabhi avatar Apr 29 '25 05:04 subhash-arabhi

So, if I open a Maven test, go to the RUN AND DEBUG tab, and press Run and Debug, it works for me before this change, but not after it. I still think acting based in the testRun setting/value if present is correct, but interpreting a missing testRun as hard false might be(?) too much. I tried to do tri-state approach here: https://github.com/subhash-arabhi/netbeans/compare/test-run-config-changes...lahodaj:netbeans:test-run-config-changes?expand=1

I.e. if testRun is missing, use "test run" if in test sources, and "run" if in main sources. Otherwise, use the testRun value. Using this, clicking on Run Main should work (as it has testRun when in test sources), but running the test should also work.

Please let me know what you think.

Thanks!

CC @dbalek @sdedic

lahodaj avatar May 16 '25 14:05 lahodaj

Unless there are objections, I would like to merge this in a few days. Thanks!

lahodaj avatar Jun 30 '25 08:06 lahodaj

@lahodaj have any tests run on this? Showing as still needing approval.

neilcsmith-net avatar Jun 30 '25 13:06 neilcsmith-net

@lahodaj have any tests run on this? Showing as still needing approval.

Right. I've approved the workflow. Tests ran on the previous iteration (which is invisible/hard to find, due to the squash requirement and hence force push), and the current iteration is exactly the same. So, I assume (read: hope) the tests will pass.

lahodaj avatar Jun 30 '25 13:06 lahodaj