This is a sample app to show how user recorded UI tests (via Chrome recorder) can be replayed automatically using replay. More information about the approach and app created as an example can be found at the my blog post Replay UI Tests.
The recommended approach for going through the example is to read first the blog post and create the app in parallel by following the steps outlined in the blog post. This repository should be used as reference and help.
The objective is to create a project that runs automated UI tests using replay. The app under test is the SAP Sample app SFLIGHT. The recorded tests are part of a larger blog post series and were originally recorded for the example apps UI Test Recording and Interactive visual regression tests.
The UI controls tested include value help dialogs and table entries. To call these UI elements, the user must perform certain actions like clicking an element, or inserting values by keyboard. These interactions are recorded by the user of the app and provided as JSON files directly from the Chrome recorder. The tests itself should not be changed by the developer. The goal of the sample app of this repository is to run these test automatically using replay.
The UI test recordings taken from the other example apps and provided for convinience also in this repository. The recordings are going to be used as-is. No changes to the recordings are done by the developer. The tests should be run automatically without coding. Only replay should be configured to run the tests sucessfully.
The test recording serves as the foundation for the BackstopJS tests. The value help for the agency input filter and for the travel status are called. In step 5 of the example, both filters are filled out with values and the table is filtered. The Chrome recording for step 5 is part of this repository in the corresponding branch.
The app in this repository is the testing app. The app to be tested is SAP CAP SFLIGHT Demo app. The demo app must be installed and run separately. The information on how to do this can be found in the repository of the demo app. To make it easier for the examples, I recommend to deactivate the built-in authentication of the demo app.
Disable authentication for sample app!
File package.json
Change the value for cds.requires.development to:
"[development]": {
"auth": "dummy"
}
Step | Description |
---|---|
Prerequisites | Start SFLIGHT Fiori Elements app |
Step 1: | Initialize project |
Step 2: | Add UI test recordings |
Step 3: | Configure replay |
Step 4: | Solve timeout problem |
Step 5: | Run all tests successfully |