microsoft / microsoft/vscode-java-test
Java Test Runner not recording any test output
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 340
- Fork
- 173
- Merge medio
- 1g 19h
- PR unite (30g)
- 18
Descrizione
When I first try to execute all JUnit tests, I receive this on the Debug Console:
After cleaning the Gradle project with "./gradlew clean build --refresh-dependencies" and trying to run the tests again, it tells me that my build has failed.
Here is my current build.gradle.kts file:
plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id("java")
application
id("org.openjfx.javafxplugin") version "0.1.0"
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
dependencies {
// Use JUnit Jupiter for testing.
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
// https://mvnrepository.com/artifact/org.mockito/mockito-core
testImplementation("org.mockito:mockito-junit-jupiter:5.15.+")
}
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
sourceSets {
named("main") {
java {
setSrcDirs(listOf("src/main/java"))
}
}
}
}
javafx {
version = "21.0.6"
modules("javafx.controls", "javafx.fxml")
}
application {
// Define the main class for the application.
mainClass = "main"
}
tasks.named<Test>("test") {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}
I tried reloading my project, cleaning java language workspace etc. nothing seemed to change anything.
Important to note is that on a completely different cloned repository with the same gradle configurations, everything works fine.
Would appreciate any help with this, otherwise I'll stick to IntelliJ with the testing.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Il rapporto indica il Java Test Runner e il build.gradle.kts del progetto, con i test JUnit eseguiti tramite Gradle. Inizia riproducendo l’esecuzione dei test e controllando l’output di Debug Console e della build di Gradle; il lavoro è completato quando viene identificato il motivo per cui questo progetto non registra alcun output dei test e viene ripristinata l’esecuzione corretta dei test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, typescript
- Ambito
- testing
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 28/100