Critical Flows

What are critical flows?

Critical flows are the interactions that we consider essential to be working correctly for the user to have a good experience.

Identifying an extension’s critical flows

Identifying what the key test flows are in a project, product, platform, or plugin is usually driven by the desire to create automated end-to-end tests based on the most critical flows.

However, there are other important benefits from identifying the flows:

  • To help guide manual testing (similar to risk-based testing);
  • to understand test data needs;
  • to understand the impacts of adding or altering functionality; and
  • to help prioritizing issues.

The Process

The following process is one way you can go about identifying flows. However, there is no one-size-fits-all process for identifying flows, as each area will have its own context in how urgently flows are needed to be identified: how large the application is (a core platform vs. a small extension), whether there have been previous efforts, or data we can build upon, and so on.

  • Identify an initial list of flows. This could be based on application knowledge, application usage data, documentation, and so on.
  • Post an RFC (request for comments). This could be a document or a similar format — in WooCommerce we use P2. This would contain the initial lists to get feedback and provide an opportunity for any missing flows to be identified.
  • Once a list has been finalized, use voting and other data you have to rank the flows.
  • The highest ranking flows can now be considered your critical flows.
  • Decide upon a permanent location for the critical flows. You might consider an internal location like your team handbook or a public location such as a GitHub Wiki.

Testing critical flows

Once you have identified your critical flows you can start using them straight away!

They can be used to guide your existing manual testing, becoming the high level test charters to base your exploratory testing or manual smoke testing upon.

Their main usage is likely going to be identifying end-to-end tests to prioritize. Creating automated end-to-end tests — or other types of automated tests, if more appropriate for a particular flow’s context — covering all your critical flows will also give you confidence when making changes in your project.

Maintaining critical flows over time

Make a habit of revisiting the list of flows to update, add, remove, or re-prioritize them as you gather more feedback on their use and the areas they cover evolve.

Example of critical flows

Visit the WooCommerce GitHub wiki to see the critical flows we use in WooCommerce.