Reusing a sequence of steps with Fragments

As your test suites grow, you will inevitably end up with writing the same sequences of steps over and over. Think about the steps required to login into your application. Frontend Robot allows you to reuse these steps sequences with Fragments.

Creating a Fragment

To create a fragment simply go to the standard test case editor and click on the three dots at the top right corner, then select Create Fragment, as shown in the screenshot below:

Creating a fragment
Creating a fragment

At the moment you cannot create fragments from the Live Editor.

You are now able to select the steps to include in the Fragment. Once finished, click on Create Fragment and give it a name.

Selecting a set of steps
Selecting a set of steps

Fragment created
Fragment created

The Fragment should now be created and automatically embedded into the source test case.

Reusing an existing Fragment

To reuse and existing Fragment, simply add a Fragment instruction and select or search the Fragment name from the list:

Selecting an existing fragment
Selecting an existing fragment

After clicking Save, the fragment will be added to the test case:

The fragment has been imported
The fragment has been imported

NOTE: Editing a Fragment from within a test case will modify all the instances of the same Fragment used in other test cases.

Questions?

We're always happy to help with test creation or other questions you might have! Search our documentation, contact support by email or on chat, or connect with our sales team.