Test attribute dependsOnMethods not honored when running tests individually
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- java, typescript, vscode
- Área
- developer-experience, testing
Línea de trabajo
Comienza reproduciendo un método TestNG ejecutado individualmente con una relación dependsOnMethods en la VS Code Java Test extension; después, sigue la selección a través de TestNGRunner y TestNGLauncher hasta el fallo de MethodHelper. Se considera terminado cuando el método seleccionado ejecuta primero su dependencia, en lugar de informar de que la dependencia no está incluida.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
In eclipse, when you run a test individually and it depends on another test, it runs that other test first and then runs the test that has the dependency.
With the VSCode plugin, it does not appear to do this successfully. Instead it fails to find the dependency method:
[ INFO ] 2024-03-15 08:28:14.586 DefaultTestContextBootstrapper:174 - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@25e2ab5a, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@35e5d0e5, org.springframework.test.context.event.ApplicationEventsTestExecutionListener@73173f63, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@55562aa9, org.springframework.test.context.support.DirtiesContextTestExecutionListener@655ef322, org.springframework.test.context.event.EventPublishingTestExecutionListener@7e276594]
Exception occured while running tests.
org.testng.TestNGException:
com.oreilly.yeti.tests.shippingServiceTest.organizationControllerTest.OrganizationControllerPositiveTest.getOrganizationById_expect_200() is depending on method public void com.oreilly.yeti.tests.shippingServiceTest.organizationControllerTest.OrganizationControllerPositiveTest.getOrganization_allOrgs_expect_200(), which is not annotated with @Test or not included.
at org.testng.internal.MethodHelper.findDependedUponMethods(MethodHelper.java:141)
MethodHelper.java:141
at org.testng.internal.MethodHelper.topologicalSort(MethodHelper.java:284)
MethodHelper.java:284
at org.testng.internal.MethodHelper.sortMethods(MethodHelper.java:382)
MethodHelper.java:382
at org.testng.internal.MethodHelper.lambda$collectAndOrderMethods$1(MethodHelper.java:75)
MethodHelper.java:75
at org.testng.util.TimeUtils.computeAndShowTime(TimeUtils.java:45)
TimeUtils.java:45
at org.testng.internal.MethodHelper.collectAndOrderMethods(MethodHelper.java:71)
MethodHelper.java:71
at org.testng.TestRunner.computeAndGetAllTestMethods(TestRunner.java:557)
TestRunner.java:557
at org.testng.internal.TestMethodContainer.getItems(TestMethodContainer.java:32)
TestMethodContainer.java:32
at org.testng.internal.TestMethodContainer.getItems(TestMethodContainer.java:14)
TestMethodContainer.java:14
at org.testng.TestRunner.initMethods(TestRunner.java:526)
TestRunner.java:526
at org.testng.TestRunner.init(TestRunner.java:335)
TestRunner.java:335
at org.testng.TestRunner.init(TestRunner.java:288)
TestRunner.java:288
at org.testng.TestRunner.<init>(TestRunner.java:178)
TestRunner.java:178
at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:639)
SuiteRunner.java:639
at org.testng.SuiteRunner.init(SuiteRunner.java:225)
SuiteRunner.java:225
at org.testng.SuiteRunner.<init>(SuiteRunner.java:115)
SuiteRunner.java:115
at org.testng.TestNG.createSuiteRunner(TestNG.java:1349)
TestNG.java:1349
at org.testng.TestNG.createSuiteRunners(TestNG.java:1325)
TestNG.java:1325
at org.testng.TestNG.runSuitesLocally(TestNG.java:1167)
TestNG.java:1167
at org.testng.TestNG.runSuites(TestNG.java:1099)
TestNG.java:1099
at org.testng.TestNG.run(TestNG.java:1067)
TestNG.java:1067
at com.microsoft.java.test.runner.testng.TestNGRunner.run(TestNGRunner.java:45)
at com.microsoft.java.test.runner.testng.TestNGLauncher.execute(TestNGLauncher.java:32)
at com.microsoft.java.test.runner.Launcher.main(Launcher.java:57)
- It would be nice to just be able to click and run single methods that have dependencies instead of having to run the whole test class.
- Lenguaje dominante
- TypeScript
- Estrellas
- 340
- Forks
- 173
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 17
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/vscode-java-test
-
ai-triaged bug investigating junit test-discovery test-execution
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
microsoft/vscode-java-test#1897 · 1 comentario ·
-
ai-triaged bug gradle high-priority test-execution
microsoft/vscode-java-test#1880 · 2 comentarios · 1 asignado ·
-
ai-triaged gradle junit test-execution ux
microsoft/vscode-java-test#1878 · 3 comentarios · 1 asignado ·
-
ai-triaged enhancement junit low-priority test-execution ui
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
microsoft/vscode-java-test#1836 · 4 comentarios ·
-
ai-triaged enhancement gradle investigating junit low-priority test-reporting
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
microsoft/vscode-java-test#1824 · 1 comentario ·
Todos los issues de microsoft/vscode-java-test
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Abiertobug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Client support matrix inclusion Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
calcite-components needs triage refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Esri/calcite-design-system#15203 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
danielmiessler/LifeOS#2218 ·