Does it work? How do you know?

Arjoonn Sharma (~arjoonn)


1

Vote

Description:

I want to build a story around testing / verification / CICD and how a person might grow a project's testing needs gradually.

I'll fill this description out as I find time but here are some ideas I want to cover:

  • Making things reproducible. Use docker / git.
  • Run tests often.
    • On file save.
    • On commit using git hooks.
    • On CICD on push.
    • On cross-project pushes.
    • On schedule because things can break at midnight.
  • Be as explicit as possible, without tiring yourself out too much. Use types / immutable structures.
  • Try to design in the problem space, instead of the solution space. Use fuzz testing / property testing.
  • Write down things as you code. You assumptions. Use deal if you want. At least use assertions.

Techniques

  1. Run things on your local before commit/push.
  2. Run things on git commit/push automatically.
  3. Run things in CI.
  4. Run things periodically in CI.
  5. Run fuzz tests with larger parameters overnight.
  6. Cross project dependencies should be tested when they change.
  7. Test against your UAT site /testing/staging site while it's live.

Testing in python

  1. Testing by simply running your code
  2. Use coverage.py to find out what all never ran
  3. Using pytest to run your code
  4. Using hypothesis to generate test cases for you

Approaches

  1. Writing pure-ish functions. These are WAY easier to test
  2. Using a mixins approach. Auto-discover the usage of the mixin and run a single test for the mixin behavior wherever it is used.
  3. Use hypothesis to generate test cases for you

Speaker Info:

Hi I'm Arjoonn. I run midpathsoftware.com and we do consultation across tech stacks / problem statements.

I'm very interested in improving the quality of code via developer process / automation.

Speaker Links:

https://arjoonn.com/

Section: Ethics and Philosophy
Type: Talks
Target Audience: Intermediate
Last Updated: