Re:Show HN: Skip tests unaffected by code change.
by adamantinecog on Friday October 14, 2022 @01:42PM
(#33206606)
I'm wondering if this works similar to https://github.com/digitalocean/gta which will do transitive analysis to find packages whose dependencies have changed and only run the tests for those packages?
[ Parent
| on HN ]
Re:Show HN: Skip tests unaffected by code change.
by yuvalsteuer on Saturday October 15, 2022 @04:34AM
(#33212978)
We love gta!
A few key differences though:
1. We analyze the effect of code changed on code coverage, which means we only compare changed code to runtime information (code that actually ran).
gta analyzes statically.
Let's assume you have a function:
func myFunction(a int) {
if(a > 10) {
func1()
} else if (a < 4) {
func2()
} else {
func3()
}
}
let's assume you changed func3 only, or func2, but during the run of the test only func1 ran.The test will be skipped because no change could of affected it's result. NOT in gta.