SlideShare a Scribd company logo
1 of 12
Download to read offline
Yury Makedonov                                                                                      p. 1 of 12




          Functional Testing of Web Services

                                Yury Makedonov, CGI



          2004 International Quality Conference, Toronto, Ontario, Canada
     © Copyright 2004 – CGI Group Inc.                                        September 22, 2003
      September 22, 2004 Functional Testing of Web Services, QAI Conference                         1




  Agenda
        Why we are getting more and more
        web services testing

        What are web services

        What is XML

        How to test web services
             Test Approach

              Tools

        Summary

        Q&A

         Intended audience:
            Testers without development background

      September 22, 2004 Functional Testing of Web Services, QAI Conference                         2




International Quality Conference, Toronto, Ontario, Canada                                 September 22, 2004
Yury Makedonov                                                                         p. 2 of 12



  Introduction

     Webservices have no GUI. Typically this type of
     testing is performed by developers.
     Independent testing teams started getting more and
     more webservices testing projects
     Why are webservices so special?




      September 22, 2004 Functional Testing of Web Services, QAI Conference            3




  Why web services?

     Web services are a simple interface using HTTP
     protocol.
     Web services can be:
         developed by one company,
         used by another company, and
         hosted by a third company.

     Such involvement of several companies is a
     business cases for independent testing of web
     services.


      September 22, 2004 Functional Testing of Web Services, QAI Conference            4




International Quality Conference, Toronto, Ontario, Canada                    September 22, 2004
Yury Makedonov                                                                         p. 3 of 12



  What are web services?

     What’s in the name Web Services?
         Web means HTTP protocol,
         Services means request – response.

     Web services is a stateless protocol
         we send a request,
         we receive a response,
         we are finished.

     Why is this so important from testing point of view?
         Because we can prepare independent test cases that are
         separate files. This makes our test approach relatively
         simple.

      September 22, 2004 Functional Testing of Web Services, QAI Conference            5




  XML

     Web services use XML encoded data (XML files) for
     communication.
     What is XML?
     XML file is a text file that uses tags, similar to HTML
     tags, to describe data.
     Why is this so important from testing point of view?
         Because our test cases (files) should be in XML format.




      September 22, 2004 Functional Testing of Web Services, QAI Conference            6




International Quality Conference, Toronto, Ontario, Canada                    September 22, 2004
Yury Makedonov                                                                         p. 4 of 12



  Examples of XML tags

     Examples of XML tags from auto insurance:
         <DateFirstLicensed>1990-06-12</DateFirstLicensed>
         <DateOfBirth>1969-07-21</DateOfBirth>
         <DriverTraining>Y</DriverTraining>
          …………………………………………
          These samples are pretty intuitive.

     Examples of blank XML tags (value not specified):
         <Company/>
         <Department></Department>




      September 22, 2004 Functional Testing of Web Services, QAI Conference            7




  More XML details – document definition

     Every XML document has to have a certain structure
     and certain values of parameters.
     Special files, defining XML documents, are used.
     Two major types are:
         DTD (Document Type Definition) – flat text file,
         XSD (XML Schema Definition) – XML based definition.




      September 22, 2004 Functional Testing of Web Services, QAI Conference            8




