how can I test/run coverage on files changed in a feature branch, over time, not just the currently changed files?
This answer is not specific to Intellij since it uses an external tool git test
. This tool let you define tests which it let you run tests against each commit on a branch (or rather a range of commits).
With regards to not testing everything but rather only changed files1 you can have a look at my fork with a branch where I show how to avoid running npm install
unless the package.json
file is changed.
I guess you should be able to run git diff --name-only HEAD^
, map to corresponding test files and then pass along to xargs
.
1 However notice that git-test caches test results in git notes, so once a test has passed on a commit re-running the test for that commit is almost instantaneously since it only fetches and shows the cached result.