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

How to set up the Pi Network .  Minig cryptocurrency Pi on mobile.

Trias Weekly Report (Dec 14, 2020 — Dec 20, 2020)

Tech for Product Managers

113+ Collection of C# Code Problems for Beginners

The fundamentals of #each and it’s BFF Pry

Centrally Managing Artifact Registry Container Image Vulnerabilities on Google Cloud: Part Two

Airflow: Why is nothing working?

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

A Strange pitfall with Map.get & its default behavior | Elixir Basics

Elixir 1.13 released: The developer’s point of view

Implement IO.Inspect in Elixir

Building a simple Calendly clone with Phoenix LiveView (pt. 6)