Forum Discussion
Radford
7 years agoSuper Contributor
You should be able to do this with a Groovy Script Test Step, using code something like:
// You may have to escape backslashes, or store the file path and name as a URI def yourFilename = 'Obtain filename from data source' def file = new File(yourFilename) def base64encodedData = file.getBytes().encodeBase64().toString() log.info('Base64 data = ' + base64encodedData) def soapRequestData = 'Build your SOAP request with Base64 data here' testRunner.getTestCase().getTestStepByName('SOAP Request').setPropertyValue('Request', soapRequestData)
If you are unsure how to get the filename from the data source via Groovy, you can use the point and click Get Data GUI method.
Related Content
- 5 years ago
- 7 years ago
- 3 years ago
- 11 years ago
Recent Discussions
- 19 days ago