After you configure a PTS scene, you must debug it to validate the configuration.
Prerequisites
You must have created a PTS scene. For more information, see Create a PTS scene.
Procedure
Log on to the PTS console. In the navigation pane on the left, choose performance testing > scene list.
In the Actions column of the target scene, click Edit to open the Edit Scene page.
At the bottom of the Edit Scene page, click Debug Scene to debug the entire scene.
During debugging, you can click the
icon in the upper-right corner to minimize the window. The window appears as a floating pane in the lower-right corner, allowing you to monitor the debugging status. Click the floating pane to restore the Scene Debugging dialog box.In the debugging results, you can view the request logs for all links. Click an API to view its debugging details.
If you only need to debug a single API, you can also navigate to the Scene Configuration page and click Debug API to the right of the API to view its debugging results.
NoteCurrently, debugging a single API within a VPC is not supported. To debug a scene in a VPC, click Debug Scene to debug the entire scene.
PTS scene debugging interface
The following figure shows the PTS scene debugging interface.
In the figure, ① indicates the assertion result. A cross icon signifies an error. Select an API to view its response details on the right.
In the figure, ② indicates the response status. It can be a status code (such as 200, 302, 403, 503, or 500) or the word Error. The Error status indicates that no response was received. This can be caused by a request timeout or an error in the request URL or body, such as an unrecognized function or a malformed URL.
NoteYou can view the request and response details for each debugged API. To troubleshoot errors, check the following items:
If the response status is Error, check the error message in the Error Message area on the Response Details tab. For example, the error in the preceding figure is caused by an invalid parameter, which indicates that a system function was used incorrectly.
If the response status is a status code other than 200, review the response and check the server logs for standard troubleshooting.
If an assertion error occurs, check the assertion details in the Checkpoint Information area on the Response Details tab. If the current value is empty, it means no value was obtained for the output parameter.
In the figure, ③ displays the response's error message, such as timeout, parameter error, or connection refused.
In the figure, ④ shows the timing details for the core lifecycle of the request. For more information, see Timing Waterfall.
You can use the Timing Waterfall to analyze error messages during debugging, as it reflects various types of errors.
For example, if a 302 redirect is enabled in the scene configuration, you can use the Timing Waterfall to check if the redirect occurred and view its specific path.
In the figure, ⑤ is the entry point for testing the output parameter's regular expression.
When you need to extract a string from a request's response details (typically from a text-based response body), you can use the debugging window to test the regular expression and reset the output parameter as needed.
NoteThis feature is not available for
Application/JSONandTEXT/JSONformats because they are simple to parse.On the right side of the Scene Debugging dialog box, select an API and click Click here to test the output parameter regular expression.
In the Test Output Parameter Regex dialog box, select the Source Format, enter the Regular Expression, and specify the match index. Click Test Expression. The matching result from the response details shows whether the extracted content meets your expectations.
If you need to reset the output parameter, click Sync Output Parameter Configuration to synchronize this regular expression to the API's output parameter list.
NoteAfter debugging the scene, if you synchronized any output parameters, go to the Scene Configuration tab. On the Output Parameter Definition tab for the corresponding API, set the Output Parameter Name.