Configure the assertions and validations in your test, and modify test steps directly in-line.
Reflect’s philosophy on automated regression tests is that “coding” or “scripting” front-end tests is tedious and error-prone. As a result, Reflect does not support creating tests this way, and instead, derives test definitions automatically from instrumenting normal user web sessions. This eliminates some forms of user-error, which can lead to false positive test failures, and it produces a more consistent test definition, which fosters more efficient test execution. An added benefit is that anyone in your organization can create and manage tests.
Of course, it can be just as tedious to have to re-create a test from scratch when all you need is to modify one test step. Thus, Reflect supports several methods of editing an existing test, but does so in a way that is still rooted in Reflect’s cloud-based browser, rather than coding. All forms of test editing are available from the Test Detail page, including simple ways like renaming and changing its associated tags.
A simple way to modify a test definition is to accept the current state of the page’s content in place of what was recorded. This most often occurs when a test is failing a Visual Validation test step due to the visual state or text content not matching what’s expected. The natural evolution of a page’s content means that there will be legitimate changes in expected content over time, and Reflect makes it easy to accept these changes as the new baseline assertion values for the test.
To accept changes for a Visual Validation or other test step, click the test step to open its Test Step Detail view. From there, inspect the actual content displayed on the page compared to the baseline. If the actual content is correct, click “Accept Changes” in the specific sections.
After clicking “Accept Changes”, a button will appear at the bottom of the test definition panel on the left labeled “Save and Run”.
Click the “Save and Run” button to save the accepted changes. This will trigger an execution of the test to ensure that the changes are valid and reproducible. You’ll be notified in the Reflect app when the run completes as normal.
If your test includes steps for entering text into the page under test,
you can alter this input text from the Input Text section on the Test Step Detail view.
Whether it’s an
input element or
the detail view is editable and accepts changes directly in-line.
As with other edits, you’ll need to click the “Save and Run” button when you are finished editing the text
in order to save the edits to the test definition and trigger a new test execution.
It’s important to remember that changing the input values in your test may result in subsequent test actions being invalid depending on how the new input values change the webpage. As before, click “Save and Run” to save the changes to your test definition and trigger a new test execution.
Sometimes the Reflect recorded test includes actions that are unrelated to the test. Or, maybe your application has changed and certain actions are no longer valid. To delete a test step, click the step to open the Test Step Detail view. Scroll to the bottom of the panel, and click the “Delete Test Step” button.
One way to modify a test’s definition that differs from the previous approaches is to re-record the test. In a re-recording, you choose any existing test step as your starting point for inserting new test steps. Before saving your updated test definition, you have the option to append some or all of the existing steps. In this way, Re-Recording supports both “truncate and append” and “insert” modes of operation.
To initiate a Re-Recording, click on the test step that you would like to insert steps before. This will open the Test Step Detail view for that test step. Next, click the “Re-record before this Step” button at the top of the detail panel.
This will navigate your browser to the regular Recording experience. Reflect will instantiate a new test recorder and execute your test definition up until the test step that you previously selected. You can see the execution of these test steps in the Reflect browser, but you are not able to interact with the Reflect browser while the initial steps execute. This is indicated by the “Loading” status message on the top right corner of the browser.
Once Reflect has executed all of the previous test steps successfully, the “Loading” status message will change to “Recording”, and you will be able to interact with the webpage like a normal recording. All actions you take at this point will be recorded and appended to the existing test definition before the test step you initially chose.
You can append some or all of the subsequent test steps from the original test definition by clicking the “Append Remaining Test Steps” button. That will display all of the existing test steps below the current re-recorded steps. You can interact with these appended steps, including normal editing and deleting. This allows you to selectively include existing test steps in the updated test definition.
If you make a mistake, simply click “Cancel” and the test will not be updated. After you have finished taking your new actions and appending any existing steps, click “Update Recording” to overwrite your previous test definition with the current test that includes the new test steps you just took. Saving a re-recording will trigger a new execution of the test as normal.
If you have a test that you don’t want to change, but you want to reuse some or all of the test’s existing test steps in a new test, you can use the “Make a Copy” feature. This feature launches a new recording, similar to Re-Record, and executes all of the existing test steps before enabling the normal test recording experience. However, instead of updating the existing test when you complete the recording, a new test will be saved with all of the same tags. The name of the new test will be the existing test’s name with the suffix, " (copy)”. You can change the new test’s name both before and after saving.
In contrast to Test Composition, which refers to and executes an initial set of tests but does not duplicate the test definitions, the “Make a Copy” feature creates a duplicate test with a new copy of the test steps. Updating the original test does not propagate changes to the new test when using “Make a Copy”.
To use the “Make a Copy” feature, click on an existing test step that you would like to be the last step that is included in the new test. This will open the Test Step Detail view for that test step. Next, click the “Make a Copy” button at the top of the detail panel.
Copying a test allows you to reuse a test as a common prefix before many other tests. For example, when testing a web application that requires the user to sign in, all of your tests will begin with the test steps to actually sign in with the test account. If you have a test called, Login, that signs in the test user account, then you can use “Make a Copy” to create additional tests that execute the exact same test steps to sign in the user before executing subsequent actions.