TestNG with IntelliJ IDEA: How to use the testng.xml file in IntelliJ IDEA 9

后端 未结 4 865
长发绾君心
长发绾君心 2021-01-04 09:33

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

相关标签:
4条回答
  • 2021-01-04 09:50
    1.Navigate to Run in the top menu
    2.select the Run...
    3.when the popup window get open go to the configuration
    4.select test kind as suite
    5.select the location of your xml file in Suite option 
    6.click on run button your testng.xml file will run
    

    0 讨论(0)
  • 2021-01-04 10:07

    Just Add this Plugin "Create TestNg XML"

    & restart your Intellij IDE.

    then :

    1. Right-Click on Your Project.
    2. Click on "Create TestNG XML" Image 1
    3. You will Get a Confirmation Dialog it will Show the Path Of Created XML File, Click "Ok". Image 2
    4. Again Right-Click on Your Project & then click "Synchronize 'Your Project Name'". Image 3
    5. You will find a newly created TestNG.xml file in your Project. Image 4
    0 讨论(0)
  • 2021-01-04 10:14

    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.

    0 讨论(0)
  • 2021-01-04 10:15

    Follow this link - http://www.jetbrains.com/idea/webhelp/run-debug-configuration-testng.html#config

    There is an option just before the run icon that allows you to add the testng.xml file. In the run config dialog select the suite option. Then select the testng file. It worked for me.

    Hope it helps.

    0 讨论(0)
提交回复
热议问题