microsoft / vscode-java-test

Run and debug Java test cases in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-test
Other
297 stars 131 forks source link

Can't choose configuration when default is set #1742

Open mlau-anet opened 1 week ago

mlau-anet commented 1 week ago

Sometimes I want to append coverage, sometimes I do not.

If I specify the settings

    "java.test.config": [{
        "name": "don't append coverage",
        "coverage": {"appendResult": false}
    },
    {
        "name": "do append coverage",
    }
    ],

Then I can choose whether to append or not. But usually I do want to append, so I will set this as the default:

    "java.test.config": [{
        "name": "don't append coverage",
        "coverage": {"appendResult": false}
    },
    {
        "name": "do append coverage",
    }
    ],
    "java.test.defaultConfig": "do append coverage"

unfortunately, with these settings, I do not see an option run with the "don't append coverage" option. Is this possible, or do I have to change the defaultConfig setting every time I want to change the config I'm running with?

jdneo commented 1 week ago

Currently there might be no perfect solution for your problem. You can remove the setting java.test.defaultConfig, then you can choose test config each time you launch the test.

Does this help with your problem?