The automated regression feature uses service contract information to orchestrate services and manage test use cases. This feature helps you efficiently run regression tests for business scenarios, which accelerates business validation and delivery. This topic describes how to create and run test use cases for Spring Cloud.
Create a Spring Cloud test use case
-
Log on to the EDAS consoleEDAS console.
-
In the left-side navigation pane, choose .
In the navigation pane on the left of the Spring Cloud page, click Automated Regression (Use Case Management).
In the top menu bar of the Automated Regression (Use Case Management) page, select a region. On the page, select a microservices namespace, and then click Create Use Case.
On the Create Use Case page, click the
icon on the right and set the parameters.
Configuration Item
Description
Use Case Name
A custom name for the test use case.
Application
Select the application to test.
Framework Type
Select the Spring Cloud framework.
Path
Set the HTTP relative path. For example, /getIp.
Basic Information
Set the request method and ContentType. The request methods include GET, POST, PUT, and DELETE. The ContentType can be x-www-form-urlencoded or raw. Different ContentType values provide different visual ways to enter parameters.
x-www-form-urlencoded: Enter parameters in a form. The parameter format is
[{"name": "cart"},{"age": 20}].raw: The default format is application/json. The parameter format is
{"name": "cart", "age": 20}. For other formats, parameters are transferred as plain text.
For more information about the ContentType types that Spring Cloud microservices support, see Spring Cloud reference examples.
Request Header
Set the request header parameters.
Assertion (Optional)
Enter the Check Object and Check Content, and select a Check Condition.
Response Parameter Extraction (Optional)
Enter the Response Parameter Name and Response Parameter Extraction Expression.
Click Access Once on the right. In the Single-step Test Result panel, view the request and response parameters for this request.
Click Response Parameter Extraction Helper. In the Response Parameter Extraction Helper dialog box, click the name of the response parameter that you want to extract to copy it.
Under Assertion (Optional), paste the copied parameter into the Check Object field. Select a Check Condition and enter the Check Content.
Under Response Parameter Extraction (Optional), paste the copied parameter into the Response Parameter Extraction Expression field and specify a custom Response Parameter Name. Then, click Save Configuration in the upper-right corner.
The created test use case appears in the use case list.
Create a multi-step chained test use case
A test use case can contain multiple test steps. When a subsequent test step depends on the output of a previous test step, you must use parameter passing.
-
Log on to the EDAS consoleEDAS console.
-
In the left-side navigation pane, choose .
In the navigation pane on the left of the Spring Cloud page, click Automated Regression (Use Case Management).
In the top menu bar of the Automated Regression (Use Case Management) page, select a region. In the Actions column of the target use case, click Details.
On the Use Case Details page, click Access Once on the right. In the Single-step Test Result panel, view the request and response parameters.
Click Response Parameter Extraction Helper. In the Response Parameter Extraction Helper dialog box, select and copy the response parameter that you want to extract.
Under Response Parameter Extraction (Optional), paste the selected response parameter expression into the Response Parameter Extraction Expression field and specify a custom Response Parameter Name.
Click the
icon to the right of +Add Test Step, and then click Add Test StepIn the Basic Information section of the test step, set ContentType to raw. In the JSON Format field, enter the reference variable name ${XXX}.
NoteXXXis the Response Parameter Name set in the Response Parameter Extraction section of the previous step. Use the${ }format for the reference.In the upper-right corner, click Save Configuration, and then click Execute Now.
Run a test use case
-
Log on to the EDAS consoleEDAS console.
-
In the left-side navigation pane, choose .
In the navigation pane on the left of the Spring Cloud page, click Automated Regression (Use Case Management).
In the top menu bar, select a region.
You can run a test use case in one of the following ways.
On the Use Case List (Use Case Management) page, find the target use case and click Execute in the Actions column.
On the Use Case List (Use Case Management) page, find the target use case and click Details in the Actions column. On the Use Case Details page, click Execute Now.

You can view the detailed execution results on the Execution History tab.
Related operations
You can also perform the following operations to manage test use cases.
Copy a test use case: On the Automated Regression (Use Case Management) page, find the use case that you want to copy and click Copy in the Actions column.
Delete a test use case: On the Automated Regression (Use Case Management) page, find the use case that you want to delete and click Delete in the Actions column.
Spring Cloud reference examples
ContentType | Parameter format |
x-www-form-urlencoded | Enter key-value pairs in the form. The parameter format is: |
raw |
|