1. Home
  2. Docs
  3. User Guide
  4. Cases
  5. Test Scripts
  6. Create New Test Script

Create New Test Script

To create a Test Script, from a Test Case, click on the “+ New Test Script” button. This brings up a Wizard to define the script. The following sub-sections detail the different wizard steps.

NOTE: Wizard steps vary based on the Service Type – the following sub-sections detail all possible wizard steps.

Information

This step allows the user to add a Name and a Description for the Test Script to help the user identify the Test Script.

If the Test Script being configured is linked to a Human Service, there are three additional fields to select the user to run the human service. This list is populated based on the entries in the “Test Users” module of the application. A screenshot of these fields is shown below

Input

The Input screen allows users you define input values to be tested. These may be integers, text strings, dates of JSON objects. An example of the Input Wizard step is shown below.

Actions

The actions screen is used to configure the fields and values to be tested on a Human Service. There are two ways of adding an action, Manually or Autofill.

Manual

To manually add a row, click on the icon towards the top of the screen. This will display a row that can be completed for testing purposes. An example is shown below.

The Action allows users to configure the following fields:

  • Name – allows for a user defined name to be added to the step
  • Action – a drop down to instruct AppTester with the
    • Type – Instructs AppTester that you wish to enter a typed value
    • Click – Instructs AppTester to click an element (e.g. a Button)
    • Wait – Instructs AppTester to wait for user defined period, e.g. for the screen to fully load
    • Replace – allows default text (e.g. a date of 01-01-1900) to be deleted and replaced with a new value
    • Printscreen – Instructs AppTester to take a Printscreen to show the actions that have been performed to date. As Test Scripts run in Headless mode, this is useful to confirm that values have been added to the screen correctly.
  • Locator – a drop down to instruct AppTester which method of locator will be used to find the element on the screen – Options are Xpath, CSS, Id and Class
  • Locator Value – The actual locator string/value as defined by the code of the screen
  • Value – The Value to be used to test the Action (e.g. milliseconds for Wait Action, Text, date or Integer for a “Type” action.
  • Promote / Demote – Controls used to re-order the elements
  • Trash – used to completely remove the test step

Autofill – Experimental Functionality

To help users find all locators on a Human Service, functionality has been added to attempt to retrieve all compatible elements from a screen. Please note that this is functionality that is still work in progress and is being revised as we receive feedback from AppTester users.

To use this functionality, click on the button toward the top right of the screen. If the “Actions List” already contains values, you will be prompted with an alert to ask whether you wish to overwrite the actions that have already been configured.

The system will then attempt to retrieve all elements from the service NOTE: depending on the size and complexity of the screen, this may take 30 seconds to a Minute to return all values. An example of a screen with values automatically located is shown below.

By Default, when using the auto complete functionality, a Wait item, followed by a Print screen will be added to the lists of activities. An additional printscreen is added as the penultimate step, this is to allow users to verify that the Script is running as expected. These steps can be removed if required.

Asserts

The Asserts step of the Wizard is used to set the assumed values that you wish to test against the values from the Input step of the Wizard. An example of the Assert screen is shown below.

To add an assert, the drag and drop the value from the left to the right. This allows you to configure Assert for your test script. A sample of this is shown below.

To save the Test Script, click on the “Save changes” button.

Was this article helpful to you? Yes No

How can we help?