This page explains how to perform a batch run only for specific test cases in MagicPod.
Table of contents
- Filter execution targets using folders and labels
- Specify execution targets using test case numbers
- Specify the execution order of test cases
1. Filter execution targets using folders and labels
1-1. Filter by folder
Open the Batch run settings screen, navigate to the Execution target tab, and select Filter by folders/labels from the Batch run target options. Check the Filter by folders box and click Setup.
Set the target folder using checkboxes and click OK.
You can check the target test cases in the Batch rum target preview.
The test cases matching the specified folder will be executed in sequence, as shown below.
1-2. Filter by label
1. Create labels
Go to Settings > Test case labels on the project page and click Add.
Enter any name you like and click Create.
2. Assign labels to test cases
Open the Info tab for the test case you wish to label, check the appropriate labels, and click Update.
You can verify the assigned labels on the test case list screen.
3. Edit batch run settings
Open the Batch run settings screen, navigate to the Batch run target tab, and select Filter by folders/labels from the Batch run target options. Check the Filter by labels box and click Setup.
Drag & drop test case labels to set up.
Note: If multiple labels are selected, test cases that contain at least one of them will be executed.
You can check the target test cases in the Batch run target preview.
The test cases matching the specified label will be executed in sequence, as shown below.
1-3. Combine folder and label filters
You can also filter execution targets by combining folder and label conditions.
In this case, test cases that meet both folder and label conditions will be filtered for execution.
2. Specify execution targets using test case numbers
Open the Batch execution settings screen, navigate to the Batch run target tab, and select Specify by test case number from the Batch run target options. Enter the test case numbers you want to execute.
The test cases will be executed in the order of the entered numbers.
You can also specify data patterns for data-driven tests, such as "6[2], 6[3]".
For example, "6[2]" specifies the second data pattern for a test case with test case number "6".
3. Specify the execution order of test cases
Note: It is recommended to create and manage test cases independently of their execution order to ensure test independence. Ideally, tests should succeed regardless of execution order, but if necessary, the execution order can be specified.
If you want to specify the execution order of test cases, you can rearrange them in the Test Case List screen.
First, open the Test Case List screen and click "︙" > Move and Sort.
You can rearrange test cases using drag-and-drop.
Similarly, folder order can also be changed.
Click OK.
The test cases matching the specified folder and label settings will then be executed in the order displayed in the Test case list screen.