zoukankan      html  css  js  c++  java
  • 20191011-构建我们公司自己的自动化接口测试框架-ProVar模块

    ProVar模块主要定义测试数据所在目录,以及定义变量和测试数据excel里面的column对应这样后续在进行excel操作的时候直接使用变量即可进行操作,后期excel的column有增删的时候,修改ProVar里面的的变量即可,无需逐一每一个涉及到excel column行数对应的代码文件。

    import os.path
    PardirPath= os.path.dirname(os.path.dirname(__file__))
    ExceldirPath = PardirPath+"\TestData\testdata.xlsx"
    Test_Suit_isExecute =3
    conf_path = os.path.join(PardirPath,"config","Logger.conf")
    
    
    Test_Suit_sheet = "Test_Suit"
    Test_Suit_map_serials_col_no = 0
    Test_Suit_is_executed_col_no = 3
    Test_Suit_is_executed_mode_col_no = 4
    Test_Suit_execute_data_col_no = 5
    Test_Suit_execute_result_col_no = 6
    Test_Suit_execute_time_col_no = 7
    Test_Suit_test_step_sheet_name_col_no = 2
    #测试案例数据对应的列号
    Test_Case_serials_col_no = 0
    Test_Case_name_col_no = 1
    Test_Case_action_col_no = 2
    Test_Case_baseurl_col_no = 3
    Test_Case_header_col_no = 4
    Test_Case_auth_col_no = 5
    Test_Case_body_col_no = 6
    Test_Case_isExecute_col_no = 7
    Test_Case_executeResult_col_no = 8
    Test_Case_result_content_col_no = 9
    Test_Case_var_get_col_no = 10
    Test_Case_var_result_col_no = 11
    Test_Case_assert_content_col_no = 12
    Test_Case_assert_word_col_no = 13
    Test_Case_assert_result_col_no = 14
    Test_Case_exception_col_no =15
    Test_Case_execute_time_col_no =16
    
    #断言结果数据对应的列号
    Assert_word_col_no = 2
    Assert_result_col_no = 3
    Assert_time_col_no = 4
    
    
    
    if __name__ == '__main__':
        print(PardirPath)
  • 相关阅读:
    Windows编译openssl3
    【转】FFmpeg采集设备
    构建FFmpeg项目时链接报错avformat_alloc_context未定义
    anaconda代理设置
    静态链接导致的一个bug分析
    Qt如果发送信号过快会如何?
    关闭Edge浏览器多窗口Alt+Tab组合键切换
    [转]Windows上的valgrinddeleaker
    在qt项目中编译错误error ::clock未声明
    使用单元测试驱动开发的方式编写flask应用
  • 原文地址:https://www.cnblogs.com/hyj691001/p/11654505.html
Copyright © 2011-2022 走看看