接口传入的xml参数如何做参数化
本帖最后由 xchen 于 2015-12-23 09:49 编辑做接口的并发压力测试,接口传入参数是xml格式,如下:
<Publish xmlns="http://www.fsfds.com/SOA/USA/InfrastructureService/V10/EcommercePubSubService" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Subject>SSL34InventoryDeduction</Subject>
<Node>
<MessageHead>
<Action>Deduct</Action>
<Comment />
<Namespace>EC.USA.InventoryManagement.Deduct.V12</Namespace>
<Tag>Inventory,SO</Tag>
<Sender>EC</Sender>
<Language>ENU</Language>
<CompanyCode>1003</CompanyCode>
</MessageHead>
<Body>
<InventoryDeductionInfo>
<OperationType>N</OperationType>
<CountryCode>USA</CountryCode>
<SalesOrderInfo>
<SONumber>5566666</SONumber>
<AllowBackOrder>true</AllowBackOrder>
<SOUniqueID>ZHKP3K5UZEMAAYM-100</SOUniqueID>
<SoType>0</SoType>
<SessionId>ZHKP3K5UZEMAAYM</SessionId>
</SalesOrderInfo>
<Items>
<ItemInfo ItemNumber="00-995-206" Quantity="1" WarehouseNumber="07" AdjustMaxQty4Promot="0" AdjustThirdPartyReserved="EBY" />
<ItemInfo ItemNumber="20-239-046" Quantity="1" WarehouseNumber="07" AdjustMaxQty4Promot="0" AdjustThirdPartyReserved="EBY" />
<ItemInfo ItemNumber="17-438-010" Quantity="1" WarehouseNumber="07" AdjustMaxQty4Promot="1" AdjustThirdPartyReserved="FLS" />
</Items>
</InventoryDeductionInfo>
</Body>
</Node>
</Publish>
现想参数化 <SONumber>5566666</SONumber>这个值,请问该如何去实现呢?
在脚本中选中你要参数化的 值55666666,右键,然后replace with parameter,给你命名参数,再编辑参数表就可以了。 试了下这段xml作为value值时右键没有replace with parameter这个选项
页:
[1]