使用IntelliJ IDEA的TestNG:如何在IntelliJ IDEA 9中使用testng.xml文件
我可以在IntelliJ中运行TestNG单元测试,并在窗口中查看通过/失败输出;这是不使用任何testng.xml文件。我也可以使用maven在命令行中运行测试,即mvn clean test -Dgroups = fast,这样可以正常工作。
I'm able to run TestNG unit tests in IntelliJ and see the pass/fail output in a window; this is without using any testng.xml file. I can also run the tests in the command-line using maven, i.e. "mvn clean test -Dgroups=fast", and that works fine.
我创建了一个testng.xml文件并将其添加到我项目的目录中,但它似乎没有任何效果。
I've created a testng.xml file and added it to my project's directory, but it doesn't seem to have any effect.
如何整合testng.xml文件的用法以在IntelliJ IDEA 9中定义我的测试执行?
How do I integrate the usage of a testng.xml file to define my test execution within IntelliJ IDEA 9?
1.转至Intellij>首选项>插件>验证是否已启用TestNG-J。
2.配置testNG xml文件并将其作为外部源提供,方法是编辑配置并选择套件并提供您创建的testNG xml的路径。
1.Go to Intellij>Preferences>Plugins>Verify that TestNG-J is enabled. 2.Configure the testNG xml file and provide it as an external source by going to edit configurations and selecting suite and providing the path of the testNG xml you created.