Background:
* url 'yyy'
And header Authorization = 'xxxxx
Scenario: read the csv file
Given url 'xxxx'
And multipart file importfile = {read:'datasets/zzzz.csv'}
And multipart file entity = 'contact'
When method POST
And print response
Then status 201
* def importid = response.data.import_id
Then print **importid** **replacing this importid in the below url. this changes dynamically**
指定的网址为'https://' +导入标识符+ '/preview'
* def body =
"""
{
"import_id": "importid", **replacing here with the values from importid dynamically**
"entity_columns": [
两个URL中的导入ID应替换为JSON字符串
背景说明:
场景:
* def importid = response.data.import_id
Then print **importid**
指定的网址为'https://' +导入标识符+ '/preview'
* def body =
"""
{
"import_id": "<importid>", **replacing here with the values from importid dynamically**
"entity_columns": [
1条答案
按热度按时间h79rfbju1#
我认为你真的需要花一些时间阅读文档。无论如何,试试这个简单的例子:
请注意
id
是如何从第一个响应派生出来的,以及如何在POST请求的第二个URL和JSON主体中使用。