Skip to content
This repository has been archived by the owner on Jul 30, 2023. It is now read-only.

Bug: Failing JUnit test not recognized #12

Open
leinardi opened this issue Jun 23, 2022 · 3 comments
Open

Bug: Failing JUnit test not recognized #12

leinardi opened this issue Jun 23, 2022 · 3 comments

Comments

@leinardi
Copy link

I just noticed that the plugin is not recognizing anymore failed JUnit tests.

You can reproduce the issue using these test results: unit-tests-violations.zip

The plugin configuration is the following:

tasks.register('violationCommentsToGitHub', ViolationCommentsToGitHubTask) {
    repositoryOwner = "veeva-oncology-link"
    repositoryName = "link2-android"
    pullRequestId = System.properties['GITHUB_PULLREQUESTID']
    oAuth2Token = System.properties['GITHUB_OAUTH2TOKEN']
    gitHubUrl = "https://api.github.com/"
    createCommentWithAllSingleFileComments = false
    createSingleFileComments = true
    commentOnlyChangedContent = true
    keepOldComments = false
    violations = [
        [
            "KOTLINGRADLE",
            ".",
            ".*/build/logs/buildlog.*\\.txt\$",
            "Gradle"
        ],
        [
            "CHECKSTYLE",
            ".",
            ".*/reports/detekt/.*\\.xml\$",
            "Detekt"
        ],
        [
            "ANDROIDLINT",
            ".",
            ".*/reports/lint-results.*\\.xml\$",
            "Android Lint"
        ],
        [
            "JUNIT",
            ".",
            ".*/build/test-results/test.*/.*\\.xml\$",
            "Unit"
        ],
    ]
}

This is the build output of the task:

