Create scenarios: Examples

In Perforce Autonomous Testing, you can provide all information in your first chat message, import existing scripts, or start with what's important and fill in the details as part of the guided conversation.

Example - Quickly add a scenario

You are a returning user who has a travel booking application and environments defined and you want to add a new scenario:

User: Log in with username tester and password 123. Search for a flight from Paris to London and check that the highest price shown is less than $600 and the minimum price is greater than $75.

Assistant: I’m creating your scenario. Please wait.

Test Scenario Request:

Log in with username tester and password 123.
Book a flight from Paris to London.
Verify that:
The highest price is less than $600.
The lowest price is greater than $75.

Assistant: Does this scenario satisfy your requirements?

User: Yes, now do a dry run of this test

Example - Provide a detailed scenario

Assistant: What do you want to test today?

User: I want to create a new suite named Booking Sales. I want to test the URL xyz.com, starting with the login using username abc and password 123. Check that the pop-up to subscribe to the newsletter appears. I want to test it on every browser version available. Subscribe to the newsletter and verify that the user receives an alert with the subscription confirmation. Go to the account dashboard and check if there are suggestions for the user — none should appear since this is a new account. Add a policy to the suite to check that the server response time is always under 100 ms.

Assistant:

Created a new suite named Booking Sales.

Created a new policy named Booking Sales Policy.

Test the URL http://xyz.com, steps:

Log in with username abc and password 123.
Verify that a pop-up to subscribe to the newsletter appears.
Run the test on all available browser versions.
Subscribe to the newsletter.
Verify that the user receives an alert confirming the subscription.
Go to the account dashboard and check for user suggestions.
Expected: No suggestions should appear, since this is a new account.
Ensure that the server response time is always under 100 ms.

Do you want to add a load configuration for your load test? ...

Example - Let the assistant guide you

User: I need to write a test.

Assistant: Great. Let's create a test scenario. Please provide a name for the scenario and describe the steps you'd like to include. You can write the steps in plain English.

User:

Scenario Name: user login

Test Steps:

1. Open the login page

2. Enter username 'testuser'

3. Enter password '1234'

4. Click the login button

5. Verify the user 'testuser' is logged in

Assistant:
Created Scenario: login page

I have successfully created the "login page" test scenario with 5 steps.

Do you want me to add this scenario to a new or existing test suite? ...

Example - Ask for clarification

User: What's a scenario?

Assistant:

A Test Scenario is a single, individual test case that validates a specific user flow or piece of functionality. It's made up of a sequence of steps. Think of it as: A single recipe.

Example: "User Login"

Step 1: Navigate to the login page.

Step 2: Enter a valid username.

Step 3: Enter a valid password.

Step 4: Click the "Login" button.

Step 5: Verify that the user is redirected to the dashboard.