Readyapi & Soapui Pro Training a 2 Day Seminar

Total Page:16

File Type:pdf, Size:1020Kb

Readyapi & Soapui Pro Training a 2 Day Seminar ReadyAPI & SoapUI Pro Training A 2 Day Seminar Sample - worbkook customized for each class This publication is protected by copyright. No part of this publication may be reproduced in any form by any means without prior written authorization by WiseClouds, LLC. This publication is provided “as is” without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose or non-infringement. This publication is provided for educational purposes only. Any product specifications are subject to change without notice. WiseClouds and the WiseClouds logo are trademarks of WiseClouds, LLC in the United States, other countries, or both. SmartBear, its logo, and the products listed below are registered trademarks of SmartBear Software in the United States, other countries, or both. All other company or product names are registered trademarks or trademarks of their respective companies. ReadyAPI SoapUI SoapUI Pro SoapUI Pro LoadUI LoadUI Pro LoadUI Pro SecureSample Pro - worbkook customized for each class ServiceV Pro © 2007-2018 WiseClouds, LLC. All rights reserved. Table of Contents Lab: Configure and personalize your SoapUI Pro environment ..................................... 4 Lab: New Web service project creation ........................................................................ 6 Lab: Interacting with SOAP requests ............................................................................ 9 Lab: New REST API project creation ........................................................................... 11 Lab: REST style and payloads ..................................................................................... 14 Lab: Advanced project creation .................................................................................. 16 Lab: File system interaction ....................................................................................... 17 Lab: Working with properties ..................................................................................... 19 Lab: Design a TestCase with multiple inter-related TestSteps ..................................... 23 Lab: Assertions to evaluate property contents ........................................................... 27 Lab: Assertions to determine message compliance .................................................... 31 Lab: Other assertions ................................................................................................. 34 Lab: Apply multiple assertions to a Web service ......................................................... 36 Lab: Apply multiple content assertions to a REST API call ........................................... 37 Lab: Apply Boolean logic to a Request & Response .................................................... 38 Lab: Data driven testing ............................................................................................. 43 Lab: Data generation .................................................................................................. 48 Lab: Introduction to Groovy scripts ............................................................................ 50 Lab: Place a REST API under load ................................................................................ 54 Case study: Design a comprehensive testing plan ....................................................... 55 Sample - worbkook customized for each class Lab: Configure and personalize your SoapUI Pro environment In this lab, you’ll explore SoapUI Pro’s preferences menu, and configure a few of the more than 100 settings that help drive the product’s behavior. To access these preferences, choose the File -> Preferences menu, or click on the Preferences icon. Switch to each tab, and follow the instructions for adjusting these options. Note that aside from the preferences in these instructions, you may leave everything else unchanged. HTTP Tab (no need to adjust any other settings here) Preference Setting Reason Request compression None Transmit messages to services/APIs without compressing them – less chance of a server- side issue Response compression Unchecked Don’t automatically attempt to compress responses from services/APIs – aids with readability Include request in Checked Increases performance statistical consistency time taken across all tests Include response in Checked Increases performance statistical consistency time taken across all tests Leave virt Checked Keeps internal Jetty web server running even after halting a virtual API WSDL Tab (no need to adjust any other settings here) Preference Setting Reason Sample values Checked Have SoapUI automatically create basic Sample - worbkook customizedsample data to transmit for toeach Web services class Pretty print Checked Improves readability of response messages Copyright © 2018 WiseClouds LLC. All rights reserved. Page 4 UI (User interface) Tab (no need to adjust any other settings here) Preference Setting Reason Sort projects Checked Organize your projects alphabetically Sort services Checked Organize your services alphabetically Sort REST resources Checked Organize your REST resources alphabetically Show descriptions Checked Display supporting descriptive information whenever available Wrap content in Raw Checked Makes it easier to review raw responses from message viewers your services & APIs Disable message on Checked Don’t have SoapUI automatically generate DataSource creation DataSource Loop TestSteps Editor Tab (no need to adjust any other settings here) Preference Setting Reason XML line numbers Checked Aids with XML readability Tabbed request view Unchecked Places requests and responses side-by-side. Later, your instructor will demonstrate multiple ways to organize requests and responses. ReadyAPI Tab (no need to adjust any other settings here) Preference Setting Reason Default SOAP request Form Provides a user-friendly way to enter request editor details Default REST request Request Displays an editor that makes it easy to add editor URI parameters DefaultSample response - worbkookOutline customizedArranges responses for in an each easy-to-understand class editor format Complete error logs Checked Include comprehensive details about errors when generating reports Copyright © 2018 WiseClouds LLC. All rights reserved. Page 5 Lab: New Web service project creation In this lab, you’ll gain hands-on experience in creating and understanding the major components in a Web service testing project. You’ll begin by creating a new SOAP project (File -> New -> Project) and selecting the Description File option and WSDL definition (SOAP). Paste in the Lottery endpoint, making sure that the Create sample requests… box is checked, and everything else is unchecked. Accept all the subsequent defaults and your project will be ready. Once the project has been created, enter a description for it (found in the Project Properties section) Sample - worbkook customized for each class Copyright © 2018 WiseClouds LLC. All rights reserved. Page 6 Next, it’s time to get comfortable with the major Web service details that SoapUI Pro loads from your WSDL. Begin by double-clicking on the LotterySOAPBinding interface) Spend a few minutes exploring the interface’s tabs, such as Overview, Operations, and Endpoints. Since understanding your WSDL is essential for writing meaningful tests, pay particular attention to the project’s WSDL Content tab. Sample - worbkook customized for each class Copyright © 2018 WiseClouds LLC. All rights reserved. Page 7 Even though SoapUI Pro presents a basic WSDL viewer, it also offers a nice tool for presenting a more readable version of your WSDL. You can check it out by clicking on the Generate simple HTML documentation… icon at the top of the window. Provide a destination directory for the file (making sure you have permission to write to it) and then navigate to the directory and view your output in a browser. You can also export your WSDL to your local file system. Try it out by clicking on the Export icon at the top of the screen (found to the right of the Generate simple HTML documentation… icon). Finally,Sample save your -project worbkook by right clicking customized on it and selecting for Save each. Choose class any directory you like, or just use the default. If you have issues with any of these steps, the instructor can demonstrate afterwards. Copyright © 2018 WiseClouds LLC. All rights reserved. Page 8 Lab: Interacting with SOAP requests In this lab, you’ll learn about how to work with SOAP requests, including validating their contents, creating multiple instances, appending standard SOAP headers, and adding requests to tests. You’ll begin by creating a new SOAP project (File -> New -> Project) and selecting the Description File option. Paste in the Complaints endpoint, making sure that the Create sample requests… box is checked, and everything else is unchecked. Accept all the subsequent defaults and your project will be ready. Once the project has been created, navigate to Request 1, which is found within the PostComplaint operation, located under the ComplaintSOAPBinding interface. Enter some data of your choice in each of the fields. Hint: if you place your mouse over certain (but not all) fields, you’ll receive a tooltip message from SoapUI Pro based on what the WSDL states are acceptable values for that field. Once you’ve entered your data, click on the validate icon (checkmark) to see if what you’ve typed in will match what the WSDL expects. Note that no data is transmitted
Recommended publications
  • Java CAPS 6 Update 1 Exposing MTOM-Capable Java CAPS Classic Web Service [email protected] February 2009 Contents 1
    Java CAPS 6 Update 1 Exposing MTOM-capable Java CAPS Classic Web Service [email protected] February 2009 Contents 1. Introduction............................................................................................................1 2. WSDL Notes..........................................................................................................3 4. Build eInsight / BPEL 1.0-based Web Service....................................................12 5. Exercise eInsight / BPEL 1.0-based Web Service...............................................21 6. Add Service Wrapper to provide MTOM support...............................................27 7. Test Wrapped Service..........................................................................................32 8. Create Java CAPS Environment..........................................................................36 9. Obtain and use the Apache TCP Mon..................................................................38 10. Install soapUI Plugin........................................................................................39 11. Install JAX-RPC Plugin...................................................................................40 1. Introduction If we overlook the fact that using web services to transfer large payloads is a very stupid idea, we will be faced with the need to implement the optimisation mechanisms to make transfer of large payloads using web services a little less inefficient from the stand point of the size of the over-the-wire data to be transferred.
    [Show full text]
  • An Introduction API Testing with Soapui for Testnet
    An introduction API testing with SoapUI Vincent Vonk 12-06-2018 © CGI Group Inc. Agenda for the next 50 minutes • What is SoapUI? • What are Web APIs? • Why test on API level? • What can SoapUI do? • Types of Web APIs • Short explanation about SOAP • Why is SoapUI currently so popular? • SoapUI best practices • Mini SoapUI workshop • The end/time for questions 2 What is SoapUI? • SoapUI is a free and open source cross-platform functional testing tool • SoapUI allows you to easily and rapidly create and execute automated functional, regression, compliance/security, and load tests for Web APIs • SoapUI can be used out of the box for the two most used Web APIs types 3 What are Web Application Programming Interfaces? • An interface to a software component that can be invoked at a distance over a communications network using standards based technologies • Web APIs ≈ Web Services in this presentation 4 Popularity Web APIs 5 10,000 public Web APIs 100% annual growth 3-5x private APIs 11 Web API testing example Your Application Provides a GUI for users to WEB Enter data and API internally generate XML and call a Web API Takes the input XML, processes it and sends a return XML message XML Generated by your system internally 13 What can SoapUI do? • Generate request on behalf of our input data and send it to Web API engine • Receive data coming from Web API and validate data • Automate the above (and also put in to load / security tests) • Generate basic reports as well • Virtualize the Web service WEB API Takes the input XML, processes it and sends
    [Show full text]
  • Homework #2 Web Service Programming ID2208
    Homework #2 Programming Web Services ID2208 SOAP & WSDL Hooman Peiro Sajjad ([email protected]) KTH – ICT School VT 2015 This presentation is based on a tutorial published by IBM and some Oracle 1 documents pointed out in the reference. Aims To learn the followings: • Design and Developing Web Services • Developing Web Service Client • SOAP processing 2 Homework #2- Part 1 Developing Web Service and Web Service Client 3 Caution ! In THEORY you could use any application server, any WS libraray with any IDE for developing Web Service technologies , But in PRACTICE you might face some strange problmes (due to incompatbility of versions, non standarad libraries,....) So BE READY to face some headaches, just take your time and look for possible solutions.We have tested the recommended tools and libraries ,and hopefully you will get less headaches. 4 JAX-WS JAX-WS is designed to simplify building Web Services in Java (using Annotations, etc.) ‏ Part of Java SE 6-7 and Java EE 5-7 platforms It follows annotation based programming model It also includes : SAAJ : provides a standard way to deal with SOAP messages with XML attachment JAX-WS download: https://jax-ws.java.net/ Current Version is JAX-WS 2.2.10 5 Libraries & Tools Installation -1 1. Download and Install any of JWSDP 2.X or latest release of JAX-WS RI 2.2.10 (reference implementation) from: http://jax-ws.java.net which comes with more samples ! 2. You might need to use Application Server. - GlassFish: http://glassfish.java.net/ - Apache Tomcat : http://tomcat.apache.org/ Alternatively‏you‏can‏just‏use‏a‏light‏Web‏server,‏which‏doesn’t‏ require any installation (see sample code) 6 Libraries & Tools Installation -2 3.
    [Show full text]
  • A Comparative Study of Web Service Testing Tools
    Volume 4, Issue 2, February 2014 ISSN: 2277 128X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com A Comparative Study of Web Service Testing Tools Tanuj Wala Aman Kumar Sharma Research Scholar Associate Professor Department of Computer Science Department of Computer Science Himachal Pradesh University Shimla, India Himachal Pradesh University Shimla, India ABSTRACT-With the increase in adaption of web services, Quality of Service (QoS) has gained more importance as a parameter. Various web services have led to the development of multiple evaluation and measurement of techniques/tools. Quality of Service (QoS) is one of the most important criteria for evaluation of such tools/techniques. The performance of the real time network can be measured by Quality of Service (QoS) measurement, which can be facilated by these tools. The comparative study of various such tools help in promotion and usage of various open source web services testing tools towards such a goal. This paper describes five most popularly used open source tools and their comparative study along with performance based on response time. Keywords - Web Services, QoS, Testing Tools, Performance, Open-Source Software. I. Introduction There is a huge amount of shift towards web services technology in various sector of IT industry. Web services can perform various operations from simple request to a complex one and can be described as the software component which can be accessed through various programming interfaces. Such interfaces specified in an Extensible Markup Language (XML) format called Web Services Description Language (WSDL).Web Services Description Language (WSDL) description along with their input and output parameters can be taken as reference for testing by service interface via black box testing.
    [Show full text]
  • Web Application for Interoperability Testing of Web Services
    Master's Degree in Informatics Engineering Thesis Final Report Web application for interoperability testing of web services Bruno Miguel Filipe Martins [email protected] Supervisor: Prof. Nuno Laranjeiro Date: January 29th, 2016 Master's Degree in Informatics Engineering Thesis Final Report Web application for interoperability testing of web services Author: Bruno Miguel Filipe Martins [email protected] Jury: Prof. Marco Vieira Prof. Carlos Bento Supervisor: Prof. Nuno Laranjeiro Date: January 29th, 2016 WitWS - Web application for interoperability testing of web services Acknowledgments I would like to start by thanking my supervisor, Professor Carlos Nuno Laranjeiro. Without his immeasurable help and guidance this thesis would have been a shadow of itself. To this day I still cannot comprehend how can someone not be completely fed up with me after three meetings a day. His resilience is admirable. To Ivano Elia, for putting up with my endless questions about his previous work. His input throughout the thesis, especially in the testing phase, was invaluable. To Paulo Martins. After a day’s work, after taking care of his own company and after looking for his own family, still having the time to provide me with some tips is nothing short of incredible. To Catarina Lopes, because a long-distance relationship is hard enough without one of the members always complaining about his day. For always having the patience to hear me out even when going through some tough times herself. For understanding that this thesis took a lot more of my time than I expected. And last but definitely not least, to my parents.
    [Show full text]
  • Test Automation Integration with Test Management Qacomplete
    Test Automation Integration with Test Management QAComplete This User's Guide walks you through configuring and using your automated tests with QAComplete's Test Management module SmartBear Software Release 11 October 2015 ALMComplete | QAComplete User's Guide About Automated Tests Test Management's Automation feature allows you to run tests with little to no human interaction. You can perform testing from remote computers as often as needed - for example, after a build or on a daily schedule. By using the QAComplete integration with various testing tools, you can fully track tests and test res- ults across Test Management's manual and automated tests. You can run automated tests from the desired computers and post results for full tracking of your testing coverage and progress. Supported Automated Testing Tools l SmartBear's TestComplete. For more information about TestComplete, please see TestComplete by SmartBear. l SmartBear's Ready! API. For more information about Ready! API, please see Ready! API by SmartBear. l SmartBear's SoapUI. For more information on SoapUI, please see SoapUI by SmartBear. l Selenium WebDriver for the following unit testing frameworks: l JUnit l TestNG l NUnit For more information about Selenium, please see Selenium - Web Browser Automation. You can also automate the running of ordinary JUnit and NUnit unit tests (that do not use Selenium modules). Note: Starting with version 10.50, TestComplete supports integration with Selenium tests. In TestCom- plete, you can run Selenium tests created by using JUnit, TestNG, NUnit, PyUnit, Ruby Test::Unit and PHPUnit unit testing frameworks. You can add your Selenium tests to your TestComplete project, and then integrate the project with Test Management.
    [Show full text]
  • Block 3 Part 1 Activity 5: Implementing a Simple Web Service Prepared for the Course Team by Neil Simpkins
    T320 E-business technologies: foundations and practice Block 3 Part 1 Activity 5: Implementing a simple web service Prepared for the course team by Neil Simpkins Introduction 1 Components of a web service 2 Implementation approaches 2 Eclipse for Block 3 3 Steps to a first web service 3 Create a project 4 Writing the service logic 8 Generating a web service and client 12 Testing the web service 17 Using the client 17 Monitoring web service messages 19 Service descriptions 19 Web service endpoint 19 Axis and WSDL 21 Summary 24 Appendix 1: WSDL generated for 'Hello' web service 24 Introduction In this activity you will see how to use Eclipse to create and test a very simple web service. Before I look at the service itself, however, I shall provide some background information about the different approaches that can be used to develop a web service. Copyright © 2008 The Open University This document is made available under the Creative Commons Attribution - No Derivative Works 3.0 Unported Licence (http://creativecommons.org/licenses/by-nd/3.0/) WEB 00711 2 1.1 T320 E-business technologies: foundations and practice Components of a web service From an implementation point of view, a web service typically has two distinct components: • Some 'logic', which actually carries out the real work required to provide the service functions, whatever they might be. For example, a simple service to calculate VAT might include at its heart a piece of code that receives a monetary value in sterling, such as £10, multiplies that value by 17.5% to calculate the VAT (£1.75) and returns the new total value including VAT (£11.75).
    [Show full text]
  • A Comparative Study and Analysis of Web Service Testing Tools
    Ravi Kumar et al, International Journal of Computer Science and Mobile Computing, Vol.4 Issue.1, January- 2015, pg. 433-442 Available Online at www.ijcsmc.com International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer Science and Information Technology ISSN 2320–088X IJCSMC, Vol. 4, Issue. 1, January 2015, pg.433 – 442 RESEARCH ARTICLE A Comparative Study and Analysis of Web Service Testing Tools Ravi Kumar A.J Singh Research Scholar Professor Department of Computer Science Department of Computer Science Himachal Pradesh University Shimla, India Himachal Pradesh University Shimla, India Abstract Software testing in present era is the process of validating and verifying the correctness of software. Automated testing tool enables the developer and tester to automate the whole process of testing in software development life cycle (SDLC). Testing is very important phase of SDLC where the software is examined properly and modifications are proposed. Thus testing is necessary for quality of service provided by software. Web service is widely used concept now a days and less literature is available regarding web service performance and SOAP messaging. The objective of this paper is to conduct the comparative study of automated tool for web services as a leading tool in black box test automation. This study will help in the promotion and usage of various open source web service tool toward performance of real time network using quality of service(QOS) provided by these tools. Further in this research paper the evaluation and comparison of six automated software testing tools is done to determine their usability and effectiveness.
    [Show full text]
  • Soap UI Web Services Testing SOAP and REST Basic
    Soap UI Web Services Testing SOAP and REST Basic : 1. SOAP architecture 2. WSDL file and Understanding Services 3. REST architecture 4. REST methods 5. Web service testing needs: a. Understand the WSDL file or Http request format b. Understand the Operation each web service or api provides c. Understand the XML request format and data d. Understand the XML or JSON response format and data 6. Web service testing tools a. Using Apache Axis2 Api(java jar) b. Using SoapUI SoapUI Testing : 1. Installing SoapUI 2. Understanding SoapUI a. XML messaging b. XML Schema c. SOAP envelope d. SOAP body e. SOAP binding 3. SoapUI testing Services a. Functional testing b. Regression testing c. Compliance testing d. Load testing 4. A complete step to create SoapUI test a. Have a Work Space b. Create a project: Operations and Actions c. Create a test suite d. Create Test case/operation e. Create Test step/action: i. SOAP, REST, AMF, JDBC requests ii. Manual test step iii. Time delay test step iv. Groovy test step 5. Set properties anywhere and use anywhere: a. Setting at a Global, Project,TestSuite, TestCase and testStep level b. Perform property transfer 6. SoapUI assertion a. Contains and Not contains b. Xpath with wild card, Regular expression, Content, Count, Exists c. xQuery: Using for loop, order by, data and return 7. Mocking SOAP and REST services a. Create mocking from request b. Running Mock service c. Include Mock service to test case 8. SoapUI Functional Test a. WSDL Coverage b. Request/Response Coverage c. Message Assertions d.
    [Show full text]
  • A Comparative Study of Web Service Testing Tool
    © 2017 IJEDR | Volume 5, Issue 2 | ISSN: 2321-9939 A Comparative Study of Web Service Testing Tool 1Neha Sharma, 2 Pratibha Sharma, 3Hakam Singh 1Student MTech, CSE 4TH SEM, 2 Associate Professor CSE, 3Associate Professor, CSE Career Point University Hamirpur, India Abstract- Web services are continuous evolving technologies which are outcome of gradual improvement of internet services. Day by Day web services are getting more complex but publically accessible and usable. They are built using Extensible Markup Language (XML) and Simple Object Access Protocol (SOAP). Performance Testing of Web Services is different from other application testing. The performance of the real time network can be measured by QoS measurement, which can be facilitated by these tools. This paper describes three most popular open source tools and comparative study of web service testing tool is done for the parameter response time and throughput. Keywords: - Web services testing tools, Open-source software, Soap, Performance. ______________________________________________________________________________________ I. INTRODUCTION A web service is any piece of software that makes itself available over the internet and uses a standardized XML messaging system. Web services are XML-based information exchange systems that use the Internet for direct application-to-application interaction. These systems can include programs, objects, messages, or documents. The interface hides the implementation details of the service, allowing it to be used independently of the hardware or software platform on which it is implemented and also independently of the programming language in which it is written. Web services can be used to communicate within heterogeneous networks since the communication is handled by using Simple Object Access Protocol (SOAP) messages which is build up by using an XML schema that may be used to call remote services or exchange data.
    [Show full text]
  • Web Service Testing Tools: a Comparative Study
    Web Service Testing Tools: A Comparative Study Shariq Hussain, Zhaoshun Wang, Ibrahima Kalil Toure and Abdoulaye Diop School of Computer and Communication Engineering, University of Science and Technology Beijing Beijing, 100083, China [email protected], [email protected], [email protected], [email protected] There are commercial as well as open-source test tools Abstract available in the market with different features and Quality of Service (QoS) has gained more importance with the functionalities. In our study we are focusing on testing of increase in usage and adoption of web services. In recent years, Simple Object Access Protocol (SOAP) [2] web services. various tools and techniques developed for measurement and SOAP web services use XML language for definition of evaluation of QoS of web services. There are commercial as well message architecture and message format. Web Services as open-source tools available today which are being used for Description Language (WSDL) [3], an XML language is monitoring and testing QoS for web services. These tools facilitate in QoS measurement and analysis and are helpful in used to describe operations and interfaces of the web evaluation of service performance in real-time network. In this service. HTTP protocol is used for communication due to paper, we describe three popular open-source tools and compare its wide usage and popularity. them in terms of features, usability, performance, and software requirements. Results of the comparison will help in adoption Test tools automate the process of testing and are targeted and usage of these tools, and also promote development and to a specific test environment such as functional testing, usage of open-source web service testing tools.
    [Show full text]
  • Comparative Study of Performance Testing Tools: Apache Jmeter and HP Loadrunner
    Thesis no: MSSE-2016-16 Comparative Study of Performance Testing Tools: Apache JMeter and HP LoadRunner Rizwan Bahrawar Khan Faculty of Computing Blekinge Institute of Technology SE-371 79 Karlskrona Sweden This thesis is submitted to the Faculty of Computing at Blekinge Institute of Technology in partial fulfillment of the requirements for the degree of Master of Science in Software Engineering. The thesis is equivalent to 20 weeks of full time studies. Contact Information: Author: Rizwan Bahrawar Khan [email protected] University advisor: Dr. Mikeal Svahnberg School of Computing Faculty of Computing Internet : www.bth.se Blekinge Institute of Technology Phone : +46 455 38 50 00 SE-371 79 Karlskrona, Sweden Fax : +46 455 38 50 57 i i ABSTRACT Software Testing plays a key role in Software Development. There are two approaches to software testing i.e. Manual Testing and Automated Testing which are used to detect the faults. There are numbers of automated software testing tools with different purposes but it is always a problem to select a software testing tool according to the needs. In this research, the author compares two software testing tools i.e. Apache JMeter and HP LoadRunner to determine their usability and efficiency. To compare the tools, different parameters were selected which guide the tool evaluation process. To complete the objective of the research, a scenario-based survey is conducted and two different web applications were tested. From this research, it is found that Apache JMeter got an edge over HP Loadrunner in different aspects which include installation, interface and learning. Keywords: Software Testing, Automated Software Testing, Performance Testing, Web Applications ACKNOWLEDGMENT I am specially thankful to Almighty Allah who helped me to complete this thesis.
    [Show full text]