zoukankan      html  css  js  c++  java
  • httprunner(10)日志信息

    日志信息

    每个用例都会生成一个对应的log日志,位置:<ProjectRootDir>/logs/TestCaseID.run.log.
    如果你想看到request和response、提取和断言的详细信息,可以增加-s(--capture=no的缩写)
     

    测试用例ID和Request ID

    为排除故障,每个测试用例将生成唯一ID(uuid4),每个request header将自动添加一个带有测试用例ID的HRUN-Request-ID

    HRUN-Request-ID = "HRUN-<TestCase ID>-<timestamp_six_digits>"
    
    • TestCase ID:测试用例的唯一ID
    • timestamp_six_digits:timestamp_six_digits = str(int(time.time() * 1000))[-6:])

    换句话说,同一个测试用例中的所有request有同样的HRUN-Request-ID前缀,并且每个请求有唯一的HRUN-Request-ID后缀,因为时间戳不一样

     

    Client & Server IP:PORT

    当我们分布式执行用例的时候,发生错误时,想知道是哪一台返回的。
    从3.0.13开始,HttpRunner将在调试阶段记录客户端和服务端IP:PORT,同时日志中也会体现出来

    2021-02-09 17:58:28.874 | DEBUG    | httprunner.client:request:186 - client IP: 192.168.0.141, Port: 53538
    2021-02-09 17:58:28.874 | DEBUG    | httprunner.client:request:194 - server IP: 3.226.45.131, Port: 443
    
  • 相关阅读:
    父进程pid和子进程pid的大小关系
    static 和extern关键字
    linux源码下载
    tar命令
    USB开发——内核USB驱动+libusb开发方法
    microchip PIC芯片使用方法
    android下4G上网卡
    Modem常用概念
    4G上网卡NIDS拨号之Rmnet驱动
    Uboot源码解析
  • 原文地址:https://www.cnblogs.com/jiakecong/p/14393740.html
Copyright © 2011-2022 走看看