我有web服务,它有两个方法。1方法具有非原始参数,如字符串、日期...另一个具有原始参数
第一种方法我可以像这样测试http://localhost/Integration/CustomerManagement.asmx/UpdateToPaid?customerNumber=000001&startDate=01/01/2012&endDate=12/31/2012,它工作得很好。
第二个方法"Customer object“在web方法中有一个对象参数。我不知道如何测试这个?我必须使用WAST (Web应用程序压力工具)来测试这个方法。
http://localhost/Integration/CustomerManagement.asmx?op=CreateUpdateIndividualCustomer
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<CreateUpdateIndividualCustomer xmlns="http://tempuri.org/">
<customerDetails>
<CustomerNumber>string</CustomerNumber>
<FirstName>string</FirstName>
<LastName>string</LastName>
<Email>string</Email>
<JobTitle>string</JobTitle>
<Status>string</Status>
<Indicator>string</Indicator>
<Password>string</Password>
<PasswordQuestion>string</PasswordQuestion>
<PasswordAnswer>string</PasswordAnswer>
<IsApproved>boolean</IsApproved>
<FullName>string</FullName>
<ExtendedStatus>string</ExtendedStatus>
</customerDetails>
</CreateUpdateIndividualCustomer>
</soap:Body>
</soap:Envelop发布于 2012-03-06 13:32:03
我通常使用单元测试框架来测试服务。它允许我编写单元测试,这些测试看起来非常像我的客户用来调用服务的代码。这有助于提高可用性,因为我必须使用自己的web服务API来测试服务。
https://stackoverflow.com/questions/9574607
复制相似问题