Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Testing web services
(SOAP)
PIOTR BOHO
SENIOR TEST AUTOMATION ENGINEER IN KAINOS
1
2
Agenda
1. What is SOAP webservice – tester perspective
2. Manual testing approach
3. Pro / cons manual tests
4. Automated ...
What is SOAP webservice
Comunication
4
<request>
Webservice
http://endpoint
OperationAAA
OperationBBB
<response>
Client SO...
5
What is SOAP webservice
6
request response
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd=...
Manual approach – when is sufficient
Valid payloads provided
One time test
The same version of contract
Artifacts (WSD...
Manual approach – live scenarios
Requests with frequently changes data e.g. Date
Test flow requires dependent webservise...
Manual approach - tests maintanance
problem
Application under development changes !
Refactoring:
◦ Namespaces
◦ Tag names
...
Programming approaches
1.Xml as text – string builders, parametrization, parsers
regex,
2.Xml as DOM – DOM builders and xP...
Payload as serialized object
Request validation using schema from WSDL
Get rid of XML as text – lets use OOP
◦ Early and s...
16
17
Q&A
18
org.apache.cxf.jaxws.JaxWsProxyFactoryBean
piotrboh@gmail.com
Upcoming SlideShare
Loading in …5
×

Piotr Boho - testing web services (soap)

606 views

Published on

Piotr Boho - testing web services (soap)

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Piotr Boho - testing web services (soap)

  1. 1. Testing web services (SOAP) PIOTR BOHO SENIOR TEST AUTOMATION ENGINEER IN KAINOS 1
  2. 2. 2
  3. 3. Agenda 1. What is SOAP webservice – tester perspective 2. Manual testing approach 3. Pro / cons manual tests 4. Automated testing approach: 1. text 2. XML 3. Object 3
  4. 4. What is SOAP webservice Comunication 4 <request> Webservice http://endpoint OperationAAA OperationBBB <response> Client SOAP
  5. 5. 5
  6. 6. What is SOAP webservice 6 request response <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > <soap:Body> <GetWeather xmlns="http://www.webserviceX.NET"> <CityName>gdansk</CityName> <CountryName>poland</CountryName> </GetWeather> </soap:Body> </soap:Envelope> <soap:Envelope ...> <CurrentWeather> <Location>Gdansk-Rebiechowo, Poland (EPGD) 54-23N 018-28E 138M</Location> <Time>Jun 08, 2015 - 06:00 AM EDT</Time> <Wind>from the NW</Wind> <Visibility>greater than 7 mile(s):0</Visibility> <SkyConditions>partly cloudy</SkyConditions> <Temperature>60 F (16 C)</Temperature> <RelativeHumidity>51%</RelativeHumidity> <Pressure>30.30 in. Hg (1026 hPa)</Pressure> <Status>Success</Status> </CurrentWeather> p a y l o a d
  7. 7. Manual approach – when is sufficient Valid payloads provided One time test The same version of contract Artifacts (WSDL or client stub classes) not available 8
  8. 8. Manual approach – live scenarios Requests with frequently changes data e.g. Date Test flow requires dependent webservise calls Big responses like 5MB to validate 9TESTING WEB SERVICES (SOAP) - PIOTR BOHO
  9. 9. Manual approach - tests maintanance problem Application under development changes ! Refactoring: ◦ Namespaces ◦ Tag names Functional change: ◦ Move element ◦ Add element ◦ change schema constraint : optional/required, order of elements, number of elements, change type or pattern 10TESTING WEB SERVICES (SOAP) - PIOTR BOHO
  10. 10. Programming approaches 1.Xml as text – string builders, parametrization, parsers regex, 2.Xml as DOM – DOM builders and xPath etc 3.Xml as serialized object – OOP and JAXB 11
  11. 11. Payload as serialized object Request validation using schema from WSDL Get rid of XML as text – lets use OOP ◦ Early and strict change detection - Compiler Preparing client stub: ◦ java org.apache.axis.wsdl.WSDL2Java ◦ wsimport from JDK ◦ Maven cxf-codegen-plugin 13
  12. 12. 16
  13. 13. 17
  14. 14. Q&A 18 org.apache.cxf.jaxws.JaxWsProxyFactoryBean piotrboh@gmail.com

×