Use action words

Definition

An action word is basically a sequence of steps that can be reused across multiple scenarios. It defines the Domain Specific Language (DSL) of the project. This ubiquitous language forms a common language shared by the team members for describing acceptance tests.

Key Benefits

Defining a common language with action words and building your scenarios based on them has several key advantages:

  • It makes the scenarios understandable by all the project stakeholders (product team, devs, testers).
  • It accelerates test authoring as well as maintenance and enable refactoring.
  • It facilitates automation as the scenarios based on action words can be transformed automatically into scripts for various test automation frameworks.

Action Words page

Action word page in Hiptest

An action word is defined by different data:

  • Name: the name of an action word is unique within a given project.
  • Description: field text used to add a description. See Description formatting section.
  • Tags: you can add tags to an action word. The search feature can be used to search for action words based on tags.
  • Parameters: you can add parameters to an action word and use them in the steps.
  • Definition: you can add steps to your action words.
  • Used by: list of scenarios and action words that contain the current action word.
    Used by section on Hiptest action word page

Note: the action word page uses the same step editor as the scenario, so it works exactly the same way for both of them.

Parameters

You can add as many parameters as you want to an action word. The name of a parameter should not contain any special character or space. A default value can be assigned to a parameter.

Hiptest action word parameters

You can call an action word with the parameter value as argument by using =parameterName format:

Call action word with parameter value

You can also include a parameter in an action/result step by using the following syntax: ${parameterName}.

Use parameter in action/result step

Calling an action word in a step

When you call an action word with parameters, a value should be assigned. If you don’t specify it, the default value is applied, but it is possible to rename it afterwards.

In the Action words page, you can add some parameters to your action word.

Example of an action word parameter in Hiptest.

When you call this action word in a scenario, it will appear as follows :

Hiptest action word call

 You can also use a datatable parameter as an action word parameter value using the syntax =columnName, you should obtain :

assign a parameter at a Hiptest action word call

Note: the step of an action word can be another action word. It means that you can build action word of action word and thus define several layers to your Domain Specific Language (system, application, feature, automation keyword…).

Other actions available on an action word

You can apply the following actions to an action word:

  • Inline: to replace the action word by its content (the steps) in every place where this action word is called. See inline in the refactoring section.
  • Delete: to delete the action word. Be carefull, you will not be able to restore it and all the objects (scenarios & action words) using this action word will be in error.

Download the ebook

This field is required

This field is required

Please enter a valid email address

Thank you, the ebook has been sent to your mailbox

Hiptest is FREE for open source projects

We actually utilize a number of open source components, which is why Hiptest service is free for any open source project. We are giving back to the community!

Your open source project must meet the following criteria to be approved:

  • Your project is licensed under a license approved by the Open Source Initiative
  • Your project source code is available for download
  • Your project has a publicly accessible website

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close