Software testing
These are my posts about software testing, ensuring it works correctly and as expected.
4 articles
How I test Rust command-line apps with
assert_cmdSome practical examples of how this handy crate lets me write clear, readable tests.
Testing JavaScript without a (third-party) framework
The browser can be a pretty good place to run your JavaScript tests.
The Hypothesis continuous release process
How we do continuous releases of hypothesis-python, and why.
Why I use py.test
Why py.test is my unit test framework of choice in Python.
6 notes
Use the
-vflag to get verbose output from Go testsThis prints all
t.Logandt.Logfcalls, even if the test succeeds or times out.Repeatedly run flaky Go tests with
stressIt runs your test hundreds of times, which can be useful for finding flaky failures.
How to list the tests that will be run by a
go testcommandUse
go test -list={pattern}.Collecting pytest markers from failing tests
You can annotate tests with markers, and using the
pytest_collection_modifyitemsandpytest_terminal_summaryhooks you can get a list of markers for tests that failed.Run a randomly selected subset of tests with pytest
By reading the code for the
pytest-random-orderplugin, I was able to write a new plugin that runs a random subset of tests.Why does Hypothesis try the same example three times before failing?