2022-06-23T16:29:18.0318676Z :violationCommentsToGitHub (Thread[included builds,5,main]) started.
2022-06-23T16:29:20.0382631Z 
2022-06-23T16:29:20.0383305Z > Task :violationCommentsToGitHub
2022-06-23T16:29:20.0384152Z Caching disabled for task ':violationCommentsToGitHub' because:
2022-06-23T16:29:20.0384757Z   Caching has not been enabled for the task
2022-06-23T16:29:20.0386944Z Task ':violationCommentsToGitHub' is not up-to-date because:
2022-06-23T16:29:20.0387453Z   Task has not declared any outputs despite executing actions.
2022-06-23T16:29:20.0387870Z Using OAuth2Token
2022-06-23T16:29:20.0388924Z Will comment PR veeva-oncology-link/link2-android/82 on https://api.github.com/
2022-06-23T16:29:20.0464923Z Found 1 reports in . with pattern .*(?:/|\\)build(?:/|\\)logs(?:/|\\)buildlog.*\.txt$
2022-06-23T16:29:20.0465708Z     - /home/runner/.gradle/daemon/7.4.2/./build/logs/buildlog-2022-06-23-16-25-18.txt
2022-06-23T16:29:20.0466229Z Found 31 reports in . with pattern .*(?:/|\\)reports(?:/|\\)detekt(?:/|\\).*\.xml$
2022-06-23T16:29:20.0466821Z     - /home/runner/.gradle/daemon/7.4.2/./app/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0469514Z     - /home/runner/.gradle/daemon/7.4.2/./app/build/reports/detekt/release.xml
2022-06-23T16:29:20.0500299Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-android/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0500881Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-android/build/reports/detekt/release.xml
2022-06-23T16:29:20.0501406Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-feature/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0501924Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-feature/build/reports/detekt/release.xml
2022-06-23T16:29:20.0502589Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-i18n/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0503089Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-i18n/build/reports/detekt/release.xml
2022-06-23T16:29:20.0503592Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-logging/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0504115Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-logging/build/reports/detekt/release.xml
2022-06-23T16:29:20.0504633Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-navigation/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0505159Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-navigation/build/reports/detekt/release.xml
2022-06-23T16:29:20.0505679Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-network/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0506180Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-network/build/reports/detekt/release.xml
2022-06-23T16:29:20.0506704Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-preferences/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0507235Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-preferences/build/reports/detekt/release.xml
2022-06-23T16:29:20.0507747Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-test/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0508256Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-test/build/reports/detekt/release.xml
2022-06-23T16:29:20.0508747Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-ui/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0509231Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-ui/build/reports/detekt/release.xml
2022-06-23T16:29:20.0509745Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-account/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0510671Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-account/build/reports/detekt/release.xml
2022-06-23T16:29:20.0511226Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-debug/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0513172Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-debug/build/reports/detekt/release.xml
2022-06-23T16:29:20.0513896Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-notifications/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0515015Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-notifications/build/reports/detekt/release.xml
2022-06-23T16:29:20.0515714Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-objectives/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0516266Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-objectives/build/reports/detekt/release.xml
2022-06-23T16:29:20.0516797Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-people/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0517320Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-people/build/reports/detekt/release.xml
2022-06-23T16:29:20.0518024Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-search/build/reports/detekt/debug.xml
2022-06-23T16:29:20.0518534Z Found 16 reports in . with pattern .*(?:/|\\)reports(?:/|\\)lint-results.*\.xml$
2022-06-23T16:29:20.0519037Z     - /home/runner/.gradle/daemon/7.4.2/./app/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0519569Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-android/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0520171Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-feature/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0520705Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-i18n/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0521227Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-logging/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0521762Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-navigation/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0522294Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-network/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0522836Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-preferences/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0523371Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-test/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0523892Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-ui/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0524427Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-account/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0524971Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-debug/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0525542Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-notifications/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0526109Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-objectives/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0526673Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-people/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0527209Z     - /home/runner/.gradle/daemon/7.4.2/./modules/feature-search/build/reports/lint-results-debug.xml
2022-06-23T16:29:20.0527737Z Found 6 reports in . with pattern .*(?:/|\\)build(?:/|\\)test-results(?:/|\\)test.*(?:/|\\).*\.xml$
2022-06-23T16:29:20.0528461Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-android/build/test-results/testDebugUnitTest/TEST-com.veeva.link.core.android.ext.CharSequenceExtKtTest.xml
2022-06-23T16:29:20.0529402Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-android/build/test-results/testDebugUnitTest/TEST-com.veeva.link.core.android.interactor.account.AddAccountInteractorTest.xml
2022-06-23T16:29:20.0530442Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-android/build/test-results/testDebugUnitTest/TEST-com.veeva.link.core.android.interactor.account.GetAccessTokenExpiryInteractorTest.xml
2022-06-23T16:29:20.0531469Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-android/build/test-results/testDebugUnitTest/TEST-com.veeva.link.core.android.interactor.account.GetAccountInteractorTest.xml
2022-06-23T16:29:20.0532457Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-android/build/test-results/testDebugUnitTest/TEST-com.veeva.link.core.android.interactor.account.GetRefreshTokenInteractorTest.xml
2022-06-23T16:29:20.0533508Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-android/build/test-results/testDebugUnitTest/TEST-com.veeva.link.core.android.interactor.account.InvalidateAccessTokenInteractorTest.xml
2022-06-23T16:29:20.0534057Z Files changed:
2022-06-23T16:29:20.0534290Z   .github/workflows/ci.yml
2022-06-23T16:29:20.0534790Z   modules/core-android/src/test/kotlin/com/veeva/link/core/android/interactor/account/AddAccountInteractorTest.kt
2022-06-23T16:29:20.0535286Z   modules/core-i18n/src/main/res/values-de-rDE/strings.xml
2022-06-23T16:29:20.0535807Z   modules/feature-search/src/main/kotlin/com/veeva/link/feature/search/ui/selector/plans/PlansViewModel.kt
2022-06-23T16:29:20.0536218Z Files with violations:
2022-06-23T16:29:20.0536788Z   /home/runner/work/link2-android/link2-android/app/build/generated/easylauncher/res/debug/drawable-anydpi-v26/easy_ui_ic_launcher_foreground.xml
2022-06-23T16:29:20.0537376Z   /home/runner/work/link2-android/link2-android/app/src/main/AndroidManifest.xml
2022-06-23T16:29:20.0537973Z   /home/runner/work/link2-android/link2-android/app/src/main/res/drawable/ui_ic_launcher_foreground.xml
2022-06-23T16:29:20.0538499Z   /home/runner/work/link2-android/link2-android/modules/core-android/build.gradle
[...]
2022-06-23T16:29:20.0567092Z   /home/runner/work/link2-android/link2-android/modules/core-ui/src/main/res/values/themes.xml
2022-06-23T16:29:20.0567737Z   /home/runner/work/link2-android/link2-android/modules/feature-account/src/main/kotlin/com/veeva/link/feature/account/ui/sso/SsoScreen.kt
2022-06-23T16:29:20.0568464Z   /home/runner/work/link2-android/link2-android/modules/feature-people/src/main/kotlin/com/veeva/link/feature/people/ui/expertprofile/ExpertProfileScreen.kt
2022-06-23T16:29:20.0569202Z   /home/runner/work/link2-android/link2-android/modules/feature-search/src/main/kotlin/com/veeva/link/feature/search/ui/selector/plans/PlansViewModel.kt
2022-06-23T16:29:20.0569606Z   org/junit/Assert.java
2022-06-23T16:29:20.0569851Z Will include violations on:
2022-06-23T16:29:20.0570337Z   /home/runner/work/link2-android/link2-android/modules/core-i18n/src/main/res/values-de-rDE/strings.xml 8
2022-06-23T16:29:20.0571065Z   /home/runner/work/link2-android/link2-android/modules/feature-search/src/main/kotlin/com/veeva/link/feature/search/ui/selector/plans/PlansViewModel.kt 94
2022-06-23T16:29:20.0571514Z Will not include violations on unchanged files:
2022-06-23T16:29:20.0572160Z   /home/runner/work/link2-android/link2-android/app/build/generated/easylauncher/res/debug/drawable-anydpi-v26/easy_ui_ic_launcher_foreground.xml 9
2022-06-23T16:29:20.0572757Z   /home/runner/work/link2-android/link2-android/app/src/main/AndroidManifest.xml 8
[...]
2022-06-23T16:29:20.0609819Z   /home/runner/work/link2-android/link2-android/modules/feature-people/src/main/kotlin/com/veeva/link/feature/people/ui/expertprofile/ExpertProfileScreen.kt 134
2022-06-23T16:29:20.0610258Z   org/junit/Assert.java 89
2022-06-23T16:29:20.0610524Z Found 4 changed files with 2 violations
2022-06-23T16:29:20.0610822Z Asking GitHubCommentsProvider to comment:
2022-06-23T16:29:20.0611842Z Android Lint WARN TypographyEllipsis modules/core-i18n/src/main/res/values-de-rDE/strings.xml 8 
2022-06-23T16:29:20.8318489Z Detekt WARN detekt.MaxLineLength modules/feature-search/src/main/kotlin/com/veeva/link/feature/search/ui/selector/plans/PlansViewModel.kt 94 
2022-06-23T16:29:21.7315063Z :violationCommentsToGitHub (Thread[included builds,5,main]) completed. Took 3.693 secs.
@tomasbjerre
Copy link
Owner

