当前位置:网站首页>Interface performance test: Web service interface test
Interface performance test: Web service interface test
2022-06-09 03:47:00 【Pengyuyan from the testing industry】
WSDL agreement
WSDL( Network service description language ,Web Services Description Language) It's based on XML Language , Used to describe Web Services And how to access them

One WSDL The main structure of the document is similar to this :
<definitions><types>definition of types........</types><message>definition of a message....</message><portType>definition of a port.......</portType><binding>definition of a binding....</binding></definitions>
Here's a simple one WSDL Example
<message name="getTermRequest"><part name="term" type="xs:string"/></message><message name="getTermResponse"><part name="value" type="xs:string"/></message><portType name="glossaryTerms"><operation name="getTerm"><input message="getTermRequest"/><output message="getTermResponse"/></operation></portType>
Pull left and right to view the complete code
web service Interface test steps
WSDL Interface test steps :
1. choice web service The protocol adds a script
2. stay manage service Import the service to be tested in , There are usually two ways : One is URL Address ; Second, import files . It should be noted that if we use URL The way , that URL The address should be followed by "?wsdl", If it is an export file, the file suffix is .wsdl, That is to say, the object of our test is actually one person wsdl file .
3. add to add service call, Add the method we want to test , Set up the data we want to test , I.e. input data
4. Parameterize the test data , The parameterized method is just like our previous parameterized method
5. Check whether the returned result is the most correct , The function used is strstr
if(strstr(lr_eval_string("{response}"),"hello") == NULL){lr_output_message("FAIL");}else{lr_output_message("PASS");}
web_service_call function
web_service_call Function syntax :
int web_service_call( const char *StepName, [URL,] ExpectedResponse, specifications>,[BEGIN_ARGUMENTS,Arguments,END_ARGUMENTS,] [Send Attachments,][BEGIN_RESULT, Results, END_RESULT,] [Receive Attachments, ] LAST );Pull left and right to view the complete code
1.StepName
Step name
2.SOAPMethod
"SOAPMethod=EnglishChinese|EnglishChineseSoap|TranslatorString",Server name | Port name | Operation method
Pull left and right to view the complete code
3.ResponseParam
The parameter name saved by the returned response result
4.Service
Server name
5.ExpectedResponse
Indicates the response result or the returned result
"ExpectedResponse=SoapResult"Pull left and right to view the complete code

6.Arguments
Indicates the input parameters for calling this method
BEGIN_Arguments"Name1=Value1","Name2=Value2",END_Arguments
7.RESULT
Represent the input results or save the output results in a variable
BEGIN_RESULT," Output item = Variable name ","TranslatorStringResult/*[1]=Param_string",END_RESULT,
8.ATTACHMENT_ADD
Indicates uploading attachments , There are two ways to add attachments :fifilename、paramname
ATTACHMENT_ADD, "FileName=file1.txt", "ContentType = text/plain", "ID=TXT1",ATTACHMENT_ADD, "ParamName=paramMyAttachment", "ContentType = image/gif",
9.Receive Attachments
It means downloading or accepting files , There are two types of acceptance documents :ATTACHMENT_SAVE_BY_INDEX Accept files by index number 、ATTACHMENT_SAVE_ALL Accept all documents .
ATTACHMENT_SAVE_BY_INDEX, "Index=1", "ParamName=myNameParam1"ATTACHMENT_SAVE_ALL,"ParamNamePrefix=myParam"
A little help
Finally, thank everyone who reads my article carefully , Watching the rise and attention of fans all the way , Reciprocity is always necessary , Although it's not very valuable , If you can use it, you can take it

These materials , For those who want to advance 【 automated testing 】 For our friends, it should be the most comprehensive and complete war preparation warehouse , This warehouse also accompanied me through the most difficult journey , I hope it can help you ! Everything should be done as soon as possible , Especially in the technology industry , We must improve our technical skills . I hope that's helpful …….

边栏推荐
- Mongodb builds replica set cluster
- Zhongang Mining: fluorite resources listed in the strategic mineral catalogue
- Error 5 occurred in the console input command net start MySQL console output system. Access denied. MySQL service is starting MySQL service failed to start. The service did not report any errors. Plea
- On June 12, MSG enterprise bank focused on Langfang AI enterprises to promote the integrated development of "double chain"
- What is operator footwall?
- 并发操作之——ReenTrantLock和synchronized的区别
- 内存飙升问题定位
- Is CICC wealth safe? I want to open an account
- 互联网寒冬?软件测试人员如何逆势而行进入高薪大厂
- Controversial Xu Beihong's paintings and the copyright dispute of Digital Collections
猜你喜欢

故障分析 | DDL 导致的 Xtrabackup 备份失败

【分享】网络丢包故障处理方案

C#/VB. Net to set solid color / gradient / picture background in word

CPU surge problem location
![[machinetranslation] a training of multilingual machinetranslation model](/img/42/39f020b0e38c93c66885077f9addeb.png)
[machinetranslation] a training of multilingual machinetranslation model

Ideal使用小技巧

is_ Numeric SQL bypass

JS reverse font reverse crawling, a supplier platform reverse crawling practice

Word+ regular expression = = quickly batch add caption (nanny level text)

After 15000 interns joined Amazon, what was life like in the big factory?
随机推荐
mongodb数据库文档显示异常
VGA display of color bar, character and picture based on FPGA
Alook browser cookie acquisition tutorial
Software engineering final exam questions and answers (detailed and classic)
word+正则表达式==快速批量添加图注题注(保姆级图文)
SQL审核 | 这里有 MySQL/Oracle 最常用的 SQL 开发规则
接口性能测试:web service接口测试
Data: Kube flannel and kubernetes dashboard creation commands and configuration file contents
Octopus network louis:gamefi as an application chain has gradually become a consensus
Some thoughts on callback
Some bugs of unity physics engine caused by squeezing
软件测试工程师,要做到什么程度,一个月才能拿1W?
基於FPGA的VGA顯示彩條、字符、圖片
Mongodb builds replica set cluster
华为云服务器装数据库远程连接被拒绝
Excuse me: is it safe for Haitong Securities to open an account
Introduction to related operations of Huawei cloud sandbox Lab
网页设计期末作业-xxx公司网站(含导航栏轮播图等等)
什么是算子下盘?
Cereals mall -day13- goods on the shelves