Service Virtualization

LISA SDK: Assert JDBC Result Set with an Excel Sheet 

Apr 29, 2015 01:09 AM

Description

In Lisa, there is a JDBC step to execute SQL query or a Stored Procedure which in results will fetch a Result Set. This LISA SDK (assertion) helps in comparing the Result Set of a JDBC Step to an Excel file in your file system.

 

Set-Up Instructions

1.      Navigate to {LISA_HOME}/hotDeploy directory and place the “assertResultSet.jar”

Capture.PNG

2.      Navigate to {LISA_HOME} and open the file “typemap.properties” with notepad. Navigate to Filters section of the file and insert below text as shown

“,com.itko.lisa.customAssert.AssertJDBCWithExcel\”

Capture.PNG

3.      Restart LISA, if it is in running state.

Steps for Implementation:

1.      Create a Project in LISA workstation.

Capture.PNG

2.      Create a Test Case.

Capture.PNG

 

3.      Add a Test Step -> JDBC Step

Capture.PNG

 

4.      Open the step and provide either a SQL query or Stored Procedure call Statement.

Capture.PNG

5.      On the right side, under Step Information, Click on  button under Assetion Section and select assertion “Compare JDBC Result Set with an Excel File” under Custom.

 

Capture.PNG

 

 

6.      Open the Assertion and provide values for Location and Sheet Name.

Capture.PNG


7.      Click Start a new ITR and execute the Test Case.

8.      In case of mismatch, it will automatically set a property named “assertion.error.log” with value as a log where it got mismatch.

Capture.PNG


Note: It won’t compare column names. Comparison will be done on row by row basis.

Benefits:

  1. Generic Utility, Plug and Play.
  2. Save Manual and Coding Efforts
  3. Time Saving as Java Step/scripted assertion consumes more time to execute.

Statistics
0 Favorited
2 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.