International Quality Conference, Toronto, Ontario, Canada                    September 22, 2004
Yury Makedonov                                                                         p. 5 of 12



  Sample – “Document Type Definition”

     Note.xml:
         <?xml version="1.0"?>
         <!DOCTYPE note SYSTEM "note.dtd">
         <note>
            <to>Tove</to>
            <from>Jani</from>
            <body>Don't forget me this weekend</body>
         </note>
     Note.dtd:
         <!ELEMENT note (to,from,body)>
         <!ELEMENT to                 (#PCDATA)>
         <!ELEMENT from                  (#PCDATA)>
         <!ELEMENT body                  (#PCDATA)>
      September 22, 2004 Functional Testing of Web Services, QAI Conference            9




  Sample – “Schema Definition” – Document

     Note.xml:
         <?xml version="1.0" encoding="UTF-8"?>
         <ServiceAddressRequest
         xmlns:xsi="http://www.w3.org/2001/"
         xsi:noNamespaceSchemaLocation="Note.xsd">
         <note>
            <to>Tove</to>
            <from>Jani</from>
            <body>Don't forget me this weekend</body>
         </note>




      September 22, 2004 Functional Testing of Web Services, QAI Conference           10




International Quality Conference, Toronto, Ontario, Canada                    September 22, 2004
Yury Makedonov                                                                         p. 6 of 12



  Sample – “Schema Definition” – Schema
     Note.xsd:
         <?xml version="1.0"?>
         <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         .............
         <xs:element name="note">
            <xs:complexType>
                <xs:sequence>
                     <xs:element name="to" type="xs:string"/>
                     <xs:element name="from" type="xs:string"/>
                     <xs:element name="body" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
         </xs:element>
         </xs:schema>
      September 22, 2004 Functional Testing of Web Services, QAI Conference           11




  SOAP

     SOAP = Simple Object Access Protocol:
     A SOAP envelope:
  <?xml version="1.0" encoding="UTF-8"?>
     <soap:Envelope
     xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
        <soap:Body>
            <gs:doGoogleSearch xmlns:gs="urn:GoogleSearch">
            ........
            <start>0</start>
            <maxResults>10</maxResults>
            <filter>true</filter>
            .........
       </soap:Body>
     </soap:Envelope>>


      September 22, 2004 Functional Testing of Web Services, QAI Conference           12




International Quality Conference, Toronto, Ontario, Canada                    September 22, 2004
Yury Makedonov                                                                         p. 7 of 12



  How to learn XML
     Do we need to know all intricacies of XML, DTD, and
     XML schemas to start testing of web services?
     No!
     With basic XML principles, described above, you can
     start development of XML test data files!
     I recommend an approach for XML learning:
        Get sample XML files with corresponding DTD or XSD files
        for your new webservices project.
        Go through major elements and try matching definitions from
        DTD/XSD and corresponding XML data.
        Use web sites (e.g. http://www.w3schools.com) or XML books
        as additional sources of information.

      September 22, 2004 Functional Testing of Web Services, QAI Conference           13




  Testing web services – Test Approach

     When testing webservices we use the same approach
     as for any other testing project:
         identify requirements,
         Prepare high level test cases,
         Document detailed test cases, etc.
     What would be an outcome of a test planning phase:
         a set of test cases described in plain English language and
         based on a requirements document,
         a corresponding set of XML files.




      September 22, 2004 Functional Testing of Web Services, QAI Conference           14




International Quality Conference, Toronto, Ontario, Canada                    September 22, 2004
Yury Makedonov                                                                         p. 8 of 12



  Sample test case

     Requirement:
         “Location type” can be blank in a request

     Test case brief description:
         “Location type” is blank in a request

     XML test data file:
       .......
        <locationInfo>
           <locationType></locationType>
           <locationVal>1600</locationVal>
        </locationInfo>
        .......


      September 22, 2004 Functional Testing of Web Services, QAI Conference           15




  How to prepare XML test files

   How to prepare XML test files:
      We have to get a sample XML file from a software developer
      and to enter our values of parameters.
      This is not so terribly different from a standard GUI testing.
      The only difference:
      we have to enter our data into “fields” of XML document
      instead of fields of GUI.

   We have to follow a standard testing procedure,
   familiar to every black box tester and to use standard
   testing techniques when testing Web Services:
      valid and invalid data,
       boundary values,
       equivalence partitioning, etc.

      September 22, 2004 Functional Testing of Web Services, QAI Conference           16




International Quality Conference, Toronto, Ontario, Canada                    September 22, 2004
Yury Makedonov                                                                         p. 9 of 12



  Tools – to prepare XML test files

   What tools to use for XML files preparation:
      Whatever you have,
      from Notepad
      and Microsoft Word
      to XMLSpy


     My favorite tools are:
          Notepad (or TextPad for bigger files)
          XMLSpy




      September 22, 2004 Functional Testing of Web Services, QAI Conference           17




  Tools – to execute a test

     We have prepared a set of XML files that represent
     our test cases.
     Next step is to process these files.
     To process XML files (XML requests) we need:
         to POST an XML file (to send it to a specific URL and port),
         to capture an XML response and to save it into a file.
     We need a tool to do this.




      September 22, 2004 Functional Testing of Web Services, QAI Conference           18




International Quality Conference, Toronto, Ontario, Canada                    September 22, 2004
Yury Makedonov                                                                        p. 10 of 12



  Tools – to execute a test

     Load Testing tools
         Natural choice is any load testing tool, designed to handle
         HTTP traffic.
     XMLSpy.
         XMLSpy can POST a SOAP document and capture a
         response.
     Custom tools/script:
         A Perl script or a Java program can be developed to send a
         request and to capture a response.
     Empirix eTest:
         Commercials tool to test SOAP based web services.
     Many more options.

      September 22, 2004 Functional Testing of Web Services, QAI Conference           19




  Analyzing results

     After we have XML response files we have to
     compare them against expected results, described in
     our test cases.
     Typically we have to verify values in some specified
     fields.
     That task is not so different from a standard GUI
     testing.




      September 22, 2004 Functional Testing of Web Services, QAI Conference           20




International Quality Conference, Toronto, Ontario, Canada                    September 22, 2004
Yury Makedonov                                                                        p. 11 of 12



  Regression testing

     In case of a regression testing we can use a less time
     consuming approach.
     We can automatically compare a new set of XML
     responses to a previous set, using:
         WinDiff.exe,
         XMLSpy,
         MS Windows commands: “Comp” or “fc”




      September 22, 2004 Functional Testing of Web Services, QAI Conference           21




  Summary

        Testing of web services is not so different from a
        standard GUI testing,
        New skills to learn are relatively simple (half a day or a
        day to learn),
        Typical testing team already has most skills and
        knowledge required for this type of testing,
        Testing web services can bring additional job and
        visibility to an independent test team.
        Let’s leverage our skills and knowledge to a new field.
        Let’s test web services.



      September 22, 2004 Functional Testing of Web Services, QAI Conference           22




International Quality Conference, Toronto, Ontario, Canada                    September 22, 2004
Yury Makedonov                                                                        p. 12 of 12




  Contact Information


            Yury Makedonov
            (416) 481-8685
            ivm@ivm-s.com
            http://www.ivm-s.com




      September 22, 2004 Functional Testing of Web Services, QAI Conference           23




  References

   The above examples are from:
   CGI projects
   http://www.w3schools.com,
   http://www.intertwingly.net/stories/2002/12/20/sbe.html
   You can find more information on XML on these and
   many other web sites.




      September 22, 2004 Functional Testing of Web Services, QAI Conference           24




International Quality Conference, Toronto, Ontario, Canada                    September 22, 2004

More Related Content

Similar to Functional testing of_web_services.ppt

weblogic training | oracle weblogic online training | weblogic server course
weblogic training | oracle weblogic online training | weblogic server courseweblogic training | oracle weblogic online training | weblogic server course
weblogic training | oracle weblogic online training | weblogic server courseNancy Thomas
 
Odi course curriculumn
Odi course curriculumnOdi course curriculumn
Odi course curriculumnAmit Sharma
 
MokE: a tool for Mobile-ok evaluation of Web Content
MokE: a tool for Mobile-ok evaluation of Web ContentMokE: a tool for Mobile-ok evaluation of Web Content
MokE: a tool for Mobile-ok evaluation of Web ContentYeliz Yesilada
 
Ukita Shropshire July 2007 Webversion
Ukita Shropshire July 2007 WebversionUkita Shropshire July 2007 Webversion
Ukita Shropshire July 2007 Webversionnationalrural
 
Building a Scalable XML-based Dynamic Delivery Architecture: Standards and Be...
Building a Scalable XML-based Dynamic Delivery Architecture: Standards and Be...Building a Scalable XML-based Dynamic Delivery Architecture: Standards and Be...
Building a Scalable XML-based Dynamic Delivery Architecture: Standards and Be...Jerry SILVER
 
Selenium webdriver course content rakesh hansalia
Selenium webdriver course content rakesh hansaliaSelenium webdriver course content rakesh hansalia
Selenium webdriver course content rakesh hansaliaRakesh Hansalia
 
Desperately seeking a lightweight Perl framework
Desperately seeking a lightweight Perl frameworkDesperately seeking a lightweight Perl framework
Desperately seeking a lightweight Perl frameworkPeter Edwards
 
Web Service Presentation
Web Service PresentationWeb Service Presentation
Web Service Presentationguest0df6b0
 
C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfoliocummings49
 
Net framework
Net frameworkNet framework
Net frameworksumit1503
 
Perfsystems- Consulting Services
Perfsystems- Consulting ServicesPerfsystems- Consulting Services
Perfsystems- Consulting ServicesPerfsys Tems
 
Growing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI FrameworksGrowing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI FrameworksSmartBear
 
web-services-on-mobile-platform
web-services-on-mobile-platformweb-services-on-mobile-platform
web-services-on-mobile-platformSanjaySanjay970196
 
Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Julie Lerman
 
Detailed information on webservice by websoles
Detailed information on webservice by websolesDetailed information on webservice by websoles
Detailed information on webservice by websolesNAVEEN KUMAR SHARMA
 
Web services Tutorial /Websoles Strategic Digital Solutions
Web services Tutorial /Websoles Strategic Digital SolutionsWeb services Tutorial /Websoles Strategic Digital Solutions
Web services Tutorial /Websoles Strategic Digital SolutionsRatnesh Pandey
 

Similar to Functional testing of_web_services.ppt (20)

weblogic training | oracle weblogic online training | weblogic server course
weblogic training | oracle weblogic online training | weblogic server courseweblogic training | oracle weblogic online training | weblogic server course
weblogic training | oracle weblogic online training | weblogic server course
 
70487.pdf
70487.pdf70487.pdf
70487.pdf
 
Odi course curriculumn
Odi course curriculumnOdi course curriculumn
Odi course curriculumn
 
MokE: a tool for Mobile-ok evaluation of Web Content
MokE: a tool for Mobile-ok evaluation of Web ContentMokE: a tool for Mobile-ok evaluation of Web Content
MokE: a tool for Mobile-ok evaluation of Web Content
 
Ukita Shropshire July 2007 Webversion
Ukita Shropshire July 2007 WebversionUkita Shropshire July 2007 Webversion
Ukita Shropshire July 2007 Webversion
 
Building a Scalable XML-based Dynamic Delivery Architecture: Standards and Be...
Building a Scalable XML-based Dynamic Delivery Architecture: Standards and Be...Building a Scalable XML-based Dynamic Delivery Architecture: Standards and Be...
Building a Scalable XML-based Dynamic Delivery Architecture: Standards and Be...
 
Selenium webdriver course content rakesh hansalia
Selenium webdriver course content rakesh hansaliaSelenium webdriver course content rakesh hansalia
Selenium webdriver course content rakesh hansalia
 
Desperately seeking a lightweight Perl framework
Desperately seeking a lightweight Perl frameworkDesperately seeking a lightweight Perl framework
Desperately seeking a lightweight Perl framework
 
Web Service Presentation
Web Service PresentationWeb Service Presentation
Web Service Presentation
 
C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfolio
 
Net framework
Net frameworkNet framework
Net framework
 
Perfsystems- Consulting Services
Perfsystems- Consulting ServicesPerfsystems- Consulting Services
Perfsystems- Consulting Services
 
Growing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI FrameworksGrowing Trends of Open Source UI Frameworks
Growing Trends of Open Source UI Frameworks
 
Web Services ppt
Web Services pptWeb Services ppt
Web Services ppt
 
web-services-on-mobile-platform
web-services-on-mobile-platformweb-services-on-mobile-platform
web-services-on-mobile-platform
 
Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Entity Framework Today (May 2012)
Entity Framework Today (May 2012)
 
Dot net training bangalore
Dot net training bangaloreDot net training bangalore
Dot net training bangalore
 
Detailed information on webservice by websoles
Detailed information on webservice by websolesDetailed information on webservice by websoles
Detailed information on webservice by websoles
 
Web services Tutorial /Websoles Strategic Digital Solutions
Web services Tutorial /Websoles Strategic Digital SolutionsWeb services Tutorial /Websoles Strategic Digital Solutions
Web services Tutorial /Websoles Strategic Digital Solutions
 
Web services | Websoles
Web services | WebsolesWeb services | Websoles
Web services | Websoles
 

Recently uploaded

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 

Recently uploaded (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 

Functional testing of_web_services.ppt

  • 1. Yury Makedonov p. 1 of 12 Functional Testing of Web Services Yury Makedonov, CGI 2004 International Quality Conference, Toronto, Ontario, Canada © Copyright 2004 – CGI Group Inc. September 22, 2003 September 22, 2004 Functional Testing of Web Services, QAI Conference 1 Agenda Why we are getting more and more web services testing What are web services What is XML How to test web services Test Approach Tools Summary Q&A Intended audience: Testers without development background September 22, 2004 Functional Testing of Web Services, QAI Conference 2 International Quality Conference, Toronto, Ontario, Canada September 22, 2004
  • 2. Yury Makedonov p. 2 of 12 Introduction Webservices have no GUI. Typically this type of testing is performed by developers. Independent testing teams started getting more and more webservices testing projects Why are webservices so special? September 22, 2004 Functional Testing of Web Services, QAI Conference 3 Why web services? Web services are a simple interface using HTTP protocol. Web services can be: developed by one company, used by another company, and hosted by a third company. Such involvement of several companies is a business cases for independent testing of web services. September 22, 2004 Functional Testing of Web Services, QAI Conference 4 International Quality Conference, Toronto, Ontario, Canada September 22, 2004
  • 3. Yury Makedonov p. 3 of 12 What are web services? What’s in the name Web Services? Web means HTTP protocol, Services means request – response. Web services is a stateless protocol we send a request, we receive a response, we are finished. Why is this so important from testing point of view? Because we can prepare independent test cases that are separate files. This makes our test approach relatively simple. September 22, 2004 Functional Testing of Web Services, QAI Conference 5 XML Web services use XML encoded data (XML files) for communication. What is XML? XML file is a text file that uses tags, similar to HTML tags, to describe data. Why is this so important from testing point of view? Because our test cases (files) should be in XML format. September 22, 2004 Functional Testing of Web Services, QAI Conference 6 International Quality Conference, Toronto, Ontario, Canada September 22, 2004
  • 4. Yury Makedonov p. 4 of 12 Examples of XML tags Examples of XML tags from auto insurance: <DateFirstLicensed>1990-06-12</DateFirstLicensed> <DateOfBirth>1969-07-21</DateOfBirth> <DriverTraining>Y</DriverTraining> ………………………………………… These samples are pretty intuitive. Examples of blank XML tags (value not specified): <Company/> <Department></Department> September 22, 2004 Functional Testing of Web Services, QAI Conference 7 More XML details – document definition Every XML document has to have a certain structure and certain values of parameters. Special files, defining XML documents, are used. Two major types are: DTD (Document Type Definition) – flat text file, XSD (XML Schema Definition) – XML based definition. September 22, 2004 Functional Testing of Web Services, QAI Conference 8 International Quality Conference, Toronto, Ontario, Canada September 22, 2004
  • 5. Yury Makedonov p. 5 of 12 Sample – “Document Type Definition” Note.xml: <?xml version="1.0"?> <!DOCTYPE note SYSTEM "note.dtd"> <note> <to>Tove</to> <from>Jani</from> <body>Don't forget me this weekend</body> </note> Note.dtd: <!ELEMENT note (to,from,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT body (#PCDATA)> September 22, 2004 Functional Testing of Web Services, QAI Conference 9 Sample – “Schema Definition” – Document Note.xml: <?xml version="1.0" encoding="UTF-8"?> <ServiceAddressRequest xmlns:xsi="http://www.w3.org/2001/" xsi:noNamespaceSchemaLocation="Note.xsd"> <note> <to>Tove</to> <from>Jani</from> <body>Don't forget me this weekend</body> </note> September 22, 2004 Functional Testing of Web Services, QAI Conference 10 International Quality Conference, Toronto, Ontario, Canada September 22, 2004
  • 6. Yury Makedonov p. 6 of 12 Sample – “Schema Definition” – Schema Note.xsd: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" ............. <xs:element name="note"> <xs:complexType> <xs:sequence> <xs:element name="to" type="xs:string"/> <xs:element name="from" type="xs:string"/> <xs:element name="body" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> September 22, 2004 Functional Testing of Web Services, QAI Conference 11 SOAP SOAP = Simple Object Access Protocol: A SOAP envelope: <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <gs:doGoogleSearch xmlns:gs="urn:GoogleSearch"> ........ <start>0</start> <maxResults>10</maxResults> <filter>true</filter> ......... </soap:Body> </soap:Envelope>> September 22, 2004 Functional Testing of Web Services, QAI Conference 12 International Quality Conference, Toronto, Ontario, Canada September 22, 2004
  • 7. Yury Makedonov p. 7 of 12 How to learn XML Do we need to know all intricacies of XML, DTD, and XML schemas to start testing of web services? No! With basic XML principles, described above, you can start development of XML test data files! I recommend an approach for XML learning: Get sample XML files with corresponding DTD or XSD files for your new webservices project. Go through major elements and try matching definitions from DTD/XSD and corresponding XML data. Use web sites (e.g. http://www.w3schools.com) or XML books as additional sources of information. September 22, 2004 Functional Testing of Web Services, QAI Conference 13 Testing web services – Test Approach When testing webservices we use the same approach as for any other testing project: identify requirements, Prepare high level test cases, Document detailed test cases, etc. What would be an outcome of a test planning phase: a set of test cases described in plain English language and based on a requirements document, a corresponding set of XML files. September 22, 2004 Functional Testing of Web Services, QAI Conference 14 International Quality Conference, Toronto, Ontario, Canada September 22, 2004
  • 8. Yury Makedonov p. 8 of 12 Sample test case Requirement: “Location type” can be blank in a request Test case brief description: “Location type” is blank in a request XML test data file: ....... <locationInfo> <locationType></locationType> <locationVal>1600</locationVal> </locationInfo> ....... September 22, 2004 Functional Testing of Web Services, QAI Conference 15 How to prepare XML test files How to prepare XML test files: We have to get a sample XML file from a software developer and to enter our values of parameters. This is not so terribly different from a standard GUI testing. The only difference: we have to enter our data into “fields” of XML document instead of fields of GUI. We have to follow a standard testing procedure, familiar to every black box tester and to use standard testing techniques when testing Web Services: valid and invalid data, boundary values, equivalence partitioning, etc. September 22, 2004 Functional Testing of Web Services, QAI Conference 16 International Quality Conference, Toronto, Ontario, Canada September 22, 2004
  • 9. Yury Makedonov p. 9 of 12 Tools – to prepare XML test files What tools to use for XML files preparation: Whatever you have, from Notepad and Microsoft Word to XMLSpy My favorite tools are: Notepad (or TextPad for bigger files) XMLSpy September 22, 2004 Functional Testing of Web Services, QAI Conference 17 Tools – to execute a test We have prepared a set of XML files that represent our test cases. Next step is to process these files. To process XML files (XML requests) we need: to POST an XML file (to send it to a specific URL and port), to capture an XML response and to save it into a file. We need a tool to do this. September 22, 2004 Functional Testing of Web Services, QAI Conference 18 International Quality Conference, Toronto, Ontario, Canada September 22, 2004
  • 10. Yury Makedonov p. 10 of 12 Tools – to execute a test Load Testing tools Natural choice is any load testing tool, designed to handle HTTP traffic. XMLSpy. XMLSpy can POST a SOAP document and capture a response. Custom tools/script: A Perl script or a Java program can be developed to send a request and to capture a response. Empirix eTest: Commercials tool to test SOAP based web services. Many more options. September 22, 2004 Functional Testing of Web Services, QAI Conference 19 Analyzing results After we have XML response files we have to compare them against expected results, described in our test cases. Typically we have to verify values in some specified fields. That task is not so different from a standard GUI testing. September 22, 2004 Functional Testing of Web Services, QAI Conference 20 International Quality Conference, Toronto, Ontario, Canada September 22, 2004
  • 11. Yury Makedonov p. 11 of 12 Regression testing In case of a regression testing we can use a less time consuming approach. We can automatically compare a new set of XML responses to a previous set, using: WinDiff.exe, XMLSpy, MS Windows commands: “Comp” or “fc” September 22, 2004 Functional Testing of Web Services, QAI Conference 21 Summary Testing of web services is not so different from a standard GUI testing, New skills to learn are relatively simple (half a day or a day to learn), Typical testing team already has most skills and knowledge required for this type of testing, Testing web services can bring additional job and visibility to an independent test team. Let’s leverage our skills and knowledge to a new field. Let’s test web services. September 22, 2004 Functional Testing of Web Services, QAI Conference 22 International Quality Conference, Toronto, Ontario, Canada September 22, 2004
  • 12. Yury Makedonov p. 12 of 12 Contact Information Yury Makedonov (416) 481-8685 ivm@ivm-s.com http://www.ivm-s.com September 22, 2004 Functional Testing of Web Services, QAI Conference 23 References The above examples are from: CGI projects http://www.w3schools.com, http://www.intertwingly.net/stories/2002/12/20/sbe.html You can find more information on XML on these and many other web sites. September 22, 2004 Functional Testing of Web Services, QAI Conference 24 International Quality Conference, Toronto, Ontario, Canada September 22, 2004