17 years ago
Groovy function accessible to all tests
Hi,
I am using the free version of SOAPUI 2.5.1 and I am trying to write a function or subroutine that I can use or call from any groovy script test step. Ex.
// this is the part i want to be reusable in any test step from any test case
// in the same test suite...
// subroutine example
def add (num1, num2) {
num1 + num2
}
// an example of the calling line that i can call in any groovy script test step
// from any test case belonging to the same test suite
log.info "" + add(1, 2)
Any help is much appreciated.
Thanks.
I am using the free version of SOAPUI 2.5.1 and I am trying to write a function or subroutine that I can use or call from any groovy script test step. Ex.
// this is the part i want to be reusable in any test step from any test case
// in the same test suite...
// subroutine example
def add (num1, num2) {
num1 + num2
}
// an example of the calling line that i can call in any groovy script test step
// from any test case belonging to the same test suite
log.info "" + add(1, 2)
Any help is much appreciated.
Thanks.