What is WebService? (This article will also be a general introduction)
Here to a station brother's explanation: http://www.cnblogs.com/Leo_wl/archive/2010/05/20/1740205.html
What is soapui?
Simply put, it is a tool for testing WebService. Official website address: http://www.soapui.org/
PS: the official website is expected. If you are not familiar with English, you can use Google Chrome or 360 quickbi. It can automatically convert English to Chinese. Although the translation is not good, let's take a look ~!
The download and installation of soapui is relatively simple. Just find it on the official website. If you have already installed it, let me give you an example!
============================== Soapui creates a simple performance test ==================== ==========
Here is a simple step:
Step 1:
Create a project: Click create.
Enter your project name in the open window, and enter the WebService address you want to test!
Http://www.webservicex.net/WeatherForecast.asmx? WSDL
Step 2:
Create a test plan, right-click request --- add to testcase
Then, a dialog box is displayed, prompting you to click "OK"-"OK"-"OK". The plan is created successfully.
In fact, getweatherbyzipcode -- Request 1 is a function test page, because what we want to do is performance. I will not elaborate on it here. If you are interested, please take a look.
Step 3:
Create a performance test, right-click testcase --- New loadtest
Enter the test name. The performance test window is displayed.
Window introduction:
Run: Click the green button in the upper left corner.
Threads: sets the number of virtual users.
Two line buttons: opening is a graphic result
Limit: running time (s seconds)
I hope you can write your experiences and learn together. Haha.
==================================== WebService knowledge supplement ==== ======================================
Some friends said that it was not quite relevant. The above content only talked about the process of creating a WebService performance test. It was too superficial. Indeed, it was just a tool for guiding ideology and behavior. The reason why I likeArticleAdding so many instructions is easier for beginners like me to understand;
Now that we want to test the performance of this WebService, first of all, we need to know what it is. No.
What is WebService?
If there are two countries, Java and. net, the two countries need to communicate in order to develop the economy and exchange trade, but Java is talking about Java and. net. To facilitate communication, a third-party language WebService is created. It is inaccurate to say that WebService is not a language.
They are not happy to allow the two peoples to learn a new language for trade. The language of your country is well spoken. Why do you have to spend so much effort learning a language. Can we create an electronic product to complete this function?Understanding from the surface:WebService is an application.ProgramIt exposes an API that can be called through the Web.You can use programming methods to call this application through the Web.Of course, we cannot understand this electronic product as a universal product. We are engaged in mobile phone foreign trade and need to make electronic products (applications) with mobile phone-related functions ). For foreign trade of clothes, you must make electronic products with clothes-related functions.It can also be understood as follows:The Web service platform is a set of standards that define how applications implement interoperability on the web. You can use any language you like to write Web Services on any platform you like, as long as we can query and access these services through web service standards.
If the people of the two countries intend to do such a thing, they must formulate the norms of this thing. It is not something made by the Java country. How do people in the. NET country know what it is and what functions it has. Right.The Web service platform must provide a standard type system for communication between different platforms,Programming LanguageAnd different types of systems in the component model.The Web service platform must also provide a standard to describe the web service, so that the customer can obtain enough information to call this web service. Finally, we must have a way to remotely call this web service. This method is actually a Remote Procedure Call Protocol (RPC ).
Now that the people of the two countries are coming to formulate this rule, let's sit down and talk about how to formulate it!
XML and XSD
The Extensible Markup Language (XML) is the basic format for data representation on the Web service platform. In addition to ease of establishment and analysis, XML has the primary advantage of being platform-independent and vendor-independent. Independence is more important than technical superiority: software vendors will not choose a technology invented by competitors.
XML solves the problem of data representation, but it does not define a set of standard data types, let alone how to extend this set of data types. For example, what is the integer number? 16-bit, 32-bit, or 64-bit? These details are important for implementing interoperability. XML Schema (XSD) developed by W3C is a set of standards dedicated to solving this problem. It defines a set of standard data types and provides a language to extend this data type. The Web service platform uses XSD as its data type system. When you use a language (such as VB. net or C #) to construct a web service, to comply with the Web service standard, all the data types you use must be converted to the XSD type. The tool you use may have automatically completed the conversion, but you may modify the conversion process as needed. In chapter 2, we will go deep into XSD and learn how to convert Custom Data Types (such as classes) to XSD types.
Soap
After the Web Service is created, you or others will call it. Simple Object Access Protocol (SOAP) provides standard RPC methods to call Web Services. In fact, soap is a bit inappropriate here: it means that the following Web Service is represented in the form of an object, but this is not necessarily the case: you can write your web service as a series of C functions and still use soap for calling. The SOAP specification defines the format of soap messages and how to use soap over HTTP. Soap is also based on XML and XSD, and XML is the data encoding method of soap.
WSDL
How do you introduce your web service to others, what are the parameters used for each function call? You may write a set of documents on your own. You may even verbally tell people who need your web service. These informal methods have at least one serious problem: when programmers sit in front of a computer and want to use your web service, their tools (such as Visual Studio) they cannot provide any help, because these tools do not know your web service at all. The solution is to provide a formal description document that can be read by machines. The Web Service Description Language (WSDL) is an XML-based language used to describe Web services and their functions, parameters, and returned values. Because it is based on XML, WSDL is both readable and readable, which is a great benefit. Some of the latest development tools can generate a WSDL document based on your web service and import the WSDL document, generate the Code that calls the corresponding web service.
Okay! I think we have a general understanding of what WebService is.WebService performance: Put the interface of a WebService application you have written there, there will be many people calling it, of course there will be quality problems. Will it fail when there are too many people? Will it be slow? Therefore, we need to test the performance of this "interface.
In fact, what kind of requests can I send to call the "interface" for testing? soapui automatically helps us complete SOAP protocol requests! I just got started with this tool and hope to learn with one finger.
Note: The Blue total score is the reference of others' articles.
========================================================== ========================================================== ====================
I was originally created by a senior tester. With the consent of this person, I have compiled the soapui learning document. If you are interested, you can download it. This is the only one (except the official document) compare the documents of soapui. I joined some of the author's ideas. Of course, due to the limited level of the author, there may be errors and omissions.
Csdn download: http://download.csdn.net/source/3529865