06-05-2008, 10:17 PM
Aakansha,
The only piece of code that you need to write is to retrieve data from an Excel Sheet. I recommend this method because regardless of what changes that your application encounters, all you will have to do is modify the Excel Sheet, without having the need to even touch any of your functions. This is the same for the case where you have to omit some values or add some.
To start, you will need to just load the Excel sheet with the required data that needs to be read and compared with. To make it easier, you can give each column heading a name (@ Row = 1). For example, in your State case:
Column 1: StateLong
Column 2: StateShort
In your comparison, you will read from the 'StateShort' column and compare the value in the corresponding row from Column 1. Everytime you need to do this comparison, you will call the same function, making it easier for you to read when you encounter an error and also easier for you to modify the function/Excel sheet.
This is going to work like a charm regardless of the number of test cases in your test suite. In my Framework, I have used a similar approach to check application values from Checkpoint columns and I can run a single test for different values by just modifying my Excel Sheet.
The only piece of code that you need to write is to retrieve data from an Excel Sheet. I recommend this method because regardless of what changes that your application encounters, all you will have to do is modify the Excel Sheet, without having the need to even touch any of your functions. This is the same for the case where you have to omit some values or add some.
To start, you will need to just load the Excel sheet with the required data that needs to be read and compared with. To make it easier, you can give each column heading a name (@ Row = 1). For example, in your State case:
Column 1: StateLong
Column 2: StateShort
In your comparison, you will read from the 'StateShort' column and compare the value in the corresponding row from Column 1. Everytime you need to do this comparison, you will call the same function, making it easier for you to read when you encounter an error and also easier for you to modify the function/Excel sheet.
This is going to work like a charm regardless of the number of test cases in your test suite. In my Framework, I have used a similar approach to check application values from Checkpoint columns and I can run a single test for different values by just modifying my Excel Sheet.