Skip to content

Run test with maven profiles that i need #1788

Closed as not planned
Closed as not planned

Description

@Jeik64

Case. I need to debug test on different env and in this case i need to change my maven profile, via running it with terminal i just add -PPROFILENAME, but i cant do it in your extension. Also i can switch profile in maven extesion, but it doest apply for tests.

Activity

  1. github-actions commented on Nov 13, 2025

    @github-actions

    Hi Jeik64, I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

    Suggestions

    • Currently the Java Test Runner does not support passing Maven profiles when running or debugging tests in the editor. You can:

      • Use the built-in Maven extension or a terminal task to invoke mvn test -P<profileName> or mvn surefire:test -P<profileName> and attach the debugger manually.
      • Create a custom VS Code preLaunchTask in .vscode/launch.json that runs Maven with -P<profileName> before starting a debug session.
    • Track and upvote the feature request:

    Other references with low confidence

    The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

  2. jimisola commented on Nov 13, 2025

    @jimisola

    Please reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions