The latest interface automation test source code

Simple flow chart:
Insert picture description here
Module description:
DataCenter: data center, mainly saves test environment information, database connection configuration (env), and test report save (test_demo.html)
logs: log operation center, saves execution process related logs
Public: public functions. The custom functions needed for the use case are written here.
PublicCenter: Factory. Including data request (apiRequests), data operation (Case_Get_Data), database operation (DataManangerl), log definition (logUtil), read data (ReadeYaml), test report processing (TestReport).
RunCase: program entry
source code portal

Keywords:

  • CaseNo: 1 -----------------------------------------------
    -Use case number Extract: --------------------------------------------- ---Use case variables, the variables that need to be used in the use case are defined here, and the call is in the form: variable variablesVariable amount
    biz_no: ----------------------------------------------
    --Variablenamesql-test: select biz_no from ** ------Variation to check the database like: sql-library name
    user:'xx' ---------------- ------------------------- Variable character
    headers:
    fun: get_sid('env','**')-------- --------Variable custom function: fun:
    Preposition: --------------------------------- --Depending on use case keywords
    • 1 -------------------------------------------------
      --Depending on the use case number ProjectName: ** ---------------------------------------module name
      CaseNmae: ** --------------------------------------- Use case name
      Method: post - -----------------------------------------Interface request method
      param: ---- ----------------------------------------------Parameter identification
      method: xxxxxx
      bizContent:
      taskNoList:
      • key: b i z n o biz_no bizno -------------------------------------Use variable
        value: sql-axx:select * from xx - is to use variables and operate database query and replace, database format into sql-library name: productCode
        :1 11 :res["flag"] ---------------------------------Use dependent use case results, return value
        toUser:user useru s e r ---------------------------------------- Use variable
        headers: - -------------------------------------------------header Identify
        Cookies:headers headersh e a d e r s --------------------------------------- Use variable
        ExpectedResults: -----------------------------------------Assertion identification, list format, temporarily support database Comparison and comparison of interface results. The first value of the list is the actual result, and the second value is the expected result (interface comparison: -res['flag']-S)
    • sql-axx: select user_no from xx
    • xiaoming

Guess you like

Origin blog.csdn.net/kairui_guxiaobai/article/details/111152313