Skip to main content
Version: 2.6.0

Teststep

Definition

A Teststep tests some specific aspect of system behaviour. A Teststep is always part of a Test Case.

The Teststep is the lowest or fourth level of the 4-layer framework that is used in MTA. It describes the actual operating functions.

A Teststep must be one of the following types:

An Object Teststep can execute the following actions:

  • Create: create an object (without committing it to the database).
  • Retrieve: retrieve object(s) from memory or database.
  • Change: change an object (without committing it to the database).
  • Delete: mark an object to be deleted. When deleting, always make sure to have the Delete teststeps in the right order, to make sure domain model Delete Constraints don't prevent deletion of the object(s).
  • Persist: finalizes above Object teststeps.

Note that if a retrieved object is deleted by a Delete Object Teststep in MTA, and afterwards changed in another Teststep, MTA will not give a warning during test design, but give a runtime error on test execution because the object to be changed is no longer available.

Properties

NameDescription
NameThe name of the Teststep.
DescriptionA description of the Teststep.
HighlightThis indicates whether to visually highlight the Teststep in the Test Case to draw attention to it.
CategoryCan be either 'Object' or 'Microflow'.
ActionOnly for Object Teststeps; either 'Create', 'Retrieve', 'Change', 'Delete' or 'Persist'.
Retrieve setOnly for Retrieve Object Teststeps; either 'All objects', or 'Only First object'.
Retrieve optionOnly for Retrieve Object Teststeps; either 'From database', 'From former Teststep', or 'By association' (from memory).
Microflow NameOnly for Microflow Teststeps; Name of the microflow to be executed.

Business rules

  • The name is mandatory.
  • A Microflow Teststep must have a microflow selected in order to be able to execute the Test Configuration.
  • An 'Create', 'Change' or 'Retrieve' Object Teststep must have an entity selected in order to be able to execute the Test Configuration.

Actions on Teststep

View Teststeps in a Test Case

  • Navigate to the Test Suite that the Teststeps are in.
  • Click on the Test Case to view the Teststeps.
  • Teststeps are shown in the middle pane.

View Teststep details

  • Navigate to the Test Suite that the Teststeps are in.
  • Click on the Test Case to view the Teststeps.
  • Select the Teststep to view.
  • Details of the Teststep are shown on the right pane.

Create a Teststep

Move a Teststep

First, navigate to the Test Case that the Teststep is in.

Option 1: Move a teststep 1 position up or down.

  • Click on the button on the Teststep.
  • Click on or "" to move the Teststep up or down.
  • Review and correct any resulting configuration Construction Errors.

Option 2: Move a Teststep inside a Test Case.

  • Click on " Edit".
  • Use drag and drop to position the Teststep.
  • Review any configuration Construction Errors and save your changes.

Option 3: Move a Teststep to another Test Case.

  • Click on the button on the Teststep.
  • Click on " Another test case".
  • Use drag and drop to move the Teststep.
  • Review any configuration Construction Errors and save your changes.

Edit a Teststep

  • Click on " Edit".
  • Click on next to the Teststep name to edit the Name or the Description, or to Highlight the Teststep.

Note that it not is possible to change the action or type of Teststep after creation, or change the entity or microflow that it is associated with.

Configure a Teststep

  • Click on on the Teststep name to set the Attribute Values or Microflow Parameter Values.

When setting Attribute Values, always keep in mind that the meaning of the value is different for a Retrieve action.

  • For Create / Change Object actions and Microflow parameters, the Attribute will be assigned the entered value, and 'empty' if checked, but left blank.
  • For a Retrieve Object action, the resulting set of objects will be filtered by the entered value, and 'empty' if checked, but left blank.

Note that it not is possible to change the action or type of Teststep after creation, or change the entity or microflow that it is associated with.

Delete a Teststep

  • Navigate to the Test Case that the Teststep is in.
  • Click on the button on the Teststep.
  • Click on " Test step".

Note that it is possible that due to deleting a Teststep and dependencies with another Teststep, a Construction Error will occur prohibiting the execution of the Test Configuration.

Open the Microflow or Domain Model associated with a Teststep in Mendix Studio

  • Navigate to the Test Case that the Teststep is in.
  • Select the Teststep.
  • Click on "Mx Studio" on top of the Teststep details pane on the right.

Feedback?

Missing anything? Let us know!

Last updated: 19 january 2023