Introduction to common automated software testing tools

SoapUI

1. Introduction to SoapUI

       SoapUI is a very popular open source API test automation framework for SOAP and REST . It also supports functional testing, performance testing, data-driven testing and test reporting .

     SoapUI is a testing tool for Webservice interface , which can be SOAP Webservice and RESTful Webservice or HTTP-based service. SoapUI is an open source and completely free tool. Because it is developed based on Java , it can be used on Windows, Mac and Linux The interface test is carried out on the system, which is regarded as a standard tool for API service testing in the industry .

2. SOAP and REST interface

        The API interface we usually refer to is the server-side interface, which is the program interface of the defined request-response message system, usually called Web Service. There are several design models for Web Services, but the two main ones are SOAP and REST. As one REST API tutorial puts it: SOAP is like an envelope, and REST is just a postcard.

       1. REST interface

        REST, which stands for Representational State Transfer, is a software architectural style that relies on stateless communication protocols, most commonly HTTP. REST constructs data in XML, json or any other machine-readable format, but JSON is usually used most widely, REST is driven by data, we usually call it RESTful API or RESTful Web service, and supports all request methods of HTTP protocol Such as POST, GET, PUT and DELETE, etc.;

       2. SOAP interface

       SOAP is the abbreviation of Simple Object Access Protocol. Each operation provided by the service and the request and response of the operation are clearly defined in an XML structure file, and each input parameter is defined and bound to types such as integers, characters Strings or other complex objects, all of which are encoded in the WSDL description language, which is usually interpreted as a contract between a provider and a consumer of a service. SOAP is function-driven and also supports common HTTP-related request methods.

       3. The difference between SOAP and REST

       Compared with REST, SOAP has the following advantages:

  1. Language, platform and transport independent (REST requires HTTP)
  2. Works well in a distributed enterprise environment
  3. SOAP usually uses XML files to encapsulate data in the form of WSDL standards
  4. built-in error handling

       REST is easier to use and more flexible, it has the following advantages over SOAP:

  1. easier to understand
  2. REST usually uses the json message format, which is more concise
  3. fast (no heavy processing required)
  4. Closer to other web technologies in terms of design philosophy

Three , the main function of SoapUI

        1. Menu bar

        Provide common function menus of soapui, including the creation of empty projects, soap projects, rest projects or direct import of the above projects, and all other function menus in project design.

         2. Commonly used buttons in the toolbar

  • Create an empty SoapUI project
  • Create a new SOAP project
  • Create a new REST project
  • Import an existing soapUI project into the current workspace
  • Save all projects in the current workspace
  • Set global soapUI preferences
  • Applies the proxy defined in the global preferences

       3. Project Navigation View

       It mainly shows the tree management structure of a SOAP project. All elements of the interface test script are designed in the tree navigation, including but not limited to test collections, test cases, test steps, etc.

        4. Property area

        The display area of ​​the current project's project name, project save path, description information, and script language properties

        5. Log bar

  • SoapUI provides a variety of different log displays. During use, you should be proficient in viewing the information provided by the logs to debug and verify the script.
  • SoapUI log
  • http log
  • jetty log
  • error log
  • wsrm
  • memory usage log

4. SoapUI interface testing process

Postman

1. Introduction to Postman

      Postman provides powerful Web API and HTTP request debugging , it can send any type of HTTP request (GET, POST, PUT, DELETE...), and can attach any number of parameters and Headers. Not only that, it also provides import and export of test data and environment configuration data. Paid Post Cloud users can also create their own Team Library for team collaborative testing, and can share their test favorites and use case data with the team .

2. postman installation instructions

       Postman is an interface debugging and testing tool that supports the http protocol . Its main features are powerful functions, simple use and good usability. Whether developers are doing interface debugging or testers are doing interface testing , postman is one of our preferred tools.

       postman no longer supports the browser version after 2018, so if you want to use it, you must download the client first and then install it. Let's take the Windows system as an example to install it.

      (1) Function diagram of postman:

      (2) postman functional classification

  • basic function
  1. Common types of interface requests
  2. Analysis of interface response data
  3. Interface Management (Collection)
  4. Execute interface requests in batches
  5. log debugging
  6. affirmation
  7. variable
  8. request prescript
  9. interface association
  10. Common return value acquisition
  • Convenience function
  1. Quickly fill in query parameters
  2. Quickly fill in the request header information
  3. Quick implementation of adding a request
  4. How to Inherit Collection Authentication
  5. batch assertion
  6. Quick Find and Replace
  • Advanced Features
  1. Read file for parameterization
  2. Generate test report
  3. send request in code
  4. Write interface documentation
  5. mock service
  6. monitor
  7. use workspace
  8. Code synchronization and branch management
  9. Connect to the database
  10. Apis

