property multirow
Hi guys,
I have a test case with:
1)request(REST Request)
2)data source(Verify Fattura)
3)assertion(assertion fattura)
In datasource, I run a query that extract more than one row, I set 2 properties cod_num_documento,imp_documento
I have to fetch properties results, and I use a groovy script, for the moment script below extract only one row, but I tried in different mode.
import groovy.json.*
import groovy.util.*
import java.util.logging.Logger
def username = testRunner.testCase.testSteps["Verify Fattura"].getPropertyValue( "cod_num_documento" ) //.ge testSuite.getPropertyValue( "cod_num_documento" )
def foo = context.expand( '${Verify Fattura#cod_num_documento}' )
//def a = ${Verify Fattura#cod_num_documento::1}
//Parse JSON content in the request
def cod_num_documento = context.expand('${Verify Fattura#cod_num_documento}[0]')
def imp_documento = context.expand('${Verify Fattura#imp_documento}')