3 ms·
For me tests are essentially just a repeatable REPL session. And like a REPL they can radically improve my development speed. So asking are these tests worth i
by UK-Al05 6y ago
For me tests are essentially just a repeatable REPL session. And like a REPL they can radically improve my development speed.
So asking are these tests worth investment is silly, because they've decreased the time for me to write the code. It takes less investment.
- gre 6y agoI wrote a one-off test script to do a REPL session as tests. You just make a file with the commands you want, run it, and the system replaces the input-only file with the inputs+outputs. Subsequent runs replace the output. Then you can check that file into version control, and whenever you run it you get a diff of the broken tests. If they're not actually broken, just check in the new file and you've updated your tests. It works really well for this project, a search engine. https://github.com/pipedown/noise/blob/master/update-test-repl.sh https://github.com/pipedown/noise/blob/master/update-test-re... https://github.com/pipedown/noise/blob/master/repl-tests/collation.noise https://github.com/pipedown/noise/blob/master/repl-tests/col...
- deeviant 6y agoTests decrease development time! Results may vary.