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
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages57 Page
-
File Size-