Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alternative to Switch case- Multi Select with value match
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
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.
Reply


Messages In This Thread
RE: Alternative to Switch case- Multi Select with value match - by Anshoo Arora - 06-05-2008, 10:17 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question what is the shortcut key used to switch between keyword view and expert view in qtp. shaileshanand86 5 11,768 02-13-2019, 03:58 AM
Last Post: zia003
  type mis match vishnu 2 4,413 01-14-2012, 12:12 PM
Last Post: vishnu
Rolleyes How to select multiple choices from Multi-Select weblist blavanya 3 9,938 01-03-2012, 05:55 PM
Last Post: shivu.hanu
  Not Invoked particular Test Case kotaramamohana 6 4,351 12-30-2011, 05:39 PM
Last Post: ravi.gajul
  FOR loop with nested CASE wheelercha 2 3,541 12-12-2009, 10:45 PM
Last Post: upadhyay40

Forum Jump:


Users browsing this thread: 4 Guest(s)