Manage Test Repository

Manage Test Repository

QAS provides a Test Repository, which can be used to abstract element locators outside of the automation code. Moreover, you can have separate locator repositories per environment/platform and configure them at run-time to load environment-specific locator repositories.

The test step locators get stored in the default Test Repository, if you have not created a new one. You can also create your repository where all the locators of elements that you access on Web UI/Mobile UI/any other platform or any API calls will be stored in the test repository. For example, you can store any prerequisite that you need to have in your test script while creating the test.

The locators are recorded in the format of Name, Type, and Value. Users can add, edit, and delete the Test Repository for all the platforms. 

Steps to add elements to Locator Repository

1. Go to the Test Plan module.

2. Expand the Test Repository section at left.

A Default repository is provided to store the element locators as you add steps in test cases.

→ Create a New Repository

If you want to store the elements in a different repository, you can create a new repository by clicking on the New Repository icon.

Then enter the repository name and click Create.

→ Create a Repository Folder

You can also create repository folders to segregate repositories accordingly.

 

3. Select a Repository: Before you start recording the steps, select the Repository from the drop-down in which you want to store the element locators.

Once you complete your test recording, the element locators are stored in the selected repository.

 

View/Edit API Resources

Users can view/edit API resources for the type “request” in the repository with the help of the JSON editor.

When a new API request is created, a default template is provided. You can then customize it as per your requirements.

Steps:

1. Go to the Test Repository section in the Test Plan module.

2. Click on the View/Edit Request link for the API parameter with the Type “request”.

The View/Edit Request panel opens with the JSON code.

3. You can modify the code as per your requirements. Then click Add to save the code.

Rename Keys

The test step locators get stored in the user-preferred test repositories while recording the tests. The locators are recorded in the format of Name (i.e. Key), Type, and Value. Users can rename the Keys of the locators within the repository. If you want to edit the object keys that are present in multiple repositories, then you can opt to update the name of the key in other repositories. Additionally, you can also update the references used in test cases. Users can rename object keys directly from the repository. It streamlines the renaming process and ensures consistency across the platform.

For example, the button.logout Key exists in multiple repositories and is referenced in multiple test cases.

As soon as you proceed to rename the Key, the Rename Key wizard opens with the three tabs on it:

  • Test Repository: The tab shows the repositories in which the Key exists. Select the Test Repository in which you want the modified name to be reflected.

  • Test Case: The tab shows the test cases in which the Key has been used. Select the Test Case in which you want the modified name to be reflected.

  • All: The tab shows repositories in which the Key exists and test cases in which the Key is used. Select the Test Repository/Test Case in which you want the modified name to be reflected.

You can select Test Repository/Test Case by selecting checkboxes one by one. Otherwise, you can click on Select All to select all the options at once.

Then click on the Confirm button.

You can see that the modification in the name of Key is also reflected in the selected Test Repositories and Test Cases.

Test Repository

Test Case