我正在使用Postman进行测试。我在一个集合中有一堆测试,当我单独运行每个测试时,它通过POSTING到http://localhost/v2/scores
或类似的东西。但是,当我尝试批量运行测试时,请求会添加一个查询参数,如下所示:http://localhost/v2/scores?test=TRUE
,这会导致测试失败。如何在没有查询参数的情况下运行批处理测试?
下面打印样本请求:
"info": {
"name": "mv:2017-09-14-hardscore tests",
"_postman_id": "21f1d0f5-aa1f-efb8-3029-3c8609c40f66",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "INTL XPN KO not in 38/39/40",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"// Body Checks",
"tests[\"1. Fraudshield outsort exists\"] = responseBody.has(\"xpn_fraudshield\")",
"",
"// Value Checks",
"var resp = JSON.parse(responseBody);",
"tests[\"2. Should not be approved\"] = resp.approval === false;",
"tests[\"3. Knockout reason should be fico-aa 08\"] = resp.reason === 'XPN_FICO_AA008';",
""
]
}
}
],
"request": {
"url": {
"raw": "http://localhost/v2/scores",
"protocol": "http",
"host": [
"localhost"
],
"path": [
"v2",
"scores"
],
"query": [
{
"key": "test",
"value": "TRUE",
"equals": true,
"description": "",
"disabled": true
}
],
"variable": []
},
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "body",
"value": "{\"test_frequency_withdrawal\": true, \"last_name\": \"Senevirathne\", \"ver_visa\": true, \"ver_esl\": true, \"major_grad\": \"\", \"ver_phone\": true, \"bal_closing\": 972, \"funds_excess\": 726, \"first_name\": \"Liyanage Thilanka\", \"uuid\": \"v2-130d0130-1424-4ae4-abe1-03060077eb47\", \"funds_total_i20_term\": 9, \"funds_total\": 21986, \"rank_underg\": \"EL\", \"bal_opening\": 972, \"test_frequency_transfer\": true, \"on_campus_employment_funds\": 0, \"plaid_connected\": true, \"test_transactions_max_daily\": true, \"level_of_study\": \"underg\", \"rank_grad\": \"\", \"funds_school\": 1000, \"ver_email\": true, \"ver_address\": true, \"funds_personal\": 0, \"cip_code_major1\": \"14.1901\", \"major_underg\": \"EN\", \"ver_passport\": true, \"model_version\": \"hardscore\", \"type\": \"INTERNATIONAL\", \"bureau_record_exists\": true, \"bureau\": \"EXPERIAN\",\"xpn_ALL2116\": \"00000000\", \"xpn_ALL2387\": \"00000000\",\"xpn_ALL2840\": \"00000000\",\"xpn_ALL2870\": \"00000000\", \"xpn_COL8197\": \"00000000\", \"xpn_ALL2704\": \"00000000\", \"xpn_fico_score_factor_code_one\": \"08\", \"xpn_fico_score_factor_code_two\": \"00\", \"xpn_fico_score_factor_code_three\": \"41\", \"xpn_fico_score_factor_code_four\": \"03\",\"xpn_fsvc_indicators\": [\"06\", \" \", \" \"], \"xpn_ALL5820\": \"000000\", \"xpn_MTA5830\": \"000000\",\"xpn_REV5320\": \"000000\",\"xpn_REV0416\": \"000000\",\"xpn_FICOv8\": \"000700\", \"xpn_mla_covered\": true, \"date_of_birth\": \"1992-12-01\" }",
"type": "text",
"description": ""
}
]
},
"description": ""
},
"response": []
}