Comments (4)
You will see something like this currently if you try to use the standard JUnit launcher:
Class not found demo.apple.api.AppleTest
java.lang.ClassNotFoundException: demo.apple.api.AppleTest
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:773)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:502)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:525)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
from bazel-eclipse.
An alternate solution was implemented as #38 which provides most of what this issue is asking for. It specifically addressed the Package Explorer context menu, right-click use case.
from bazel-eclipse.
See also #251 which calls for an overhaul of how we launch tests.
from bazel-eclipse.
The work done in PR #262 eliminates the previous approach of having a custom launcher for Bazel JUnit tests.
There is some confusion in communicating the exact approach to users though. Technically, I implemented a launchDelegate that gets injected into the standard Eclipse JUnit launcher. However, when the user first launches a JUnit test in a Bazel workspace, they UI asks them to choose the "Launcher", and the two choices are Eclipse or Bazel. But they aren't actually choosing the launcher impl, they are choosing the delegate.
<extension
point="org.eclipse.debug.core.launchDelegates">
<launchDelegate
name="Bazel JUnit"
modes="run, debug"
delegateDescription="The Bazel JUnit Launcher *must* be used for launching JUnit tests in a Bazel workspace. See the Bazel Eclipse Feature launcher documentation for more details."
type="org.eclipse.jdt.junit.launchconfig"
delegate="com.salesforce.bazel.eclipse.launch.BazelJunitLaunchConfigurationDelegate"
id="bazel.junit.launcher">
</launchDelegate>
</extension>
from bazel-eclipse.
Related Issues (20)
- BEF: package cannot be imported if source directories are nested within each other HOT 2
- JDK configuration errors: "IllegalArgumentException: external/local_jdk", "Unable to locate a Java Runtime." HOT 2
- Support development with lombok
- Support JDT external annotations files HOT 1
- BEF: Implement TestNG support
- Bazel header jars are appearing in the Global Search Index
- BEF: Support the New Project wizard
- LSP gives an exception on the following bazel project HOT 2
- UI Freeze due to heavy logging in UI thread while resolving classpath HOT 1
- Use Maven Wrapper to avoid having to have (the right version of) Maven installed to build this project
- mvn clean => Cannot invoke "org.apache.maven.repository.internal.ModelCacheFactory.createCache(org.eclipse.aether.RepositorySystemSession)" because "this.modelCacheFactory" is null HOT 1
- Java 17 Support HOT 4
- requires 'osgi.bundle; org.eclipse.jdt.ls.core 0.0.0' but it could not be found HOT 3
- ERROR: Unable to find package for @[unknown repo 'bazeljavasdk_aspect' requested from @]//:bzljavasdk_aspect.bzl: The repository '@[unknown repo 'bazeljavasdk_aspect' requested from @]' could not be resolved: No repository visible as '@bazeljavasdk_aspect' from main repository. HOT 4
- Wrong Source Folder (despite src/main/java) HOT 3
- Classpath containers empty in Bazel 6.0 HOT 1
- Missing support for Auto Value Annotation Processor
- java.io.ioexception cannot run c:\msys64\usr\bin create process error 5 access denied HOT 1
- Bazel could not find information about selected project HOT 1
- Importing Gerrit bazel workspace fails with IllegalThreadStateException HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bazel-eclipse.