Web services testing : Object Identification and Technologies

Web services testing

Technology specific object identification, supported applications, web technologies, and 3rd party controls.

Web services testing

Postby daa » Wed Sep 30, 2009 4:10 pm

We're already using Ranorex to test out native windows and web applications, but what support is there for webservice testing, please? We provide a number of webservice links via a .asmx page, and we'd like to automate some tests for them.
David Allsopp,
Test Automation Engineer, Mitrefinch Ltd.
User avatar
daa
 
Posts: 23
Joined: Tue May 19, 2009 3:01 pm
Location: York, UK

Re: Web services testing

Postby Support Team » Thu Oct 01, 2009 5:46 pm

Because Ranorex is a GUI test framework, there is no testing support for webservices per se.
However, Ranorex Studio supports adding web references (Project->References->Add web reference)
which allows direct access to web services in your test scripts. This can be used, for example,
to make web service calls within User Code actions in Recorder.

Michael
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4285
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Web services testing

Postby daa » Fri Oct 02, 2009 9:36 am

OK, I've had a search through the help and around the Ranorex site, and I can't find anything...

So, let's assume I know nothing about web references in Ranorex (this is a very good assumption). How do I go about calling the service? Does it appear as some kind of function call? I can do the 'Add web reference' thing, and the 'Available web services' tab shows the services I expect to see. If I want to use, say, the 'WebServerTime' service to ask the time, what sort of code is it, please? And do you have any examples or stubs to get me started?

I have added this service, and I now get a 'Web References' item in the 'References' tree in Studio, showing a .map, a .disco, and a .wsdl file.

Thanks in advance.
David Allsopp,
Test Automation Engineer, Mitrefinch Ltd.
User avatar
daa
 
Posts: 23
Joined: Tue May 19, 2009 3:01 pm
Location: York, UK

Re: Web services testing

Postby Support Team » Fri Oct 02, 2009 2:10 pm

There is no documentation for web services in Ranorex because they are standard functionality of the .NET framework and not part of Ranorex. (But they can be used in Ranorex Studio like everything else in the .NET framework)

So if you have your "WebServerTime" web service, add a web reference by using the web service URL of your web service.
When adding, it is probably best to set the namespace to the same namespace as your test script.

(the name of the webservice class itself is determined by the WSDL, not the reference name)

Then you can just call methods on the web service in your test script (or recorder user code actions), e.g.

WebServerTime timeService = new WebServerTime();
// assuming there is a "GetTime" method in your webservice
DateTime myTime = timeService.GetTime();


Hope this helps,
Michael
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4285
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Web services testing

Postby daa » Fri Oct 02, 2009 2:41 pm

OK, good, that's beginning to make sense now. A further look at the Web Reference shows a generated .cs file that seems to contain class definitions for an interface. I'm sure I can get the webservice developers to give me a quick tutorial on the rest.

Thanks
David Allsopp,
Test Automation Engineer, Mitrefinch Ltd.
User avatar
daa
 
Posts: 23
Joined: Tue May 19, 2009 3:01 pm
Location: York, UK


Return to Object Identification and Technologies

Who is online

Users browsing this forum: No registered users and 1 guest