The EDAS test engine uses generalized calls to send requests to Dubbo or HSF services. Therefore, you must enter parameters in the format required for generalized calls. This topic describes the parameter types for Dubbo and HSF interfaces and provides examples.
Atomic types, wrapper classes, and string parameters
The atomic type parameters are as follows. Enter the value for each parameter in the specified format.
Type | Value | Example |
bool | true or false | true |
char | character | a |
int | integer | 100 |
long | long integer | 101 |
double | double-precision floating-point number | 20.19 |
java.lang.Integer | integer | 100 |
java.lang.Long | long integer | 101 |
java.lang.Double | double-precision floating-point number | 20.19 |
java.lang.String | string | Hello World |
Object type parameters
Object type parameters must be enclosed in braces ({}), and you must set their internal fields.
Type | Example |
java.util.HashMap | { "color": "blue" "size": 200 } |
com.example.User |
{ "name": "Jack", "age": 12 } |
Array and collection type parameters
Array and collection type parameters must be enclosed in square brackets ([]).
Type | Example |
java.lang.String[] | ["Jack", "Sam", "Jason"] |
int[] | [100, 200, 300] |
java.util.Map[] | [{"color": "red"}, {"color": "blue"}, {"color": "white"}] |
java.util.List<java.lang.String> | ["Jack", "Sam", "Jason"] |
java.util.Set<java.lang.Integer> | [100, 200, 300] |
java.util.Set<com.example.User> |
[ {"name": "Jack", "age": 10}, {"name": "Sam", "age": 12} ] |
Interface and abstract type parameters
If the input parameter of a target method is an interface or an abstract type, enclose the parameter value in braces ({}). Inside the braces, use the class field to specify the actual parameter type.
Type | Example |
com.example.AbstractUser | The method's input parameter is the abstract class com.example.AbstractUser. Use the The following example uses { "name": "Jack", "age": 12, "class": "com.example.YoungUser" } |
Enumeration type parameters
Enumeration type parameters must be enclosed in braces ({}), and you must use the name field to specify the value.
Type | Example |
Network
| The Network enumeration has two values: { "name": "PUBLIC" } |
Date type parameters
Type | Format | Example |
| yyyy-MM-dd HH:mm:ss | 2023-05-17 10:01:19 |
java.time.LocalDateTime | yyyy-MM-ddTHH:mm:ss | 2023-12-03T10:15:30 |
java.time.LocalDate | yyyy-MM-dd | 2023-12-03 |
java.time.LocalTime | Supports the following two formats:
| The following are examples of the two formats:
|