# TestKit and up-to-date checking

**URL:** <https://discuss.gradle.org/t/testkit-and-up-to-date-checking/37684>\
**Category:** Help/Discuss\
**Created:** [September 21, 2020, 9:03pm UTC](https://discuss.gradle.org/t/testkit-and-up-to-date-checking/37684 "2020-09-21T21:03:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Ebersole](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/steve_ebersole/32/9763_2.png) [@Steve\_Ebersole](https://discuss.gradle.org/u/Steve_Ebersole)\
**Post date:** [September 21, 2020, 9:03pm UTC](https://discuss.gradle.org/t/testkit-and-up-to-date-checking/37684/1 "2020-09-21T21:03:26Z")

</div>

Writing some tests for a plugin using TestKit. For some reason, TestKit thinks my tasks are up-to-date when those tasks’ output file does not exist.

It works perfectly fine in a “real” project using the plugin, but “fails” in the TestKit tests because I explicitly check for `TaskOutcome.SUCCESS` while TestKit says the tasks are `TaskOutcome.UP_TO_DATE`.

I very much dislike publishing code if I cannot properly test it. Yes the external project could act as the verification, but I would first have to publish the plugin (to the portal or a Maven repo) first which defeats the purpose of having unit/functional tests.

So am I missing something? Is this just a quirk in TestKit? How do I resolve that?

FWIW as I understand it, it should not be a daemon issue as I have `withDebug(true)` set

---

<div class="post-metadata">

**Author:** ![Stefan\_Wolf](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/stefan_wolf/32/5519_2.png) [@Stefan\_Wolf](https://discuss.gradle.org/u/Stefan_Wolf)\
**Post date:** [September 22, 2020, 9:36am UTC](https://discuss.gradle.org/t/testkit-and-up-to-date-checking/37684/2 "2020-09-22T09:36:30Z")

</div>

Hi Steve,

TestKit does not do anything different than a real build when it comes to outputs. Do you maybe have a reproducer so I can check what is going on?

Cheers,  
Stefan

---

<div class="post-metadata">

**Author:** ![Steve\_Ebersole](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/steve_ebersole/32/9763_2.png) [@Steve\_Ebersole](https://discuss.gradle.org/u/Steve_Ebersole)\
**Post date:** [September 22, 2020, 12:11pm UTC](https://discuss.gradle.org/t/testkit-and-up-to-date-checking/37684/3 "2020-09-22T12:11:14Z")

</div>

Thanks for the reply Stefan.

The TestKit-based test is - [https://github.com/sebersole/quarkus-gradle-plugin-poc/blob/9d39262eda60ba30e9bc68ed3548a19a33ec1569/quarkus-gradle-poc-plugin/src/test/java/com/github/sebersole/gradle/quarkus/SimpleTest.java#L138](https://github.com/sebersole/quarkus-gradle-plugin-poc/blob/9d39262eda60ba30e9bc68ed3548a19a33ec1569/quarkus-gradle-poc-plugin/src/test/java/com/github/sebersole/gradle/quarkus/SimpleTest.java#L138)

You’d have to remove the `@Disabled`

The consumer project where the up-to-date checks work as expected is - [https://github.com/sebersole/quarkus-plugin-poc-consumer](https://github.com/sebersole/quarkus-plugin-poc-consumer)
