Groovy Scripts & Base64 Encoding
Hi guys,
I'm new to SoapUI and I'm currently creating a SOAP project to test an API and part of the XML request that is sent needs to include user authentication which is a base64 hash of the username and password.
At the moment I'm creating the hash using a simple python script then copy & pasting it in to my XML request which is fine for the moment but what I'd rather do is automate the generation of the hash and inserting it in to the request. What I'm trying to figure out is whether I can do this using a groovy script or if there is a way to get SoapUI to interact with my python script?
Any help appreciated.
Hi StooH :
You can store the output in class level property by following:
testRunner.testCase.setPropertyValue("KEYNAME", OUTPUT);
and store where ever in Test Case you wanted to use if you want to use by following:
context.expand('${#TestCase#KEYNAME}')