Tuesdays Tips - Test Case with Excel Spreadsheet containing variables in columns to construct commands.

Discussion created by dovle01 Employee on May 6, 2015

Basic Premise:


Need to construct a test case to exercise various start and end points within the SUT based on the input provided.  The Excel spreadsheet needs to have variable commands per row to reduce the number of spreadsheets needed to maintain.  In addition, the values from the Excel columns are to be used in another column as variable inputs to allow various commands to be tested with positive and negative testing structures.


Constraints to be aware of:


  • In ANY test case within DevTest Solution, the Excel spreadsheet is read in one row at a time top to bottom.
  • In addition, the columns are read left to right.



Potential pitfalls that are easy to avoid:


  • Make sure that when you use the variables in the constructed command, use the {{}} construct to identify the variable via the column label.
  • Make sure that all the variables are in columns PRIOR to the column that the constructed command is in.   If you do not, then the previous rows values will be used in the columns that have not been read.


Example of correctly constructed Excel spreadsheet:


Row CounterInput_1Input_2Input_3Command_TypeCommand_Construct_Column
Row 1000100010Fred Jones29.95DepositAccount Name:{{Input_2}};Account Number:{{Input_1}};Amount:{{Input_3}};EndTransaction;;
Row 2x000201021Marcia Muir406-555-1212UpdateAccount Name:{{Input_2}};Account Number:{{Input_1}};Alt Phone Number:{{Input_3}};Update;Email;EndTransaction;;


Please note that all inputs are before the column they are used in.  All variable inputs are surrounded by {{}}.