Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am in need of exporting a particular value to an excel sheet based on the result i get from my groovy script.

TOOL: SOAP UI

NOTE: I have written assertion to validate something from response and trying to compare with expected value. For example purpose I am placing a small piece of code below

Example:

def tCase = "Identifier" //name of test case
def ApprovedMargin = "2.2"
def result = "2.2"

if (ApprovedMargin.equals(result))
{
log.info "Check is passed"
}
else
{
log.info "check is failed"
}
In this case., If the output is "Check is passed", then I want to write into an excel sheet placing the test case name in first column and PASS as the value in second column.

If the output is "Check is failed", then i want the second column to be populated as FAIL.

When the excel is opened, it should look something like this.

Test Case Status
Identifier PASS
Request you to kindly help me in achieving this.

What I have tried:

I am clueless as how to do this. Please help me creating the required code and get the values populated in excel sheet.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900