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

args being ignored #1699

Open
dbmckie opened this issue Jun 13, 2024 · 1 comment
Open

args being ignored #1699

dbmckie opened this issue Jun 13, 2024 · 1 comment

Comments

@dbmckie
Copy link

dbmckie commented Jun 13, 2024

I have set the following configuration in settings.json:

"java.test.config": {
    "coverage": {
        "appendResult": false
    },
    "testKind": "junit",
    "args": ["--exclude-package=test.package.to.ignore"]
}

But it does not appear that the args array is being passed to the test runner. From the logs:

INFO: Trying to launch Java Program with options:
main-class: org.eclipse.jdt.internal.junit.runner.RemoteTestRunner
args: -version 3 -port 64185 -testLoaderClass org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader -loaderpluginname org.eclipse.jdt.junit5.runtime -testNameFile C:\Users\user\AppData\Local\Temp\testNames3476799342913323661.txt
module-path:
class-path:
vmArgs: -ea -Dfile.encoding=UTF-8 -cp "C:\Users\user\AppData\Local\Temp\cp_a9xn9vku4dypkzk1huwivwhyw.jar"

@dbmckie
Copy link
Author

dbmckie commented Jun 13, 2024

Tested with

"args": [
    "--exclude-tag=test_tag",
    "--exclude-tag", "test_tag"
]

Output:
args: -version 3 -port 64962 -testLoaderClass org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader -loaderpluginname org.eclipse.jdt.junit5.runtime -testNameFile C:\Users\user\AppData\Local\Temp\testNames12627821658992615585.txt

to compare with

"filters": {
    "tags": ["!test_tag"]
}

Output:
args: -version 3 -port 64633 -testLoaderClass org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader -loaderpluginname org.eclipse.jdt.junit5.runtime -testNameFile C:\Users\user\AppData\Local\Temp\testNames590903279624443577.txt --exclude-tag test_tag

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