Interface automation test framework and main knowledge points of interface test automation

Interface automation testing framework:

  • Interface testing framework: use the most popular Requests for interface testing
  • Interface request construction: Common HTTP request constructions such as GET/POST/PUT/HEAD 
  • Interface test assertion: assertion of status code, return content, etc.
  • JSON/XML request: send json\xml request
  • JSON/XML response assertion: assert using json path \xpath
  • Schema assertion: Format assertion for a large number of response data fields
  • Header cookie processing: header customization and cookie reuse
  • Certification system: http basic, oauth2 and other certification systems for testing

Interface testing framework and practice:

  • Interface process encapsulation and definition: interface test case analysis and general process encapsulation
  • Test case design based on encryption interface: use encapsulation to complete encryption and decryption processing
  • Interface testing in multiple environments: use the automatic processing of encapsulation and adding Header to realize multi-environment testing without changing the Host.
  • API Object Patterns and Principles: Application of Page Object Patterns in Interface Testing.
  • Application of API Object mode: Encapsulation and reuse of enterprise WeChat interfaces.
  • General API encapsulation: definition and encapsulation of general interface protocols
  • Data-driven test steps: implement test step definitions based on YMAL and JSON
  • Data-driven test data: read external data sources based on YMAL and JSON
  • Data-driven configuration: management of key configurations based on YMAL and JSON
  • General Test Case Encapsulation: Inheritance System Design of Test Cases
  • General test framework architecture: the architecture and use of a general interface test framework

 

Main knowledge points of interface test automation: HTTP protocol, Fiddler packet capture tool, data format, requests library, python foundation, unittest framework and DDT, data encryption.

HTTP protocol:

  • HTTP protocol request message format
  • HTTP protocol response message format
  • Features of the HTTP protocol
  • Several commonly used request methods such as POST/GET/DELETE/PUT
  • The role of content-type, commonly used content-tpye
  • The difference between get request and post request
  • The concept, difference and connection of session/cookie
  • Session management mechanism (creation, expiration, logout)

Fiddler capture tool:

  • Installation, principle, use of filters, HTTPS certificate settings, use fiddler to view request messages and response messages
  • The inspector panel of fiddler checks the request message and response message, and the AutoResponder panel mocks a response
  • fiddler breakpoint function

Data Format:

  • Master x-www-form-urlencoded form encoding format
  • json syntax format
  • The four basic types of json
  • Objects, arrays, object nesting of json

requests library:

  • post/get/delete/put requests sent by the requests library
  • The help documentation of the requests library to view related functions
  • Use of params/data/json parameters
  • Use of parameters such as cookies/headers/verify/proxies
  • According to the interface document, find the corresponding parameters and construct the corresponding request
  • Master the four message body formats returned by several response objects

Python basics:

  • Methods of creating projects, creating packages, folders, configuration files, etc. in pycharm
  • Function definition and function
  • f-strings/format formatting grammar format and characteristics
  • The use and function of global variables
  • How to read test cases in excel
  • How to write test results back to excel
  • method of generating random numbers
  • unpacking method
  • Basic operations on dictionaries and lists
  • method of catching exception
  • The difference between interface automation test cases and UI test cases, and can design

unittest framework and DDT

  • The four components of the unittest unit testing framework
  • Unittest test case, grammar and use of test firmware
  • Several methods of unittest test suite
  • Use of the unittest test runner
  • Use of HtmlRunner plugin
  • DDT data-driven syntax, why use DDT
  • Under the unittest framework, run excel automated test cases

Summarize:

Thanks to everyone who read my article carefully! ! !

 I personally sorted out some technical materials I have compiled in my software testing career in the past few years, including: e-books, resume modules, various job templates, interview books, self-study projects, etc. Welcome everyone to click on the business card below to get it for free, don't miss it.

Guess you like

Origin blog.csdn.net/MXB1220/article/details/132277105