microsoft / microsoft/vscode-java-test

Support Customized JUnit5 TestEngine that reads test-scenarios from .json files

Open
#1,312 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged enhancement junit question test-discovery
Dominant language
TypeScript
Stars
340
Forks
173
Avg merge
1d 19h
Merged PRs (30d)
18

Description

Referenced from @emyklebost:

Hello. I've created a custom JUnit5 TestEngine that reads test-scenarios from .json files. I would like to run these tests in vscode using the junit-platform-console-standalone.jar without a build tool. I am able to do this manually using PowerShell, e.g.: java -jar junit-standalone.jar -cp engine.jar -f test/my.test.json

I've added the Extension Pack for Java and the following in settings.json:

{
    "java.project.referencedLibraries": [
        "engine.jar",
        "junit-standalone.jar"
    ],
}

No tests are discovered in the Testing side-bar and nothing happens when clicking Run Tests. Any suggestions?

I've created a branch with my vscode setup and some screenshots as examples: https://github.com/emyklebost/fhir-tdp/tree/vscode-integration

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked vscode-integration branch and reproducing the setup from settings.json with engine.jar, junit-standalone.jar, and test/my.test.json. Compare the manual PowerShell console command with test discovery and Run Tests in the Testing sidebar; done means the customized JUnit5 TestEngine is discovered and its JSON scenarios can be run in VS Code without a build tool.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.