if __name__ =="__main__":
  #运行标记为markA的用例,并生成测试报告
  pytest.main(["-m=markA","--html=report.html"])

 

大部分资料中都说要在terminal终端运行,所以个人习惯直接写在os.system()里,相对上面的写法,下面这种就是终端怎么写这里怎么写就可以了。

if __name__ =="__main__":
  #运行标记为markA的用例,并生成测试报告
   os.system('pytest -m "markA" --html=report.html --self-contained-html')

相关文章:

  • 2021-11-14
  • 2021-05-19
  • 2021-07-24
  • 2022-12-23
  • 2021-07-09
  • 2022-12-23
  • 2021-12-09
  • 2022-02-16
猜你喜欢
  • 2022-12-23
  • 2021-09-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
相关资源
相似解决方案