★ wanayoo — archive 1999 https://github.com/microsoft/vscode-java-debug/issues/76Nouvelle recherche | Portail wanayoo
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

[Junit] Junit support for java debug #76

Closed
andxu opened this issue Sep 29, 2017 · 7 comments
Closed

[Junit] Junit support for java debug #76

andxu opened this issue Sep 29, 2017 · 7 comments
Assignees
Milestone

Comments

@andxu
Copy link
Contributor

@andxu andxu commented Sep 29, 2017

No description provided.

@fbricon
Copy link
Collaborator

@fbricon fbricon commented Sep 29, 2017

This relates to eclipse/eclipse.jdt.ls#172

@yaohaizh yaohaizh modified the milestones: 0.2.0, 0.4.0 Oct 9, 2017
@akaroml akaroml modified the milestones: 0.4.0, 0.3.0 Oct 17, 2017
@akaroml akaroml assigned ansyral and unassigned andxu Oct 17, 2017
@akaroml akaroml mentioned this issue Oct 26, 2017
6 of 6 tasks complete
@ansyral
Copy link
Contributor

@ansyral ansyral commented Oct 30, 2017

1 language server generate and resolve junittest codelens
2 investigate junit interface for invoking a test in commandline
3 customized junit test runner which could run/debug test suites and print test structure and test duration, test status(failure with stacktrace)
4 vscode extension adds commands for junittest run/debug codelens

@ansyral
Copy link
Contributor

@ansyral ansyral commented Nov 5, 2017

@supersonicclay
Copy link

@supersonicclay supersonicclay commented Nov 6, 2017 •

Regarding 2. JUnitCore allows for running a single class. But it looks like you might need another solution in order to run a specific method.

There's also a --filter parameter, but I don't know that JUnit natively has support for running a single method. Relevant PR: junit-team/junit4#647

@ansyral
Copy link
Contributor

@ansyral ansyral commented Nov 7, 2017

@claycephas JunitCore doesn't provide a way to run a single test, so we have to provide a customized junit runner. About how to run a single test, i 'm thinking to use this method : http://junit.sourceforge.net/javadoc/org/junit/runner/Request.html#method(java.lang.Class, java.lang.String)

@supersonicclay
Copy link

@supersonicclay supersonicclay commented Nov 7, 2017 •

Yes, I think you could use the Request class together with JUnitCore. Something like this.

When running a single method from method code lens:

new JUnitCore().run(Request.method(MyClass.class, "methodName"))

When running an entire class from class code lens:

new JUnitCore().run(Request.aClass(MyClass.class))
@ansyral ansyral modified the milestones: 0.3.0, 0.4.0 Nov 13, 2017
@andxu andxu mentioned this issue Nov 17, 2017
4 of 6 tasks complete
@yaohaizh
Copy link

@yaohaizh yaohaizh commented Dec 5, 2017

This feature is on This feature is on https://github.com/Microsoft/vscode-java-test

@yaohaizh yaohaizh closed this Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.