Wednesday, March 9, 2011

Data Driven Test Using Text file


Following steps will guide you how to do data driven tests by using Text file.

1. Create a Java Project

2. Create a JUnit Test case called "DataDrivenTestUsingTxtfile"

3. Add junit and selenium-server jar files to build path

4. Create a folder called "test-data"

5. Create a text file called test-data.txt" under test-data folder

6. Add followings in test-data.txt file - page design, page updates (one below the other as shown in the following figure)
Figure: Test data in Text file
7. Copy the following code and run the test script
Figure: Data Driven Test Using Text file

No comments:

Post a Comment