Skip to main content

Assert on Object Count

This document is based on MTA version 1.8.

Definition

An assert on object count is defined on a Teststep and exists of making a comparison between the expected and actual list size of output objects of a Teststep upon test execution.

Asserts on object count can be defined either on Retrieve Object Teststeps or on Microflow Teststeps that return a list of objects.

Properties

NameDescription
Compare typeThe type of comparison to be made: either 'Equals', 'Greater-than' / 'Greater-than or equal to' or 'Less-than' / 'Less-than or equal to'.
Expected object countThe expected value of the attribute when executing the test.

Business rules

  • The compare type is mandatory.
  • Expected object count is mandatory.
  • Expected object count must be equal to or greater than 0.

Actions on Assert Object Count

View Teststeps that have asserts

  • All Teststeps in a Test Case that have one or more asserts added, are marked with in the list of Teststeps.

Add an assert on Object Count

There are multiple ways to add an assert on Object Count:

  1. When hovering the mouse on the Teststep, click on to open the page where asserts can be configured;
  2. After configuring the Teststep, click on "Save and configure asserts" to open the page where asserts can be configured in bulk for all the attributes in the Teststep. After the page opens, go to the Teststep output tab, and click on "+ Assert" to add the assert.

Configure an assert on Object Count

  • Select a compare type; 'Equals', 'Greater-than' or 'Less-than'.
  • Enter an expected object count.
  • Choose "Save".

Delete an assert on Attribute Value

  • Open the assertion configuration page and go to the Teststep output tab.
  • Click on to delete the assert.

Feedback?

Missing anything? Let us know!

Last updated 20 september 2022