79395519

Date: 2025-01-29 00:59:23
Score: 0.5
Natty:
Report link

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.

Reasons:
  • Blacklisted phrase (1): regards
  • Blacklisted phrase (0.5): how can I
  • Contains signature (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): how can I
  • High reputation (-2):
Posted by: hlovdal