Test Case
Definition
A Test Case is a collection of operations to execute on an Application Instance, that are assembled to test some specific aspect of system behaviour. A Test Case is always part of a Test Suite.
The Test Case is the third level of the 4-layer framework that is used in MTA. It allows for a Test Suite to be split up into different functional or technical aspects of the tested software, but it is also the level where to choose which app to test and which credentials to test with. From MTA 2.0, it is possible to define Data Variation on the Test Case level. Test Cases are executable, and contain Teststeps that run the underlying Mendix code.
A Test Case is always executed on a Test Application and by an Execution User. The name of the execution user that is configured for the Test Case, must exactly match an existing, active and not blocked local user in the Application Instance that is tested. Note that this is not the same user as the Mta Connection User that is used to communicate between the Application environment and MTA.
When the Test Suite execution hits the Test Case, the Test Case's Execution User is used to login to the Test Case's Test application. When the Test Case is finished executing, the Execution user will be logged out again. The consequence of this, is that all data that was not saved to the database (either by a Persist Object Teststep or a Commit action in a Microflow), will be permanently lost. This is important to realize during test scripting, because if a subsequent Test Case retrieves data from a Teststep in this Test Case, this action will fail if the data was not saved to the database.
MTA can only test Mendix Apps having Production Security Level.
Properties
Name
The name of the Test Case.
Key
The identifying number assigned by MTA that is used in the MTA Public API endpoints.
Application
The associated Application to execute the Test Case on.
Execution user
The associated Execution User.
Apply security
If this is set to No, any restrictive permissions set by the Mendix security model for the execution user are ignored (the execution username is however still used for associated data).
Exception handling
Determines if the next Test Case will be executed, if an exception occurs in one of the Teststeps inside the Test Case, that are not handled by the Teststep.
Execution time-out
The maximum number of seconds this Test Case is allowed to run. If the execution duration takes longer, the execution is aborted.
Execute with delay
The number of milliseconds to wait with executing this Test Case, after the previous Test Case has finished executing. This is particularly useful when some Mendix code is executed asyncronously in a previous Test Case, and you want to prevent the two Test Cases to run simultaneously.
Rollback after execution
Indicates if all database transactions executed in this Test Case should be rolled back. This enables for unittesting without changing anything in the database. Note that when starting or stopping additional transactions in an executed microflow, this property will not work as expected. Setting this property to Yes will lead to Construction Errors if subsequent Test Cases depend on this Test Case.
If a Teststep Exception occurs that is not handled, the data in a Test Case will always be rolled back.
Objective
The objective of the testcase.
Preconditions
A description of the preconditions of a Test Case.
Expected result
A description of the expected result of a Test Case.
Business rules
- A Test Case is always about a single Application.
Actions on Test Case
View Test Cases in a Test Suite
- Navigate to the Test Suite that the Test Cases are in.
- MTA will show the Test Cases in the left pane.
View Test Case details
- Navigate to the Test Suite that the Test Case is in.
- Click on the Test Case to select it.
- Click on Test case details on top of the middle pane.
Create a Test Case
- Navigate to the Test Suite you want to create a Test Case in.
- Use the Add button to create a Test Case.
- Enter a name and other optional information.
- Select an Application Instance to execute the Test Case on.
- Select an Execution User to execute the Test Case with.
- Optionally, change the Execution time-out and Execute with delay.
- Choose
Save.
Execute Test Case
- Use the Execute test case button from the menu or inside a Test Case, to start a new Test Run.
- Choose "Full output" to include all data values in the Test Run results. Not enabling "Full output" will finish the Test Run sooner, but will only include data values for teststeps that are used in other teststeps in the Test Run results.
- Choose a Test Setting (the preferred Test Setting is pre-selected).
Executing a single Test Case will also execute previous Test Cases that the Test Case depends on.
Note that datavariation still applies when executing a single Test Case. This means that even if there are no variations on attributes or asserts from the Test Case in the datavariation, it will still be executed as many times as there are columns in the datavariation. This applies to both Test Suite datavariation as Test Case datavariation!
Share a Test Case
You can copy the URL to open a Test Case directly from your browser's address bar.
- Find the Test Case you want to share.
- Use the button to open the menu.
- Click to copy the URL to the Test Case to your clipboard.
- Paste
Ctrl+Vthe URL anywhere to share it.
Note that after using a URL to open the Test Case, each time you hit F5 or Ctrl+R on your browser, you will end up on the same page, until you log out.
Change the order of a Test Case in a Test Suite
- Click on or under the menu of the Test Case to move it up or down.
Note that it is possible that due to moving a Test Case and dependencies of Teststeps in the Test Case with Teststeps in previous Test Cases, an error will occur prohibiting the execution of the Test Configuration.
Edit a Test Case
- Click on under the menu in the Test Case to edit it.
Note that it not is possible to change the Test Case Type or associated Test Application after creation.
Duplicate a Test Case
- Click on under the menu in the Test Case to duplicate it in the same Test Suite.
Copy a Test Case from another Test Suite
- Navigate to the Test Suite you want to Copy a Test Case in.
- Click on " Copy from" to select a Test Case from another Test Suite.
- Click on " Copy" to copy the Test Case.
Delete a Test Case
- Click on under the menu on the Test Case you want to delete.
Note that it is possible that due to deleting a Test Case and dependencies of Teststeps in the Test Case with Teststeps in previous Test Cases, a Construction Error will occur prohibiting the execution of the Test Configuration.
Related topics
Feedback?
Missing anything? Let us know!
Last updated 26 November 2025