Selenium 2 and TestNG

visibility 3 tontonan schedule 14 tahun yang lalu timer 5:43
open_in_new Dailymotion
We run testing workshops. check out www.time2test.co.uk<br /><br />Video details:<br />1. in this video , we are going to record a Selenium IDE script and change it into JAVA code and then run on the TestNG Framework<br />2. OPen up Selenium IDE<br />3. click on Red Record BUtton to record a script<br />4. navigate to foundation.time2test.co.uk<br />5. Login using admin/time4test<br />6. Click on "add new"<br />7. Enter Title for post and click publish<br />8. Save the test case as "quicktest.html"<br />9. Now convert the .html into JAVA format<br />10. in Selenium IDE , goto File->Export Test Case As...->TestNG (remote Control)<br />11. Save the file as "quictest.java"<br />12. We have already created a Project Directory based on TestNG framework<br />D:\TestNGProject\<br /> build\<br /> config\<br /> Single.xml - contains xml entry to quicktest.java<br /> lib\<br /> junit.jar<br /> selenium jar files<br /> selenium-java-client-driver<br /> selenium-server<br /> testng.jar<br /> testng-5.5-jdk15<br /> selenium-grid-tools.jar<br /> test\<br /> Quicktest.java - pre-created test framework<br /> build properties file - contains ws.home<br /> build.xml<br />13. Now copy the test method in the recorded/converted script into \test\quicktest.java<br />14. now open single.xml and ensure that class name and method name as per the java file<br />15. Now open build.xml and match up the target name<br />16. Start the selenium server<br />17. open up new command prompt<br />18. cd d:\TestNgProject\<br />19. enter command >ant single<br />20. notice the selenium script execute<br />21. Goto Test-output directory<br />22. open up the results file<br />23. Green indicates that the script ran successfully.