Jmeter

1. Introduction to Jmeter

       Apache JMeter is an open source Java desktop application mainly used for load testing of web applications. It also supports unit testing and limited functional testing. It has many good features such as dynamic reporting, portability, powerful testing IDE, etc., and supports different types of applications, protocols, shell scripts, Java objects, and databases.

Jmeter is a pure Java open source project        developed by Apache Corporation , which can be used for both interface testing and performance testing. The characteristics of Jmeter are as follows:

  1. Jmeter is highly portable and can run across platforms .
  2. Jmeter can implement distributed load .
  3. Jmeter adopts multi-threading , allowing concurrent sampling through multiple threads or simultaneous sampling of different functions through independent threads.
  4. Jmeter has high scalability .

Two, Jmeter installation

        1. To install JDK, JDK1.7 or above is required, and version 1.8 is recommended

        2. Enter the official website: http://jmeter.apache.org/download_jmeter.cgi  to download the latest Jmeter version, and unzip it to a non-Chinese directory after downloading, such as: D:\

        3. Configure Jmeter environment variables.

               (1) New variable: JMETER_HOME: D:\apache-jmeter-5.2.1

   (2) Add the following variables at the front of the CLASSPATH variable: %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar;%JMETER_HOME%\lib\jorphan.jar;

               (3) Add the following variable at the front of the PATH variable: %JMETER_HOME%\bin;

       4. Enter D:\apache-jmeter-5.2.1\bin, double-click jmeter.bat, or enter the jmeter command in the dos window to open the jmeter interface, and the installation is successful.

3. The main components of Jmeter

        1. Test plan: it is the starting point for testing with JMeter, and it is the container for other JMeter test components

        2. Thread group: represents a certain number of users, which can be used to simulate users sending requests concurrently. The actual request content is defined in the Sampler, which is contained by the thread group.

         3. Configuration element: maintain the configuration information required by Sampler, and modify the content of the request according to actual needs.

         4. Preprocessor: responsible for working before the request, often used to modify the settings of the request

         5. Timer: Responsible for defining the delay interval between requests.

         6. Sampler (Sampler): It is the smallest unit for sending requests to the server in performance testing and recording response information and response time, such as: HTTP Request Sampler, FTP Request Sample, TCP Request Sample, JDBC Request Sampler, etc., each of which is different A type of sampler can send different types of requests to the server according to the set parameters.

          7. Post-processor: responsible for working after the request, and commonly used to obtain the returned value.

          8. Assertion: It is used to judge whether the result of the request response is as expected by the user.

          9. Listener: Responsible for collecting test results and determining how the results are displayed.

         10. Logic controller: You can customize the behavior logic of JMeter sending requests. It can be used in conjunction with Sampler to simulate complex request sequences.

4. Jmeter conducts interface testing process

The basic steps for interface testing using Jmeter are as follows:

  1. Test Plan
  2. thread group
  3. HTTP Cookie Manager
  4. Http request default
  5. Sampler (HTTP request)
  6. affirmation
  7. Listeners (view results tree, graph results, aggregated reports, etc.)

Selenium

1. Introduction to Sulenium

        Selenium is the most popular open source automated testing framework for web applications . Originated in 2000 and continuously improved for more than 10 years, Selenium has become the choice of many web automation testers, especially those with advanced programming and scripting skills. Selenium has also become the core framework of other open source automated testing tools such as Katalon Studio, Watir, Protractor and Robot Framework.

Second , the characteristics of Selenium

        Selenium supports multiple system environments (Windows, Mac, Linux) and multiple browsers (Chrome, FireFox, IE and headless browsers (no interface)). Its scripts can be written in various programming languages ​​such as Java, Groovy, Python, C#, PHP, Ruby and Perl.

  Because of the flexibility of Selenium, testers can write various complex and advanced test scripts to deal with various complex problems. It requires advanced programming skills and efforts to build automated testing frameworks and libraries that meet their needs.

Appius

        Appium is an open source tool for mobile automation testing, supports iOS and Android platforms, and supports Python, Java and other languages, that is, the same set of Java or Python scripts can run on iOS and Android platforms at the same time. Appium is a C/S architecture, and the core is a Web server , which provides a set of REST interfaces . After receiving the connection from the client, it will monitor the commands , then execute these commands on the mobile device , and finally return the execution results to the client in the HTTP response .

references:

https://zhuanlan.zhihu.com/p/517806567

https://zhuanlan.zhihu.com/p/501454734

https://zhuanlan.zhihu.com/p/142897766

https://zhuanlan.zhihu.com/p/142899252

https://blog.csdn.net/kobepaul123/article/details/128796839

https://zhuanlan.zhihu.com/p/401385193

Guess you like

Origin blog.csdn.net/zalman123456/article/details/132646425