首次使用testNg,配置xml文件(idea)

配置xml文件

idea下配置testNg文件

idea下载:TestNG XML并安装

File -> settings -> Plugins -> 搜索Create TestNG XML并安装
首次使用textNg,配置xml文件
首次使用textNg,配置xml文件

重启IntelliJ IDEA -> 选择项目名称 如TestngDemo -> 右键 -> Create TestNG XML -> OK

首次使用textNg,配置xml文件

打开testng.xml -> Code -> Reformat code

项目中含有@test
自动配置到test.xml文件中去
首次使用textNg,配置xml文件

右键 -> Run testng.xml

这就可以有运行结果了

首次使用textNg,配置xml文件

生成Test Report, 那么如何解决这个?

testng.xml -> Edit Configurations… -> Listeners -> Use default reporters -> Apply -> OK

首次使用textNg,配置xml文件
首次使用textNg,配置xml文件

1.之后再次Run testng.xml
2.打开test-output文件夹 -> emailable-report.html -> 右键 -> Open in 3.Browser -> Default
4.查看TestNG report

相关文章:

  • 2022-12-23
  • 2021-09-12
  • 2021-09-24
  • 2022-02-01
  • 2021-12-01
  • 2021-10-02
  • 2022-02-15
猜你喜欢
  • 2022-01-12
  • 2021-11-22
  • 2021-06-04
  • 2021-10-11
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
相关资源
相似解决方案