ACCELQ Actions and Scenarios: Building Reusable Tests
Edited by Dev Kilaru, Senior Data Analyst. How we make our content
Introduction
In ACCELQ, tests are composed rather than scripted. You create Actions that perform one meaningful thing on a page, then assemble them into Scenarios that describe a complete user journey. Good design here is what makes a suite easy to maintain.
Prerequisites
- Contexts and Elements modeled for your application
- The ACCELQ introduction lesson
Step-by-Step Guide
Step 1: Create an Action for one user task
An Action is a single user-level function on one page, such as Search for Flights or Verify Purchase Order. It contains the interactions and validations for that task and uses the Context's Elements.
Step 2: Include verification inside Actions
Add checks where the behavior happens: an Action that submits a form can also verify the confirmation message. Keeping verification close to the step makes failures easier to locate.
Step 3: Compose a Scenario
A Scenario is a use case that spans multiple pages, and each of its steps is an Action. Build a Scenario such as Sign in, Search for a product, Add to cart, and Verify the order by chaining the Actions in order.
Step 4: Design Actions for reuse
Make Actions small and independent, and avoid baking test data into them. A Sign In Action that is reused across dozens of Scenarios is maintained in a single place.
Step 5: Review the path in the Universe
Select a Scenario in the Universe sidebar to see the route it takes through your application. Use this to spot missing coverage and to confirm that the Scenario matches the user journey you intended.
FAQs
- How big should an Action be?
- Small enough to describe one user task on one page, so it can be reused in many Scenarios, but large enough to be meaningful. Avoid one Action per click.
- Can a Scenario be run as a test?
- Yes. A Scenario is the unit you run, and it can be executed individually or as part of a Test Suite.
Summary
Build small, reusable Actions with verification where behavior occurs, then compose them into Scenarios that mirror real user journeys. Reuse is what keeps maintenance low as the suite grows.
Comments
Log in or create a free account to join the discussion.