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?
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.
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.
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.