Incremental testing support?

(Thomas Hirsch) #1

I wanted to develop a plugin that would parse source code to find out which tests would need to be run after certain source files changed.

After reading a bit through the recent changes regarding incremental builds it occured to me, that this might already be happening in Gradle, at least for the Java source files.

Is a feature like that planned, i.e. incremental execution of tests that are impacted by changed files?
If not, what would be a good starting point?

(Thomas Hirsch) #2

I was thinking primarily of long running integration tests.

The goal is to run only those tests, that are possibly impacted by code changes.

(Mike Kobit) #3

This would be cool to have. The incremental compilation would need to pass the information down to consumers so they could then use that to decide which tests need to be executed.

An example of a project that does a similar thing to your request is

(Thomas Hirsch) #4

Does anybody from the project team possibly have any input on this?

I am really only asking for a ‘Yes’ or ‘No’ to begin with…

(Luke Daley) #5

Hi @thokari,

There’s no active work going on on solving this problem and nothing scheduled.

Incremental compilation is a much smaller problem as the relationship between dependencies is (mostly) explicitly stated. This isn’t the case for testing, as the relationships are expressed in plethora of ways (e.g. which components are actually wired up by the container/DI controller?). There’s some conceptual overlap, but incremental testing is much more involved.

(Thomas Hirsch) #6

Thanks for your reply, I came to a similar conclusion while thinking about it.
My question was inspired by some Python script I am using at work, that reads in Java source code and builds up a tree from the import statements, and decided which tests to run based on that structure.
I was wondering if that could be done better.