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

Provide an easy way to run Java tests without AppMaps #990

Open
dividedmind opened this issue Jul 30, 2024 · 0 comments
Open

Provide an easy way to run Java tests without AppMaps #990

dividedmind opened this issue Jul 30, 2024 · 0 comments

Comments

@dividedmind
Copy link
Contributor

When running tests in a Java project, the test environment is automatically configured to run with AppMap; this is handy (even if a bit magic and unexpected; it would be nice to get a message about that, I didn't know so I spent a couple minutes trying to figure out how to configure it until I just ran the tests and noticed it was already taken care of), but there is no easy way to turn it off. For example, if I have failing tests, I might want to run them without AppMap to check if it could affect them.

The way this currently works is that it adds a test config in the project settings:

{
  "java.test.config": [
    {
      "name": "Test with AppMap",
      "vmArgs": [
        "-javaagent:${userHome}/.appmap/lib/java/appmap.jar",
        "-Dappmap.output.directory=${command:appmap.getAppmapDir}"
      ]
    }
  ]
}

(I wonder what it does if there's already a test config). In principle, we could add another configuration (eg. "Test without AppMap"), but I tried this and this is super annoying (it asks you to pick on every test suite, which can be many times in a row if you run tests on a whole multi-project repo). Perhaps we could provide a switch instead (eg. in the status bar).

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

1 participant