# Tests missing from generate JUnit XML reports

**URL:** <https://discuss.gradle.org/t/tests-missing-from-generate-junit-xml-reports/14003>\
**Category:** Help/Discuss\
**Created:** [January 27, 2016, 10:27am UTC](https://discuss.gradle.org/t/tests-missing-from-generate-junit-xml-reports/14003 "2016-01-27T10:27:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Predrag\_Knezevic](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/predrag_knezevic/32/217_2.png) [@Predrag\_Knezevic](https://discuss.gradle.org/u/Predrag_Knezevic)\
**Post date:** [January 27, 2016, 10:27am UTC](https://discuss.gradle.org/t/tests-missing-from-generate-junit-xml-reports/14003/1 "2016-01-27T10:27:27Z")

</div>

Hi,

I have noticed a strange thing: sometimes - some of my tests do not get JUnit XML report generated, like they were not executed at all. What is even more strange is when I turn on testLogging

```gradle
testLogging {
            events "started", "skipped", "failed", "passed"
}

```

Then for these tests I never get a “skipped”, “failed”, or “passed” event, although “started” event was emitted.

What might be wrong? I am using Gradle 2.10

Thanks,

Predrag

---

<div class="post-metadata">

**Author:** ![mark\_vieira](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/mark_vieira/32/5396_2.png) [@mark\_vieira](https://discuss.gradle.org/u/mark_vieira)\
**Post date:** [January 28, 2016, 3:31am UTC](https://discuss.gradle.org/t/tests-missing-from-generate-junit-xml-reports/14003/2 "2016-01-28T03:31:51Z")

</div>

> [@Predrag\_Knezevic](#):
>
> I have noticed a strange thing: sometimes - some of my tests do not get JUnit XML report generated, like they were not executed at all.

_Are_ they being executed? Do they show up in the HTML report?

---

<div class="post-metadata">

**Author:** ![Predrag\_Knezevic](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/predrag_knezevic/32/217_2.png) [@Predrag\_Knezevic](https://discuss.gradle.org/u/Predrag_Knezevic)\
**Post date:** [January 28, 2016, 6:47am UTC](https://discuss.gradle.org/t/tests-missing-from-generate-junit-xml-reports/14003/3 "2016-01-28T06:47:06Z")

</div>

> [@mark\_vieira](#):
>
> Are they being executed? Do they show up in the HTML report?

They are not in the HTML report, because there are no JUnit XML report for them. I see that they got started, but and that is only I see - there is no event about passing, failing…

---

<div class="post-metadata">

**Author:** ![Predrag\_Knezevic](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/predrag_knezevic/32/217_2.png) [@Predrag\_Knezevic](https://discuss.gradle.org/u/Predrag_Knezevic)\
**Post date:** [February 9, 2016, 10:26am UTC](https://discuss.gradle.org/t/tests-missing-from-generate-junit-xml-reports/14003/4 "2016-02-09T10:26:09Z")

</div>

I finally found the reason for this behavior - the code under test was invoking `System.exit(0)` causing then the testworker JVM to exit.