If you comment only changed files, the test cases may not have been changed in your pr and will not be commented.

You will need to run the plugin twice and one time with junit where you do not comment only changed files.

Here is a working example:

https://github.com/tomasbjerre/.github/blob/5221dfb0027bcb806da74ab83ae5282196650894/.github/workflows/gradle-ci.yml#L79

@leinardi
Copy link
Author

leinardi commented Jun 23, 2022

I don't think this is the case: to test if everything was working fine I modified a test to fail always (assertTrue(false)) and committed it to the PR as a separate commit.

As you can see the report file was found:

2022-06-23T16:29:20.0527737Z Found 6 reports in . with pattern .*(?:/|\\)build(?:/|\\)test-results(?:/|\\)test.*(?:/|\\).*\.xml$
2022-06-23T16:29:20.0528461Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-android/build/test-results/testDebugUnitTest/TEST-com.veeva.link.core.android.ext.CharSequenceExtKtTest.xml
2022-06-23T16:29:20.0529402Z     - /home/runner/.gradle/daemon/7.4.2/./modules/core-android/build/test-results/testDebugUnitTest/TEST-com.veeva.link.core.android.interactor.account.AddAccountInteractorTest.xml

And the source file was also found with changes:

2022-06-23T16:29:20.0534057Z Files changed:
2022-06-23T16:29:20.0534290Z   .github/workflows/ci.yml
2022-06-23T16:29:20.0534790Z   modules/core-android/src/test/kotlin/com/veeva/link/core/android/interactor/account/AddAccountInteractorTest.kt

