最近在做接口自动化时遇到了一些问题,例如某个接口的请求体大概如下:
{
"id": 10086,
"name": "auto_test_upstream",
"node": [
{
"ip": "1.1.1.1",
"type": "pod",
"unit":"service1"
}
],
"healthcheck":"false"
}
根据用例的不同,也可以是这样:
{
"id": 10086,
"name": "auto_test_upstream",
"node": [
{
"ip": "1.1.1.1",
"type": "VM",
"name":"myhost"
}
],
"healthcheck":"false"
}
{
"id": 10086,
"name": "auto_test_upstream",
"node": [
{
"ip": "1.1.1.1",
"type": "VM",
"name":"myhost"
}
],
"healthcheck":{
"successCode":"200",
"successFrequency":"10",
}
}
我的疑问就是,在请求参数会根据你的选择动态变化的时候,怎么做数据驱动?