Following steps will guide you how to do data driven tests by using Excel file.
1. Create a Java Project
2. Create a JUnit Test case called "DataDrivenTestUsingXL"
3. Add junit and selenium-server jar files to build path
4. Create a folder called "test-data"
5. Create a excel file called test-data.xls"
6. Under "Sheet1" add the test data as shown below
Figure: Test data in Excel file |
Figure: Data driven test using excel file |
No comments:
Post a Comment