Forum Discussion
nmrao
7 years agoChampion Level 3
Well, there are two options.
1. Use data driven approach, run the jdbc step in a loop.
2. The same can be done in single step if groovy script step is used. Please find the sample code snippet:
http://grails.asia/groovy-sql-insert-operation-example
1. Use data driven approach, run the jdbc step in a loop.
2. The same can be done in single step if groovy script step is used. Please find the sample code snippet:
http://grails.asia/groovy-sql-insert-operation-example
- SBK7 years agoNew Contributor
If we run the jdbc step in a loop, we are establishing the connection and disconnecting it for each SQL Statement right??
- groovyguy7 years agoChampion Level 1
SBK : here's the documentation for Property Expansion. ReadyAPI Property Expansion
- nmrao7 years agoChampion Level 3Yes, I believe so.
If you want to avoid that, then use groovy script.- SBK7 years agoNew Contributor
In below code sample, it is not going into If statement, Please correct me if I am doing something wrong.
DBFL = [CQ, 789, J34]
RSFL = [J34 , 789 ]DB = DBFL.size()
RS = RSFL.size()for (j=0;j<DB;j++)
{
for (k=0;k<RS;k++)
{
if (DBFL[j] == RSFL[k])
{
log.info DBFL[j]
log.info RSFL[k]
assert DBFL[j] == RSFL[k]
}
}
}