I'm using Selenium WebDriver with Java and TestNG as Test framework. I'm using Eclipse (eclipse-jee-indigo-SR2-win32) as IDE. I want to execute my test (java file) in eclipse as TestNG test.
For example, I have Registration.java and I want to run within eclipse as TestNG test. For running this file I did the following steps:
But I didn't find any option of TestNG to run my test. What should be done in eclipse for this?
It needs to install TestNG plug-in for Eclipse. To do this follow the steps below:
[Note: Right click on Registration.java -> Mouse over Run As -> Click TestNG Test. Your test Registration would be executed]
Is it just this file that you can't run as a TestNG test or anything, ie have you configured Eclipse for TestNG at all yet? If not the first place to look is here http://testng.org/doc/eclipse.html
Please follow Koly answers. That is correct one!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.