testgrinder
Go to testgrinder
  • Overview
  • testgrinder uses
    • Testing
      • User Acceptance Testing
      • Change Testing
      • Regression Testing
      • Performance Testing
      • Stress Testing
    • Data management
      • Data verification
    • Configuration management
    • Training videos development
  • Getting Started
    • Video: Get Started with testgrinder
    • First steps
    • Example Scripts
    • Writing your first scenario
    • Scenarios
    • Run reports
  • Writing Scenarios
    • Anatomy of Maximo UI
      • Maximo login page
      • Start Center
      • Application Screen
      • Value lists
      • Advanced Search
      • Targeting fields with no labels
    • Finding the right steps
    • Step autocompletion
    • Scenarios vs Scenario Outlines
    • Snippets and Templates
      • testgrinder Templates Project
      • testgrinder Snippets Project
  • Examples
    • Interacting with electronic signature dialog
    • Automated granting of application access
    • Add a job plan
    • Add an item
    • Add an item to storeroom
  • Administration
    • Accessing Maximo behind a firewall
    • Managing User Access
    • Using Git to Back Up and Version Control testgrinder Projects
  • Self Managed Private Cloud (SMPC)
    • testgrinder SaaS vs testgrinder SMPC
    • Releases
      • Version 1.0.8
      • Version 1.0.0
    • testgrinder Architecture
    • testgrinder Configuration
      • Configuration Files
      • Database Stored Settings
    • Deployment Instructions
      • Prerequisites
      • Subscribing to testgrinder on AWS Marketplace
      • Virtual Private Cloud
      • Security Groups
      • S3 Buckets
      • IAM Roles
      • Key Pair
      • Launch tg-app
      • Finalize Configuration File .env
      • Finalizing Database Stored Settings
      • Minimal Deployment Complete
      • Install SSL Certificate
      • Force HTTP to HTTPS
      • External Database
      • Configure Auto Scaling Group
        • Target Groups
        • Load Balancers
        • Launch Template
        • Auto Scaling Group
        • Finalize Auto Scale Group Deployment
    • Test the Deployment
    • Monitoring
    • Backup and Restore Database
Powered by GitBook
On this page

Was this helpful?

  1. Writing Scenarios

Scenarios vs Scenario Outlines

How to avoid repetitive scenarios

PreviousStep autocompletionNextSnippets and Templates

Last updated 1 year ago

Was this helpful?

testgrinder service will be discontinued on January 31, 2025

At some point you may find yourself copying and pasting the same scenario, while only making small changes. This may be avoided by using Scenario Outlines instead.

Let me demonstrate it with an example. Let's say we need to test a user's ability to navigate to a Maximo application. We may write a scenario like this:

This looks good, but what if we also need to test user access to other applications like Locations and Work Order Tracking ? We could copy/paste the scenario with the necessary changes:

This is starting to get repetitive. And making numerous similar changes may lead to errors. Instead of copying we could switch to a Scenario Outline to avoid that. Here's the Scenario Outline that accomplishes the same task:

To transition to a Scenario Outline, add the word Outline after the Scenario, then introduce the Examples table after the steps. The Examples table has a header row with the column names (Path and Application in this example) and then zero or more rows (examples) with the values. Each table row needs to have a vertical bar ( | ) at the start, between the values, and at the end of the row. Here we have three rows, one for each application we test. To use the example values, you simply insert them in the appropriate parts of the steps while surrounding with angular brackets ( < and > ).

When running a Scenario Outline, testgrinder will treat it as several independent scenarios, one for each example row with the example values pugged in into the steps, and executes them concurrently.

Note that you may plug in example values not only in steps but also in the scenario outline name. This is useful for distinguishing each individual scenario outline run in the run report:

The usefulness of scenario outlines grows with the number of possible examples it needs to run. It may be a toss-up whether to have three scenarios or one scenario outline with only three example lines for a short scenario (like in the example above). But if your scenario is long, or you have lots of examples to run it on, the benefits of using a scenario outline become obvious.

One of the uses of scenario outlines is to simulate Maximo system load similar to that created by concurrent Maximo users. For example, you could write a scenario that approximates a typical Maximo user session, then convert it into an outline with the number of examples equal to the number of concurrent sessions you'd like to simulate. Run it, and observe how Maximo handles the simulated load.

Another common use of scenario outlines is for loading/modifying Maximo records in bulk. The steps would capture how the data is to be entered into Maximo, and example rows provide the data to enter. Examples being written as a table allow for an easy transfer of data from a spreadsheet - just add columns of vertical bars around the data.

Here we test that the user successfully navigates to the Assets application. Executing it, we get this run report (click to see this run report in testgrinder):

(You may see the run report for these scenarios )

(You may see the run report )

here
here
here