Skip to main content

User Object Adaptor Examples

Introduction

The user adapter is the adapter that allows the comparisons and checks that an end user would do manually, i.e. it automates the functions that a tester can do, data comparison, setting of conditions, etc.

Initialization parameters

This adapter, unlike the rest of the adapters, does not have initialisation parameters, i.e. no information is set during the initialisation of the adapter, the information needed is obtained by using the different predefined functions.

Predefined functions (PF)

The predefined functions provided by this adapter can be classified into several groups:

  •  - Functions for the manipulation of variables of different types. With these functions you can create and initialise variables of different types (Date, String, Integer, TASTTABLEDATA, .....), you can ask for the existence or not of a variable, you can delete a variable, compare, etc.

    etc: 

    setVariable

      setArrayVariable

    • isExistVariable

        removeVariable

      • setVariable,
      • compareVariables

      • setArrayVariable,

      • isExistVariable,
      • removeVariable,
      • compareVariables, 
      • compareParameters

- Functions for date processing:

dateAddition: Adds an amount (in a given unit of time) to a date.

dateDifference: Calculates the difference between two dates and returns it in the chosen time unit. 

dateWeekDay: Returns the day of the week in the chosen format (number or literal). 

getCurrentDate

getCurrentDateAsDate

getCurrentDateAsString

 

 

 

 

 

- Function for sending an email:

 

sendEmail: This function allows you to send an email indicating the fields "to", "subject", "body" and "attachments", but it also has an added functionality: if you want, you can attach the result of the TestSet execution. 

- Function for copying a file:

copyFile.

- Functions to execute a command in the Windows operating system or execute a JavaScript function: 

executeCommand

executeCommandParam

executeJavaScript

- Function to save as evidence the repositories used in the execution of the process:

saveRepositoryAsEvidence.

- Function to handle the response of a message:

assertion. 

- Functions for keystroke handling:

sendKeys

sendKeysCombination

sendKeysPaste

 

- waitFor function to wait for a certain period of time.

- takeScreenshot function to take a screenshot.

- ManualTast function: This function initiates the "manual intervention" process, which is a functionality that allows the user to perform and document test cases manually, generate evidence and upload the results to ALM. It is an aid to perform tests in an agile way in those cases where automation is not possible.

 

First example: calculate the sum of 5 integers. You have to declare them as a variable in H-TEST. 

 

 

 

 

UML Diagram and Mapping

This is an example of a UML Diagram which uses the User Object Adaptor.

UserAdaptor_blue.png

This is an example of interactions between the User Adaptor with other adaptors in an E2E test.

NECESITO IMAGEN

As part of the mapping process, you should provide the Adaptor’s information, regarding to connect and use it.

Test Set Execution

After the test set execution, immediately you have the results. There are two main elements you can verify:

  • Logs: the step by step information of the execution, with:
    • the results.
    • the methods had been executed.
    • the timelines.
  • Evidences: the screenshots or evidence information by step, in case they have requested.