14 years ago
How-to execute a Wsdl request in groovy script?
I am currently modularising some complicated functional tests that use multiple soap requests, which use a common session UUID for authorisation to the web services.
I'd like to refactor them into a set of test cases that can be called as 'Run TestCase' steps that obtain the session UUID from a test case property.
It would be most convenient to place the initial 'login' WSDL Request that obtains the UUID in my TestCase setup script, with a corresponding 'logout' request in the teardown script.
The UI provides a clunky way of doing this that requires a SOAP Test request and a groovy script to transfer the property at the start of every test case, but if I can do this in code, it will be much easier to reuse, packaged as a class to be put in the bin/scripts directory.
I've spent too much time already, digging through the JavaDocs, and would really appreciate some example code if others have done something similar.
I'd like to refactor them into a set of test cases that can be called as 'Run TestCase' steps that obtain the session UUID from a test case property.
It would be most convenient to place the initial 'login' WSDL Request that obtains the UUID in my TestCase setup script, with a corresponding 'logout' request in the teardown script.
The UI provides a clunky way of doing this that requires a SOAP Test request and a groovy script to transfer the property at the start of every test case, but if I can do this in code, it will be much easier to reuse, packaged as a class to be put in the bin/scripts directory.
I've spent too much time already, digging through the JavaDocs, and would really appreciate some example code if others have done something similar.