Selenium 2 and TestNG

Selenium 2 and TestNG

We run testing workshops. check out www.time2test.co.ukbr 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 Frameworkbr 2. OPen up Selenium IDEbr 3. click on Red Record BUtton to record a scriptbr 4. navigate to foundation.time2test.co.ukbr 5. Login using admintime4testbr 6. Click on "add new"br 7. Enter Title for post and click publishbr 8. Save the test case as "quicktest.html"br 9. Now convert the .html into JAVA formatbr 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 frameworkbr D:\TestNGProject\br build\br config\br Single.xml - contains xml entry to quicktest.javabr lib\br junit.jarbr selenium jar filesbr selenium-java-client-driverbr selenium-serverbr testng.jarbr testng-5.5-jdk15br selenium-grid-tools.jarbr test\br Quicktest.java - pre-created test frameworkbr build properties file - contains ws.homebr build.xmlbr 13. Now copy the test method in the recordedconverted script into \test\quicktest.javabr 14. now open single.xml and ensure that class name and method name as per the java filebr 15. Now open build.xml and match up the target namebr 16. Start the selenium serverbr 17. open up new command promptbr 18. cd d:\TestNgProject\br 19. enter command ant singlebr 20. notice the selenium script executebr 21. Goto Test-output directorybr 22. open up the results filebr 23. Green indicates that the script ran successfully.


User: vipingupta

Views: 2

Uploaded: 2011-10-19

Duration: 05:43