Structure your project

Now that you chose the coupling level for your project, it is time to structure it so the test generation will be eased.

Action words

Leaf action words

We call leaf the action words that do not call any other action words. Those are the lowest level of action words (when chosing the strong coupling solution, they will represent the automation API, “click”, “fill text” …). One good practice is to tag these action words (for example: “automation:api” or simply “leaf”) so they can be easily recognized (and avoid someone editing them and adding call to other action words inside).

These action words should contain free steps, describing the businness behavior. If you do not provide a description, then the test view in Hiptest will be empty.

High level action word

We call high level any action word that is not a leaf. These action words should only contain calls to other action words (no action or result steps-. The reason behind it is that a free step describe something that will have to be implemented by the automation team. If high level action words only contain call to other action words, hiptest-publisher will automatically generate their content and the automation team will not have to update them.

Strong coupling and low level action words

If you chose the strong coupling solution, it can be interesting to create low level action words. Those action words will simply wrap a call to a leaf action word and give some semantic to it.

For example, let’s imagine you have a login action word. The basic implementation for it would be:

Hiptest login no low level

Now, if we create three low level action words (fill usernamefill password and click on login, each one doing a single call to one of the leaf action words), the implementation would look like this:

Hiptest login with low level

Creating those three low-level action words bring three advantages:

  • the login action word is now easier to read
  • those low level action words can be created by the testers team and left empty. Later on, the automation team will update them to correctly set the value for the calls to the leaf action words
  • the optimization result will not be polluted with non-consistent results. The reason behind it is that the results found by the optimizer does not take into account the semantic of the parameters. So for it, it would be perfectly logical to refactor the calls “fill text, fill text, click” into another action word (for example we could find this suite of calls in a register action word) even if there is no semantical logic behind it.

When using this solution, it is also a good practice to tag those action words so they can be easily found by the automation team.

Scenarios

The scenarios should only contain calls to high level action words. This way, it is possible to regenerate the code of the scenarios at each update (considering the action words have not been modified) without needing any human modification.

Mixing automated and manual tests

Structuring a project for automation creates tests that are not really user friendly. For example, a test using the loginaction word would look like this:

Hiptest login test

We are studying solution to make it easier to have scenarios made for automation that can be easily reproduced by humans. For now, the best solution is two have two separate test runs: one with scenarios dedicated to manual testing and one dedicated to automated tests.

Once the project is structured as we explained, it should be easy to generate the executable code.

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