Posts in Test Automation
SOAP request with Ruby
I had a hard time finding examples while trying to get code to test a SOAP service with Ruby. Therefore, I thought I would add an example to the Google code repository. In the end I didn't get this working, this is the final work of a developer named Jim Johnson. I got started down the road and Jim came along and finished it up.



require 'soap/element'
require 'soap/rpc/driver'
require 'soap/processor'
require 'soap/streamHandler'
require 'soap/property'

LOCALHOST_ENDPOINT = "http://localhost:8080/services/Service"
request_xml_string = 'xml...'
stream = SOAP::HTTPStreamHandler.new(SOAP::Property.new)

header = SOAP::SOAPHeader.new
body_item = SOAP::SOAPElement.new('getResponse', request_xml_string)
body = SOAP::SOAPBody.new(body_item)
envelope = SOAP::SOAPEnvelope.new(header, body)
request_string = SOAP::Processor.marshal(envelope)
request = SOAP::StreamHandler::ConnectionData.new(request_string)

resp_data = stream.send(LOCALHOST_ENDPOINT, request, 'getResponse')

puts "Got response:"
puts resp_data.receive_string
Hidden XML Tool
For those of you who don't know, I'm a avid user of the IBM Rational tools. I don't necessarily think they're that much better then any other commercial test tool, but I've done a lot of work with them. I know them fairly well, and they've been good to me over the past few years. All said and done they get the job done.

Having said that, I use the Rational tools a lot.

Recently I've also been doing a lot of web service testing which means I'm looking at a lot of XML. Imagine my surprise today when someone told me that there is an XML diff tool included in the Rational suite of tools. Shocked that I didn't know such a thing, I checked it out. You can find it here: "C:\Program Files\Rational\ClearCase\bin\xmldiffmrg.exe"

So clearly, I don't do a lot with ClearCase or I would already know about this tool.

Either way, I checked it out and I kinda like it. I figure if I didn't know it was there, others might not as know either. If you're paying for the Rational suite of tools, you need to get all the mileage out of them that you can.

If anyone else knows of any other hidden utilities or tools they would like to share, feel free to post them below (Rational related or not). Let's get the word out. I don't like it when I have useful tools installed that I don't even know I have.