(转载) 使用UFT进行接口测试

上一篇 / 下一篇  2013-02-06 09:57:27 / 个人分类:QTP自动化

原文地址:http://automationqa.com/forum.php?mod=viewthread&tid=1601&fromuid=2

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,如何进行数据驱动化,设置检查点等,文档中有详细的使用说明,请参考附件。

API Test

TAG:

 

评分:0

我来说两句

Open Toolbar