Managing Test Tasks
During the running of a test task, you cannot modify or delete the task or task phases.
Enabling Test Tasks in Batches
Enable multiple test tasks under the same test project.
- Log in to the CPTS console and choose CPTS Test Projects in the navigation pane on the left.
- Locate a CPTS test project to be edited and click Edit Test Task.
- On the Test Tasks tab page, select multiple tasks and click Start.
- Select a resource group and click Enable.
Editing a Test Task
- Log in to the CPTS console and choose CPTS Test Projects in the navigation pane on the left.
- Locate the target CPTS test project and click Edit Test Task.
- On the Test Tasks tab, click
next to the test task to be edited.
- Edit the test task name, benchmark concurrency, or execution mode as required, and click OK.
Deleting a Test Task
Deleted test tasks cannot be recovered. Exercise caution when deleting a task.
- Log in to the CPTS console and choose CPTS Test Projects in the navigation pane on the left.
- Locate a CPTS test project to be edited and click Edit Test Task.
- On the Test Tasks tab, click
next to the test task to be deleted.
If you need to delete multiple test tasks, select them and click More > Delete to delete them at a time.
- Click OK.
Editing a Test Case
- Log in to the CPTS console and choose CPTS Test Projects in the navigation pane on the left.
- Locate the target CPTS test project and click Edit Test Task.
- On the Test Tasks tab, locate the test task that contains the test case to be edited, and click
to expand the task.
- Click
next to the test case to be edited, edit the case by referring to Table 1, and click OK.
Deleting a Test Case
- Log in to the CPTS console and choose CPTS Test Projects in the navigation pane on the left.
- Locate the target CPTS test project and click Edit Test Task.
- On the Test Tasks tab, locate the test task that contains the test case to be deleted, and click
to expand the task.
- Click
next to the test case to be deleted. In the dialog box displayed, click OK.
Debugging a Test Case
After you create or edit a test case, you can debug it to detect syntax or configuration errors (if any) before testing.
- Log in to the CPTS console and choose CPTS Test Projects in the navigation pane on the left.
- Locate the target CPTS test project and click Edit Test Task.
- On the Test Tasks tab, locate the test task that contains the test case to be debugged, and click
to expand the task. Click
next to the test case.
- In the displayed dialog box, click Start Debugging, select a resource group, and click Debug.
- On the Debug Log tab, view the debugging logs.
- When the debugging is complete, view the debugging details on the Result tab.
If an error was reported in the debugging result, edit the test case based on the error information.
Deleting a Task Phase
- Log in to the CPTS console and choose CPTS Test Projects in the navigation pane on the left.
- Locate the target CPTS test project and click Edit Test Task.
- On the Test Tasks tab, locate the target test task, and click
to expand the task.
- Locate the test case that contains the test phase to be deleted and click
to expand the case. Click
next to the task phase, and delete it as prompted.
Modifying a Task Phase
- Log in to the CPTS console and choose CPTS Test Projects in the navigation pane on the left.
- Locate the target CPTS test project and click Edit Test Task.
- On the Test Tasks tab, select the task phase to be modified and click
to expand it. Modify the task phase according to Table 2 and click OK.
Logic Controller – for Loop
Repeat a single request or consecutive requests in a case. The for loop function is usually set in the first request. You should set a range, for example, from the current request to a subsequent request (including all the requests between). You can also set a range, from the current request to the current request (loop in the request itself).
- Log in to the CPTS console and choose CPTS Test Projects in the navigation pane on the left.
- Locate a CPTS test project to be edited and click Edit Test Task.
- On the Test Tasks tab page, select a request to be operated and click
in the upper right corner.
NoteOnly the request information in the normal case supports the for loop function.
- Configure the following parameters.
- Request Logic: The options are Default and for loop. The for loop is not set by default.
- Loop Object: The start object is the current case request by default. The end object can be the current case request or its subsequent case requests.
- Loop Count: Currently, 1–100 is supported.Note
If the for loop function has been set for a case request, this case request or its subsequent case requests cannot be set as the end object.
- Click OK.Note
If the for loop function is set, the number of requests displayed in the debugging result is the same as the loop count you set after the debugging.
- Enabling Test Tasks in Batches
- Editing a Test Task
- Deleting a Test Task
- Editing a Test Case
- Deleting a Test Case
- Debugging a Test Case
- Deleting a Task Phase
- Modifying a Task Phase
- Logic Controller – for Loop