使用UFT进行接口测试(Web Service、REST)

发表于:2015-1-08 11:20  作者:xifeijian   来源:51Testing软件测试网采编

字体: | 上一篇 | 下一篇 |我要投稿 | 推荐标签: 软件测试工具 QTP UFT 接口测试 自动化测试工具

  UFT/QTP11.5整合了对接口测试的支持(API Testing)
  今天花了一整天对UFT接口测试研究了一下,个人觉得还是不错:
  一、首先,我们学习一下,What is SOA?
  In recent years, outsourcing and advanced business needs required companies to collaborate and share information. In addition, with the rising number of mergers and acquisitions, businesses struggled to find a way to share data. If, prior to a merger, two businesses maintained their own proprietary computer systems, after the merger, the sharing of data could be very time consuming and costly.For these issues, several vendors developed technologies to handle B2B (Business-to-Business) communication. Examples of B2B technologies are RMI, COM, CORBA, EDI, and Web services. In addition to allowing the systems to link up to one other, the technologies also handle permissions to allow networking with each other like an Intranet.
  SOA systems are primarily based on Web services. In Web services, a client submits a request and the Web server provides a response using the SOAP protocol. HP Unified Functional Testing for API testing lets you check the behavior of your Web services in an automated manner.
  二、其次,我们学习一下几个基本概念,理解这些概念有助于我们进行接口测试:
  HTTP:Hypertext Transfer Protocol, a communications protocol used to transfer or provide information overthe World Wide Web. Users utilize HTTP to publish and retrieve HTML pages.
  JMS:Java Message Service, a Java-based Message Oriented Middleware API for sending messages between two or more clients.
  REST:Representational State Transfer. A style of software architecture for distributed systems.
  SOAP:Simple Object Access Protocol, or Service Oriented Architecture Protocol, a protocol for exchanging structured and typed information between peers in a distributed environment using XML sent over HTTP or JMS. SOAP lets you serialize distributed components into XML documents for transport and deserialize them upon reaching their destination. This promotes
  interoperability between components that are based on different technologies.
  UDDI:Universal Description, Discovery and Integration, a platform-independent, online registry listing businesses worldwide. It is often used as a database for public Web services.
  Web Services:Standardized, Web-based applications using the XML,SOAP, WSDL and UDDI standards over an Internet protocol. XML is used to tag the data, SOAP is used to transfer the data, WSDLs describe the services and UDDIs list them.
  WSDL:Web services Description Language, an XML-based language designed to describe a Web service. The WSDL document provides essential information about the Web service,such as its ports and operations,required for implementation.
  WS-I:Web Service Interoperability, a standard created by the Web Service Interoperability organization to promote compatibility between Web Services.
  XML:Extensible Markup Language is a general-purpose markup language. It is called extensible because it lets you define your own tags. It enables the sharing of structured data across different information systems,especially over the Internet. XML is used both to serialize data and encode documents.
  使用UFT对接口进行测试,官方的帮助文档中给出来详细的使用指引,里面讲解到了创建一个简单的测试、测试Web Service、如何自定义编程(这里UFT使用的的编程语言为C#,可以使用C#进行自由地编写脚本,例如逻辑计算,写入测试报告等,GUI测试脚本语言仍然只支持vbscript,看来HP是指定微软这一套了)、如何测试创建REST Service以及如何测试REST Service,如何进行数据驱动化,设置检查点等,文档中有详细的使用说明,请参考附件。
  附件下载地址:http://www.automationqa.com/forum.php?mod=viewthread&tid=1601

【福利】填问卷 送2019精选测试大礼包+接口测试实战课程!

评 论

论坛新帖

顶部 底部


建议使用IE 6.0以上浏览器,800×600以上分辨率,法律顾问:上海瀛东律师事务所 张楠律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2019, 沪ICP备05003035号
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪公网安备 31010102002173号

51Testing官方微信

51Testing官方微博

扫一扫 测试知识全知道