Testing Permutations of Interactions Between Features in Elixir and Phoenix.

Photo by Crawford Jolly on Unsplash

Testing Interactions Between Features.

  1. Filter by full book title should find matching books.
  2. Filter by partial book title should find matching books.
  3. Filter by no book title should find all books.
  4. Filter by non-matching book title should find no books.

Selectively Test Interactions.

green = test case to test
  • filter by author full name and book full title finds matching books.
  • Partial name author partial name book finds matching books.
  • No author name, no book name finds all books.
  • Non-matching author name and non-matching book name finds no books.
  • Filter by full book title and partial author name finds matching books.
  • Filter by partial book title and non-matching author name finds no books.
  • Filter by no book title and no author name finds matching books.
  • Filter by non-matching book title and full author name finds no books.

You Don’t Always Need to Test Every Interaction.

Test Exceptional Cases.

Summary

  • Can you introduce a bug (on purpose) without the tests catching it?
  • If you remove the interaction tests covering both author name and book title together, what bugs can you introduce while tests still pass?

--

--

--

Software Engineer. I create educational content focused on technology for mobile and web applications.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Basic Linux Commands for Beginners

How I Made the First Card Game

Loves CSS 😍, Check 10 Most Used Modern CSS Features

Explore AnimatedDefaultTextStyle In Flutter

How to Accelerate Ansible playbook Speed

How to Install Python?

Automating Application Dashboard Creation for Services on GKE/Istio

Kanban (TaskBoard). Smart planning and managing tasks

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Brooklin Myers

Brooklin Myers

Software Engineer. I create educational content focused on technology for mobile and web applications.

More from Medium

ExUnit: How to find your synchronous test suites

Elixir tap and then macros — life-saving helpers

Elixir OTP and CockroachDB

An opinionated Elixir Style Guide