ERROR: An error occurred [empty String], see error log for details
Hi i have a need to validate two data sources using nested loop on multiple records in several tables Steps
- Build a Rest Request
- get the datasource
- getting the data from db as expected result
- write a groovy script inorder to get a value to be validated with db
- Asert the values are equal
Issue : I have multiple empty values in the data sources from the api(actual value) and expected value db Question : When i run my script i am getting this error ERROR: An error occurred [empty String], see error log for details for empty values asserted . Please help as i am on a deadline and am unable to find a solution online .
double commitmentqauterQ1 = commitmentQ1 ? commitmentQ1.toDouble() :1 ;
double ContractDomainqauterQ1 = contractDomainQ1 ? contractDomainQ1.toDouble() : 1 ;
double tierPriceqauterQ1 = tierPriceQ1 ? tierPriceQ1.toDouble() : 1 ;
int prorateddaysQ1 = proratedQ1.toInteger();
int QtyQ1 = planqtyQ1? planqtyQ1.toInteger() : 0 ;
double PriceQ1 = tierPriceQ1 ? tierPriceqauterQ1 : intelPrice.toDouble()
def planCostQ1 = (PriceQ1.toDouble() * QtyQ1.toInteger() * prorateddaysQ1.toInteger() * ContractDomainqauterQ1.toDouble() * commitmentqauterQ1.toDouble()).round(1)
def expectedCostQ1 = queryplancostQ1.toDouble().round(1)
//log.info("planCostQ1 $planCostQ1")
//log.info("expectedCostQ1 $expectedCostQ1" )
assert planCostQ1 == expectedCostQ1
log.info("Assertion passed !! $planCostQ1 | $expectedCostQ1")