Skip to content

Junit tests start configuration vmArg issue #476

Closed

Description

Dear community,

Started using java on vs code, but seems launch.test.json does not work for me.
I added such options:

{
    "run": {
        "default": "",
        "items": [
            {
                "name": "MyLib",
                "projectName": "MyLib",
                "workingDirectory": "c:\\Users\\User\\MyLib",
                "args": ["-Xms2G","-Xmx2G"],
                "vmargs": ["-Xms2G","-Xmx2G"],
                "env": {},
                "preLaunchTask": ""
            }
        ]
    },
    "debug": {
        "default": "",
        "items": [
            {
                "name": "MyLib",
                "projectName": "MyLib",
                "workingDirectory": "c:\\Users\\User\\MyLib",
                "args": ["-Xms2G","-Xmx2G"],
                "vmargs": ["-Xms2G","-Xmx2G"],
                "env": {},
                "preLaunchTask": ""
            }
        ]
    }
}

But after running test java does not take either args or vmargs to consideration.

Activity

  1. akaFalsh commented on Nov 29, 2018

    @akaFalsh
    Author

    for launch.json everything works fine, but for Tests does not.
    I am using VS Code 1.29.1 latest java test runner

  2. jdneo commented on Nov 30, 2018

    @jdneo
    Member

    If you are triggering the test from Code Lens. You need to set the default field to the configuration item name to make it work.

    For example, here set the default to MyLib

  3. jdneo commented on Jan 22, 2019

    @jdneo
    Member

    Closing this issue since the experience of running/debugging with configuration has been changed.

    More details can be found here: https://aka.ms/java-test-config

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions