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

debugging tests can't find any source code, even the test that's running #490

Closed
2 tasks done
dabraham02124 opened this issue Apr 17, 2020 · 5 comments
Closed
2 tasks done

Comments

@dabraham02124
Copy link

Problem Statement

When I debug a test, it can't find the code for the project, even the code that is the test that I'm running.

This happened when I updated my testng plugin recently (I don't know what I had before I updated, but several months old). Since then I've tried updating to the latest beta of the plugin (BTW, the run/debug buttons in the code are neat, thank you). Still there.

Then I tried uninstalling, then reinstalling the latest release, still there.

I can get around it for a specific debug target, by clicking on the "Edit Source Lookup Path..." button, then "Add...", then "Java Project", click the box next to the name of the project that my test is in, then "OK", then "OK".

It continues to work if I debug that specific target again. But if I debug anything else, even another test in the same file, I have to go through the rigamarole again.

Any relate message in "Error Log" view

"Windows -> Show View -> Others -> Error Log"

Since I reinstalled the last time, when I filter on "test" the only thing that I see is "[TestNGLaunchConfigurationDelegate] Launching:"

The Dependency Management tool for your project

  • Maven

Operating System

  • OSX

Eclipse

Version: 2020-03 (4.15.0)
Build id: 20200313-1211

@missedone
Copy link
Collaborator

thanks @dabraham02124 for reporting this, i can reproduce this on Eclipse 2020-03 as well. probably this new Eclipse version changed something internally.
haven't look in depth yet.

@gayanper, could you like to have a try to fix this issue?

Thanks
Nick

@gayanper
Copy link
Contributor

Please switch the m2e snapshots this should be fixed there. This is a m2e bug.

@dabraham02124
Copy link
Author

@gayanper thank you very much, yes, that did it.

For the next person who bumps into this, I updated m2e from 1.15.0.20200310-1832 to 1.16.0.20200416-1943 by installing from here.

What I did (which may be overly paranoid, but worked) was:

  1. uninstall the testng plugin & restart eclipse
  2. update m2e with the link above & restart eclipse
  3. install the testng plugin & restart eclipse

@gayanper
Copy link
Contributor

@dabraham02124 simply upgrading the m2e will be sufficient as well 🙂

@missedone
Copy link
Collaborator

Thank you @gayanper

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

3 participants