Reflect Docs

Execution Options

Additional options are provided for running the same test against multiple environments as well as overriding existing behavior.

After recording a test, you have a number of options to modify the test’s behavior to suit your requirements.

Executing on Different Environments

Often times you’ll record your tests against a dedicated QA environment, but will want to run all or a subset of those tests against another environment such as Staging or Prod. In Reflect, you can run the same tests against multiple environments without having to duplicate the test or re-record any existing behavior.

To run tests against a different environment:

  • Create a new Tag and add this new tag to all of the tests that should execute against this other environment.
  • Next, select the Tag on the Tests List page and click ‘Configure Tag and Schedule’.
  • Under ‘Request Overrides’, click the ‘Add Override’ button and select ‘Hostname’
  • In the new section that appears, enter the hostname that you want to replace in the leftmost section, and enter the environment you want to run against in the rightmost section. So for example if you recorded all your tests against qa.example.com, but wanted to run them against staging.example.com when this tag executes, then define your overrides as shown in the screenshot below:
  • Optionally you can also override any Variables defined in your tests. For example, if the login credentials of your test user are different between environments, you can assign the credentials to Variables and override them as shown in the screenshot above.
Note: The URL path, protocol, and query parameters will remain the same when overriding a hostname.

Overriding Query Parameters

Another type of Request Override Reflect supports is Query Parameter overrides. One common use-case for this type of overrides is bypassing authentication flows. Infrastructure providers such as Firebase support the notion of auth tokens which are short-lived shared secrets that allow you to immediately authenticate as a specific user without entering a username or password.

To add or override a query parameter to all tests:

  • Select the Tag you’ll be executing (or choose the All Tests tag) and click ‘Configure Tag and Schedule’.
  • Under ‘Request Overrides’, click the ‘Add Override’ button and select ‘Query Parameter’
  • Enter the name and value of the parameter you wish to include in all tests.

This parameter will be appended to the start URL of each test when test execution begins. If the parameter already is present in the start URL, the parameter’s existing value will be overwritten.

Ready to accelerate your testing efforts?

Create comprehensive end-to-end tests for your web application, without writing a line of code.

Copyright © 2021 Reflect Software Inc. All Rights Reserved.