Live data from Hacker News

Show HN: I built a tool to get instant test results

github.com

11–20 of 68 posts

Re: Show HN: I built a tool to get instant test results

#11
post #8

For folks using bazel, there is also [bazel-watcher][1]. Also worth checking out [watchman][2] for this style of workflow in general. [1]: https://github.com/bazelbuild/bazel-watcher [2]: https://facebook.github.io/watchman/

Bazel is awesome, it just runs way too many tests to be fast enough

Re: Show HN: I built a tool to get instant test results

#13
Slow is smooth, smooth is fast.

Though I understand the intent, I think it has the risk to run into a run-hack-run-hack programming style.

I'm currently reading Code Complete which advises against this practice. Instead, one should strive to write code that works from the start instead of hoping it to work eventually.

Re: Show HN: I built a tool to get instant test results

#14
post #11
post #8

For folks using bazel, there is also [bazel-watcher][1]. Also worth checking out [watchman][2] for this style of workflow in general. [1]: https://github.com/bazelbuild/bazel-watcher [2]: https://facebook.github.io/watchman/

Bazel is awesome, it just runs way too many tests to be fast enough

It sounds like your bazel packages might be too large then.

Bazel (and bazel watcher) really shines when you have lots of small packages.

Re: Show HN: I built a tool to get instant test results

#15
post #13

Slow is smooth, smooth is fast. Though I understand the intent, I think it has the risk to run into a run-hack-run-hack programming style. I'm currently reading Code Complete which advises against this practice. Instead, one should strive to write code that works from the start instead of hoping it to work eventually.

Love that mantra! Dont really agree, it’s not intended for that.

I use it as I would run tests through a terminal normally. Built this because I hate running tests.

Re: Show HN: I built a tool to get instant test results

#16
This is a great idea! Even better: write a Playwright/Codegen[1] test and have that execute continuously (or put a button in the IDE to trigger it). That way you can iterate on multiple code files but see how it impacts one end-to-end test in real time! (I'm developing a feature right now where I'm doing that manually and it would be nice to automate)

[1] https://playwright.dev/docs/codegen-intro

Re: Show HN: I built a tool to get instant test results

#17
post #10

I like the concept and it seems that "run them all and see what changed" is a great model to avoid missing any side effects from a code change. However, if you're running all the tests on every change, doesn't that mean the responsiveness is necessarily greater than 250ms if your test suite is longer than 250ms? Regardless, running tests in the background to eliminate human delay is good. It would be nice if the (~te…

This tool doesn't run all the tests, only the ones affected by the code changes since the last run. It figures out which tests to run by initially running all tests, and storing the code coverage of each test.

It doesn't need to rely on "test change likelihood" - if a code change is outside of the code coverage of the test, it doesn't affect the test.

Re: Show HN: I built a tool to get instant test results

#19

1. Does this mean I have to disable IDE autosave so it doesn't attempt to run tests when the project is in an intermediate, invalid state? 2. How does it detect what tests need to be re-run when a given file changes?

1. No, if build fails hypertest will just discard the result. autosave is even prefered.

2. The first run and every subsequent one collects code coverage which is saved in an sqlite db. Every file change is compared to the code coverage.

Although this approach isnt perfect, The idea here is being fast. I always rerun the entire suite just before committing the code.

Re: Show HN: I built a tool to get instant test results

#20
post #10

I like the concept and it seems that "run them all and see what changed" is a great model to avoid missing any side effects from a code change. However, if you're running all the tests on every change, doesn't that mean the responsiveness is necessarily greater than 250ms if your test suite is longer than 250ms? Regardless, running tests in the background to eliminate human delay is good. It would be nice if the (~te…

The ordering feature is actually being built as we speak. analyzing liklihood can still be beneficial to cut down time even more.

If I would get a break from hn comments I could finish it today lol ;)

Post reply on HN