Thursday, March 3, 2011

Creating a Selenium RC - JUnit Test Case in Eclipse IDE

1. Open Eclipse IDE
2. Create a project
3. Create a package
4. Add JUnit, selenium-server jar files to build path
5. Right click on the project and select New -> JUnit Test Case (as shown in following figure)
Figure: JUnit Test case
6. In the "New JUnit Test Case" window, enter "Source folder", "Package" and "Name". Here name is java class name.
Figure: New JUnit Test Case
7. Now, copy and paste the following code into your test case
Figure: JUnitTestCase_01
8. Similarly, create the following test cases
Figure: JUnitTestCase_02
Figure: JUnitTestCase_03

No comments:

Post a Comment