News for hackers. Stuff that matters.
Re:Show HN: Skip tests unaffected by code change. by maxilevi on Wednesday October 12, 2022 @06:55PM (#33184839)
How do you deal with tests that interact with something external to the codebase? The result of those could potentially change without a code change.
Re:Show HN: Skip tests unaffected by code change. by yuvalsteuer on Wednesday October 12, 2022 @07:05PM (#33184950)
That's a great point!

Depends on the what you define by "externality".

I like to look at it this way, what's being tested? I see three groups:

  - testing the software you wrote.
  - testing integration with other software you wrote (microservice interaction maybe?)
  - testing integration to third party software.
I'm telling you our current plan, feel free to poke holes:

In the first case the only externalities that seem to really matter are mostly resource and configuration files. We could detect I/O with such files and rerun the test if the underlying resource/config changed.

In the second case were planning on collecting coverage for all services being tested and then employ a more sophisticated diff heurastic.

For the third case you can mark the test as always run

We have a poc of a syscall tracer that gives us an I/O map of the test being run or the software being tested. this includes reading/writing to files, pipes, network etc...

Re:Show HN: Skip tests unaffected by code change. by metadat on Wednesday October 12, 2022 @07:13PM (#33185034)
This sounds like the best you could possibly do!

What are the odds this baby will be made compatible with Java?

Re:Show HN: Skip tests unaffected by code change. by yuvalsteuer on Wednesday October 12, 2022 @07:19PM (#33185079)
java is scheduled next, would absolutely love to hear about your use-case?
Re:Show HN: Skip tests unaffected by code change. by metadat on Wednesday October 12, 2022 @07:48PM (#33185325)
I have a pretty large Java code base (40+ micro services) and the integration test suite takes hours, many hours, to run.

However they are usually testing components from end-to-end. This seems not very amenable to benefitting this approach, since "side effects" are an inherent part of nearly every integration test.

Re:Show HN: Skip tests unaffected by code change. by yuvalsteuer on Wednesday October 12, 2022 @07:55PM (#33185387)
Wow! Seems like a challenge to test, would love to see what we can do.

Regarding side effects, completely fine as long as they're mapped out. Would love to hear more, nothing pitchy or salesy.

hmu [email protected]