Giter Site home page Giter Site logo

Comments (7)

ansyral avatar ansyral commented on August 15, 2024 1

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

from vscode-java-debug.

yaohaizh avatar yaohaizh commented on August 15, 2024 1

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

from vscode-java-debug.

fbricon avatar fbricon commented on August 15, 2024

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

from vscode-java-debug.

ansyral avatar ansyral commented on August 15, 2024

eclipse-jdtls/eclipse.jdt.ls#420

from vscode-java-debug.

supersonicclay avatar supersonicclay commented on August 15, 2024

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

from vscode-java-debug.

ansyral avatar ansyral commented on August 15, 2024

@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)

from vscode-java-debug.

supersonicclay avatar supersonicclay commented on August 15, 2024

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))

from vscode-java-debug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.