使用 Groovy 脚本的 SoapUI 操作符


// Addition of two number
int a;
int b;
int c;
// assign the value to the respected variable and b
a = 5;
b = 20;
// perform the sum of two number and assign their results to another variable c.
c = a + b;
// print the sum of two number using the groovy script
log.info ( "Sum of two number is :" + c) ); / log is a global variable, and info function is used to display the number. /

// Or we can use varibale in groovy Script follows as
a = 10 // assign varible a
b = 20 // assign varible b
c = a + b // Store the sum of a + b into c
log.info ( "Sum of two number is :" + c) // print the sum