But was not part of the "Files with violations" (see logs in the OP).

I forgot to say it in the OP: the failing test is AddAccountInteractorTest:

<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.veeva.link.core.android.interactor.account.AddAccountInteractorTest" tests="1" skipped="0" failures="1" errors="0" timestamp="2022-06-23T16:26:10" hostname="fv-az47-626" time="3.962">
  <properties/>
  <testcase name="GIVEN data WHEN call invoke THEN return result" classname="com.veeva.link.core.android.interactor.account.AddAccountInteractorTest" time="3.962">
    <failure message="java.lang.AssertionError: Expected value to be true." type="java.lang.AssertionError">java.lang.AssertionError: Expected value to be true.
	at org.junit.Assert.fail(Assert.java:89)
	at kotlin.test.junit.JUnitAsserter.fail(JUnitSupport.kt:56)
	at kotlin.test.Asserter$DefaultImpls.assertTrue(Assertions.kt:648)
	at kotlin.test.junit.JUnitAsserter.assertTrue(JUnitSupport.kt:30)
	at kotlin.test.Asserter$DefaultImpls.assertTrue(Assertions.kt:658)
	at kotlin.test.junit.JUnitAsserter.assertTrue(JUnitSupport.kt:30)
	at kotlin.test.AssertionsKt__AssertionsKt.assertTrue(Assertions.kt:44)
	at kotlin.test.AssertionsKt.assertTrue(Unknown Source)
	at com.veeva.link.core.android.interactor.account.AddAccountInteractorTest$GIVEN data WHEN call invoke THEN return result$1.invokeSuspend(AddAccountInteractorTest.kt:52)
	at com.veeva.link.core.android.interactor.account.AddAccountInteractorTest$GIVEN data WHEN call invoke THEN return result$1.invoke(AddAccountInteractorTest.kt)
	at com.veeva.link.core.android.interactor.account.AddAccountInteractorTest$GIVEN data WHEN call invoke THEN return result$1.invoke(AddAccountInteractorTest.kt)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTestCoroutine$2.invokeSuspend(TestBuilders.kt:208)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTestCoroutine$2.invoke(TestBuilders.kt)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTestCoroutine$2.invoke(TestBuilders.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55)
	at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112)
	at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTestCoroutine(TestBuilders.kt:207)
	at kotlinx.coroutines.test.TestBuildersKt.runTestCoroutine(Unknown Source)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$1$1.invokeSuspend(TestBuilders.kt:167)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$1$1.invoke(TestBuilders.kt)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$1$1.invoke(TestBuilders.kt)
	at kotlinx.coroutines.test.TestBuildersJvmKt$createTestResult$1.invokeSuspend(TestBuildersJvm.kt:13)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at kotlinx.coroutines.test.TestBuildersJvmKt.createTestResult(TestBuildersJvm.kt:12)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest(TestBuilders.kt:166)
	at kotlinx.coroutines.test.TestBuildersKt.runTest(Unknown Source)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest(TestBuilders.kt:154)
	at kotlinx.coroutines.test.TestBuildersKt.runTest(Unknown Source)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest$default(TestBuilders.kt:147)
	at kotlinx.coroutines.test.TestBuildersKt.runTest$default(Unknown Source)
	at com.veeva.link.core.android.interactor.account.AddAccountInteractorTest.GIVEN data WHEN call invoke THEN return result(AddAccountInteractorTest.kt:38)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
	at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
	at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:176)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:133)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
</failure>
  </testcase>
  <system-out><![CDATA[]]></system-out>
  <system-err><![CDATA[]]></system-err>
</testsuite>

I still believe this is a bug.

@tomasbjerre
Copy link
Owner

You may add a test case for this report-file here:
https://github.com/tomasbjerre/violations-lib/blob/master/src/test/java/se/bjurr/violations/lib/JUnitTest.java

And you will see what filename is used in the violation. It might be that AddAccountInteractorTest.kt is not found.

But still, you probably want the failed test to be reported even if the test is not changed. And if so, you have to run the plugin without just commenting changed files.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants