Suche senden
Hochladen
Rit 8.5.0 integration testing training student's guide
•
16 gefällt mir
•
8,691 views
Darrel Rader
Folgen
Melden
Teilen
Melden
Teilen
1 von 129
Empfohlen
Rit 8.5.0 platform training student's guide
Rit 8.5.0 platform training student's guide
Darrel Rader
Rit 8.5.0 virtualization training student's guide
Rit 8.5.0 virtualization training student's guide
Darrel Rader
Dot Net Course Syllabus
Dot Net Course Syllabus
SHPINE TECHNOLOGIES
Tài liệu CCNA - Lưu hành nội bộ
Tài liệu CCNA - Lưu hành nội bộ
Popping Khiem - Funky Dance Crew PTIT
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Thomas Weller
Automation testing
Automation testing
Tomy Rhymond
SysML v2 and the Next Generation of Modeling Languages
SysML v2 and the Next Generation of Modeling Languages
Ed Seidewitz
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
VMware Hyperic
Empfohlen
Rit 8.5.0 platform training student's guide
Rit 8.5.0 platform training student's guide
Darrel Rader
Rit 8.5.0 virtualization training student's guide
Rit 8.5.0 virtualization training student's guide
Darrel Rader
Dot Net Course Syllabus
Dot Net Course Syllabus
SHPINE TECHNOLOGIES
Tài liệu CCNA - Lưu hành nội bộ
Tài liệu CCNA - Lưu hành nội bộ
Popping Khiem - Funky Dance Crew PTIT
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Introduction to testing with MSTest, Visual Studio, and Team Foundation Serve...
Thomas Weller
Automation testing
Automation testing
Tomy Rhymond
SysML v2 and the Next Generation of Modeling Languages
SysML v2 and the Next Generation of Modeling Languages
Ed Seidewitz
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
VMware Hyperic
Object Oriented Programming(OOP) CS304 handouts
Object Oriented Programming(OOP) CS304 handouts
Sohaib Danish
Continuous Integration Testing for SAP
Continuous Integration Testing for SAP
Worksoft
Dissecting SysML v2.pptx
Dissecting SysML v2.pptx
Elizabeth Steiner
Beginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NET
Baskar K
Web Push Notifications done right
Web Push Notifications done right
Maxim Salnikov
SysML v2 and MBSE: The next ten years
SysML v2 and MBSE: The next ten years
Ed Seidewitz
Software Architectural And Detailed Design Description Template
Software Architectural And Detailed Design Description Template
Arash Sharif
Archana puranik resume kpit format
Archana puranik resume kpit format
Archana Puranik, PMP
Unit testing framework
Unit testing framework
Igor Vavrish
Robust MLOps with Open-Source: ModelDB, Docker, Jenkins, and Prometheus
Robust MLOps with Open-Source: ModelDB, Docker, Jenkins, and Prometheus
Manasi Vartak
Ultimate list of 50 Best IoT platforms of 2019
Ultimate list of 50 Best IoT platforms of 2019
ThingsCloud
Alphorm.com Formation Implémenter une PKI avec ADCS 2012 R2
Alphorm.com Formation Implémenter une PKI avec ADCS 2012 R2
Alphorm
Introduction to Software Test Automation
Introduction to Software Test Automation
Amr Ali (ISTQB CTAL Full, CSM, ITIL Foundation)
How are Companies Overcoming the Global Chip Shortage
How are Companies Overcoming the Global Chip Shortage
Qt
Introduccion a MVU con Comet
Introduccion a MVU con Comet
Luis Beltran
Swift Introduction
Swift Introduction
Natasha Murashev
OpenStack and Kubernetes - A match made for Telco Heaven
OpenStack and Kubernetes - A match made for Telco Heaven
Trinath Somanchi
Appium.pptx
Appium.pptx
SameerAlam82
SysML v2 - What's the big deal, anyway?
SysML v2 - What's the big deal, anyway?
Ed Seidewitz
Beautfiul world of Flutter Testing
Beautfiul world of Flutter Testing
Max Weber
Rit 8.5.0 virtualization training slides
Rit 8.5.0 virtualization training slides
Darrel Rader
2012 10 23_3115_rational_integration_tester_tr
2012 10 23_3115_rational_integration_tester_tr
Darrel Rader
Weitere ähnliche Inhalte
Was ist angesagt?
Object Oriented Programming(OOP) CS304 handouts
Object Oriented Programming(OOP) CS304 handouts
Sohaib Danish
Continuous Integration Testing for SAP
Continuous Integration Testing for SAP
Worksoft
Dissecting SysML v2.pptx
Dissecting SysML v2.pptx
Elizabeth Steiner
Beginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NET
Baskar K
Web Push Notifications done right
Web Push Notifications done right
Maxim Salnikov
SysML v2 and MBSE: The next ten years
SysML v2 and MBSE: The next ten years
Ed Seidewitz
Software Architectural And Detailed Design Description Template
Software Architectural And Detailed Design Description Template
Arash Sharif
Archana puranik resume kpit format
Archana puranik resume kpit format
Archana Puranik, PMP
Unit testing framework
Unit testing framework
Igor Vavrish
Robust MLOps with Open-Source: ModelDB, Docker, Jenkins, and Prometheus
Robust MLOps with Open-Source: ModelDB, Docker, Jenkins, and Prometheus
Manasi Vartak
Ultimate list of 50 Best IoT platforms of 2019
Ultimate list of 50 Best IoT platforms of 2019
ThingsCloud
Alphorm.com Formation Implémenter une PKI avec ADCS 2012 R2
Alphorm.com Formation Implémenter une PKI avec ADCS 2012 R2
Alphorm
Introduction to Software Test Automation
Introduction to Software Test Automation
Amr Ali (ISTQB CTAL Full, CSM, ITIL Foundation)
How are Companies Overcoming the Global Chip Shortage
How are Companies Overcoming the Global Chip Shortage
Qt
Introduccion a MVU con Comet
Introduccion a MVU con Comet
Luis Beltran
Swift Introduction
Swift Introduction
Natasha Murashev
OpenStack and Kubernetes - A match made for Telco Heaven
OpenStack and Kubernetes - A match made for Telco Heaven
Trinath Somanchi
Appium.pptx
Appium.pptx
SameerAlam82
SysML v2 - What's the big deal, anyway?
SysML v2 - What's the big deal, anyway?
Ed Seidewitz
Beautfiul world of Flutter Testing
Beautfiul world of Flutter Testing
Max Weber
Was ist angesagt?
(20)
Object Oriented Programming(OOP) CS304 handouts
Object Oriented Programming(OOP) CS304 handouts
Continuous Integration Testing for SAP
Continuous Integration Testing for SAP
Dissecting SysML v2.pptx
Dissecting SysML v2.pptx
Beginners - Get Started With Unit Testing in .NET
Beginners - Get Started With Unit Testing in .NET
Web Push Notifications done right
Web Push Notifications done right
SysML v2 and MBSE: The next ten years
SysML v2 and MBSE: The next ten years
Software Architectural And Detailed Design Description Template
Software Architectural And Detailed Design Description Template
Archana puranik resume kpit format
Archana puranik resume kpit format
Unit testing framework
Unit testing framework
Robust MLOps with Open-Source: ModelDB, Docker, Jenkins, and Prometheus
Robust MLOps with Open-Source: ModelDB, Docker, Jenkins, and Prometheus
Ultimate list of 50 Best IoT platforms of 2019
Ultimate list of 50 Best IoT platforms of 2019
Alphorm.com Formation Implémenter une PKI avec ADCS 2012 R2
Alphorm.com Formation Implémenter une PKI avec ADCS 2012 R2
Introduction to Software Test Automation
Introduction to Software Test Automation
How are Companies Overcoming the Global Chip Shortage
How are Companies Overcoming the Global Chip Shortage
Introduccion a MVU con Comet
Introduccion a MVU con Comet
Swift Introduction
Swift Introduction
OpenStack and Kubernetes - A match made for Telco Heaven
OpenStack and Kubernetes - A match made for Telco Heaven
Appium.pptx
Appium.pptx
SysML v2 - What's the big deal, anyway?
SysML v2 - What's the big deal, anyway?
Beautfiul world of Flutter Testing
Beautfiul world of Flutter Testing
Andere mochten auch
Rit 8.5.0 virtualization training slides
Rit 8.5.0 virtualization training slides
Darrel Rader
2012 10 23_3115_rational_integration_tester_tr
2012 10 23_3115_rational_integration_tester_tr
Darrel Rader
Rit 8.5.0 performance testing training student's guide
Rit 8.5.0 performance testing training student's guide
Darrel Rader
Rit 8.5.0 platform training slides
Rit 8.5.0 platform training slides
Darrel Rader
TE40-Template
TE40-Template
Venkat Banka
Steps for following a community forum or an individual topic
Steps for following a community forum or an individual topic
Darrel Rader
A tour of the rational lab services community
A tour of the rational lab services community
Darrel Rader
Steps to share useful resources with learning circles
Steps to share useful resources with learning circles
Darrel Rader
2012 10 23_3013_rational_integration_tester_fo
2012 10 23_3013_rational_integration_tester_fo
Darrel Rader
Steps for finding and sharing customer result stories for industry communities
Steps for finding and sharing customer result stories for industry communities
Darrel Rader
2012 10 23_2649_rational_integration_tester_vi
2012 10 23_2649_rational_integration_tester_vi
Darrel Rader
Rit 8.5.0 training release notes
Rit 8.5.0 training release notes
Darrel Rader
Rit 8.5.0 training cloud instructions
Rit 8.5.0 training cloud instructions
Darrel Rader
Suse service virtualization_image_set up_guide_140214
Suse service virtualization_image_set up_guide_140214
Darrel Rader
Doorsng po t_core_workbook_sse_imagev3.3.1_v6moda_final_letter
Doorsng po t_core_workbook_sse_imagev3.3.1_v6moda_final_letter
Darrel Rader
Andere mochten auch
(15)
Rit 8.5.0 virtualization training slides
Rit 8.5.0 virtualization training slides
2012 10 23_3115_rational_integration_tester_tr
2012 10 23_3115_rational_integration_tester_tr
Rit 8.5.0 performance testing training student's guide
Rit 8.5.0 performance testing training student's guide
Rit 8.5.0 platform training slides
Rit 8.5.0 platform training slides
TE40-Template
TE40-Template
Steps for following a community forum or an individual topic
Steps for following a community forum or an individual topic
A tour of the rational lab services community
A tour of the rational lab services community
Steps to share useful resources with learning circles
Steps to share useful resources with learning circles
2012 10 23_3013_rational_integration_tester_fo
2012 10 23_3013_rational_integration_tester_fo
Steps for finding and sharing customer result stories for industry communities
Steps for finding and sharing customer result stories for industry communities
2012 10 23_2649_rational_integration_tester_vi
2012 10 23_2649_rational_integration_tester_vi
Rit 8.5.0 training release notes
Rit 8.5.0 training release notes
Rit 8.5.0 training cloud instructions
Rit 8.5.0 training cloud instructions
Suse service virtualization_image_set up_guide_140214
Suse service virtualization_image_set up_guide_140214
Doorsng po t_core_workbook_sse_imagev3.3.1_v6moda_final_letter
Doorsng po t_core_workbook_sse_imagev3.3.1_v6moda_final_letter
Ähnlich wie Rit 8.5.0 integration testing training student's guide
Endversion1 skriptum characterization of miscellaneous multi parametrical sil...
Endversion1 skriptum characterization of miscellaneous multi parametrical sil...
EjderCevher
GUIA REFERENCIA EZSTEER PARA EZ250
GUIA REFERENCIA EZSTEER PARA EZ250
Pablo Cea Campos
Enerit ISO 50001 User Guide
Enerit ISO 50001 User Guide
Arantico Ltd
Audit Commander User Guide
Audit Commander User Guide
EZ-R Stats, LLC
Manual 4 asse
Manual 4 asse
gueste6c997
Lesson 5...Guide
Lesson 5...Guide
bhushan Nehete
V1.0 fii rpa040-user_experimental_manual
V1.0 fii rpa040-user_experimental_manual
angiey y
AppLoader User Guide
AppLoader User Guide
NRG Global
Practical Guide To Software System Testing
Practical Guide To Software System Testing
vladimir zaremba
Pharma Info Sys
Pharma Info Sys
chris20854
Fiat kobelco t13 telehandlers service repair manual
Fiat kobelco t13 telehandlers service repair manual
kfdjkskdmm
Fiat kobelco t14 telehandlers service repair manual
Fiat kobelco t14 telehandlers service repair manual
fjskekqazdmmem
Fiat kobelco t17 telehandlers service repair manual
Fiat kobelco t17 telehandlers service repair manual
fjskeawsekdmme
Fiat kobelco t17 telehandlers service repair manual
Fiat kobelco t17 telehandlers service repair manual
fjskekqaswdmmem
Yanmar vi o10 2 excavator service repair manual
Yanmar vi o10 2 excavator service repair manual
fjkskekemm
Yanmar vi o10 2 excavator service repair manual
Yanmar vi o10 2 excavator service repair manual
ufjjsejfkskemme
Yanmar vi o10 2 excavator service repair manual
Yanmar vi o10 2 excavator service repair manual
fujsekfkksmemxs
Yanmar ViO10-2 Excavator Service Repair Manual.pdf
Yanmar ViO10-2 Excavator Service Repair Manual.pdf
fuskddmmd
Yanmar ViO10-2 Excavator Service Repair Manual.pdf
Yanmar ViO10-2 Excavator Service Repair Manual.pdf
jfksemmdm3e
Yanmar ViO10-2 Excavator Service Repair Manual.pdf
Yanmar ViO10-2 Excavator Service Repair Manual.pdf
f8isekdodkdmd
Ähnlich wie Rit 8.5.0 integration testing training student's guide
(20)
Endversion1 skriptum characterization of miscellaneous multi parametrical sil...
Endversion1 skriptum characterization of miscellaneous multi parametrical sil...
GUIA REFERENCIA EZSTEER PARA EZ250
GUIA REFERENCIA EZSTEER PARA EZ250
Enerit ISO 50001 User Guide
Enerit ISO 50001 User Guide
Audit Commander User Guide
Audit Commander User Guide
Manual 4 asse
Manual 4 asse
Lesson 5...Guide
Lesson 5...Guide
V1.0 fii rpa040-user_experimental_manual
V1.0 fii rpa040-user_experimental_manual
AppLoader User Guide
AppLoader User Guide
Practical Guide To Software System Testing
Practical Guide To Software System Testing
Pharma Info Sys
Pharma Info Sys
Fiat kobelco t13 telehandlers service repair manual
Fiat kobelco t13 telehandlers service repair manual
Fiat kobelco t14 telehandlers service repair manual
Fiat kobelco t14 telehandlers service repair manual
Fiat kobelco t17 telehandlers service repair manual
Fiat kobelco t17 telehandlers service repair manual
Fiat kobelco t17 telehandlers service repair manual
Fiat kobelco t17 telehandlers service repair manual
Yanmar vi o10 2 excavator service repair manual
Yanmar vi o10 2 excavator service repair manual
Yanmar vi o10 2 excavator service repair manual
Yanmar vi o10 2 excavator service repair manual
Yanmar vi o10 2 excavator service repair manual
Yanmar vi o10 2 excavator service repair manual
Yanmar ViO10-2 Excavator Service Repair Manual.pdf
Yanmar ViO10-2 Excavator Service Repair Manual.pdf
Yanmar ViO10-2 Excavator Service Repair Manual.pdf
Yanmar ViO10-2 Excavator Service Repair Manual.pdf
Yanmar ViO10-2 Excavator Service Repair Manual.pdf
Yanmar ViO10-2 Excavator Service Repair Manual.pdf
Mehr von Darrel Rader
DevOps Community Blueprint
DevOps Community Blueprint
Darrel Rader
dW Sharing your Profile
dW Sharing your Profile
Darrel Rader
Steps for creating an engagement activity
Steps for creating an engagement activity
Darrel Rader
Steps for creating a personal learning roadmap
Steps for creating a personal learning roadmap
Darrel Rader
Joe’s upskilling story
Joe’s upskilling story
Darrel Rader
Making your Overview Page Look Lke a Whiteboard
Making your Overview Page Look Lke a Whiteboard
Darrel Rader
Mehr von Darrel Rader
(6)
DevOps Community Blueprint
DevOps Community Blueprint
dW Sharing your Profile
dW Sharing your Profile
Steps for creating an engagement activity
Steps for creating an engagement activity
Steps for creating a personal learning roadmap
Steps for creating a personal learning roadmap
Joe’s upskilling story
Joe’s upskilling story
Making your Overview Page Look Lke a Whiteboard
Making your Overview Page Look Lke a Whiteboard
Rit 8.5.0 integration testing training student's guide
1.
IBM Rational Integration Tester Testing Training Guide
2.
Note Before using this information and the product it supports, read the information in “Notices” on page 126. © Copyright IBM Corporation 2001, 2013.
3.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE OVERVIEW .................................................................................................................................... 4 1 PREPARATION
......................................................................................................................... 5 1.1 1.2 CONFIGURING THE LIBRARY MANAGER FOR WEBSPHERE APPLICATION SERVER AND MQ ...... 5 1.3 2 INTRODUCTION ................................................................................................................. 5 INTERCEPT FOR WEBSPHERE MQ ...................................................................................... 7 PROJECT SETUP ...................................................................................................................... 8 2.1 2.2 CREATING A NEW PROJECT ................................................................................................ 9 2.3 3 THE INITIAL SCREEN .......................................................................................................... 8 EXERCISE: CREATING A NEW PROJECT ............................................................................. 10 COMPLEX ENVIRONMENTS ...................................................................................................... 13 3.1 3.2 MANAGING FLIGHT BOOKINGS .......................................................................................... 13 3.3 FINDING AND BOOKING HOTELS ........................................................................................ 14 3.4 4 INTRODUCTION ............................................................................................................... 13 FLIGHT ADMINISTRATION .................................................................................................. 15 SYNCHRONIZATION ................................................................................................................ 17 4.1 4.2 5 INTRODUCTION ............................................................................................................... 17 EXERCISE: SYNCHRONIZING WITH A WEBSPHERE APPLICATION SERVER ............................. 18 BUILDING A SYSTEM MODEL FROM RECORDED EVENTS ............................................................. 21 5.1 5.2 RECORDING MQ MESSAGES ............................................................................................ 21 5.3 EXERCISE: SETTING UP THE TRANSPORTS ......................................................................... 22 5.4 EXERCISE: ADDING THE FLIGHT BOOKING MESSAGE SCHEMAS ............................................ 23 5.5 EXERCISE: RECORDING EVENTS FROM A TRANSPORT ......................................................... 24 5.6 EXERCISE: BUILDING OPERATIONS FROM RECORDED EVENTS ............................................. 26 5.7 6 INTRODUCTION ............................................................................................................... 21 EXERCISE: COMPLETING THE SYSTEM MODEL .................................................................... 33 MANAGING RECORDED MESSAGES .......................................................................................... 36 6.1 6.2 EXERCISE: RECORDING EVENTS FROM AN OPERATION ....................................................... 36 6.3 7 INTRODUCTION ............................................................................................................... 36 ADVANCED EXERCISE: CREATING AND RUNNING TRIGGERS ................................................. 39 CREATING TESTS FOR VACATION BOOKING ............................................................................. 41 7.1 INTRODUCTION ............................................................................................................... 41 7.2 THE TESTS USING MEP WIZARD....................................................................................... 41 7.3 REGULAR EXPRESSIONS .................................................................................................. 42 7.4 EXERCISE: CREATING TESTS WITH THE MEP WIZARD ......................................................... 42 Page 1 of 127 © IBM Corporation 2001, 2013
4.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 7.5 COPYING AND LINKING
REQUIREMENTS ............................................................................. 47 7.6 TEST TEMPLATES ............................................................................................................ 48 7.7 EXERCISE: CREATING A TEST FROM A TEMPLATE ............................................................... 48 8 REPAIRING TESTS .................................................................................................................. 50 8.1 INTRODUCTION ............................................................................................................... 50 8.2 EXERCISE: REVIEWING TEST RESULTS .............................................................................. 50 8.3 EXERCISE: REPAIRING TESTS ........................................................................................... 51 8.4 THE RULE CACHE ........................................................................................................... 55 8.5 EXERCISE: CREATING VALIDATION RULES .......................................................................... 55 9 CREATING AND RUNNING A STUB ............................................................................................ 57 9.1 EXERCISE: CREATING A STUB FROM RECORDED EVENTS .................................................... 57 9.2 EXERCISE: EXECUTING A STUB FROM RATIONAL INTEGRATION TESTER ............................... 59 10 STORING AND MANIPULATING DATA ..................................................................................... 62 10.1 TAGS AND THE TAG DATA STORE .................................................................................. 62 10.2 CREATING TAGS .......................................................................................................... 63 10.3 USING TAGS ................................................................................................................ 65 10.4 EXERCISE: TESTING WITH TAGS .................................................................................... 65 11 DATA DRIVEN TESTS ........................................................................................................... 68 11.1 DATA SOURCES ........................................................................................................... 68 11.2 EXERCISE: DATA DRIVEN TESTING ................................................................................. 68 11.3 OPTIONAL AND REPEATING ELEMENTS ........................................................................... 73 11.4 AN EXAMPLE OF REPEATING ELEMENTS.......................................................................... 73 11.5 EXERCISE: ADDING THE NEW OPERATION AND SCHEMA ................................................... 76 11.6 EXERCISE: CREATING THE REPEATING ELEMENTS TEST ................................................... 77 12 TEST ACTIONS ................................................................................................................... 81 12.1 TEST ACTION SUMMARY................................................................................................ 81 12.2 EXERCISE: RUN COMMAND .......................................................................................... 84 12.3 EXERCISE: LOG ........................................................................................................... 86 12.4 EXERCISE: LOOKUP TEST DATA .................................................................................... 88 12.5 FAILURE PATHS AND PASS PATHS................................................................................. 92 12.6 THE PASS AND FAIL ACTIONS ........................................................................................ 92 12.7 EXERCISE: USING FAILURE PATHS ................................................................................ 92 12.8 FAILURE PATHS AND EXCEPTION QUEUES ...................................................................... 94 13 INTERACTING WITH DATABASES........................................................................................... 96 Page 2 of 127 © IBM Corporation 2001, 2013
5.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 13.1 INTRODUCTION ............................................................................................................ 96 13.2 EXERCISE:
CREATING A DATABASE COMPONENT MANUALLY ............................................ 96 13.3 EXERCISE: SQL COMMAND .......................................................................................... 98 13.4 EXERCISE: COLUMN AND CELL VALIDATIONS ................................................................ 100 14 RUN TEST ....................................................................................................................... 102 14.1 INTRODUCTION .......................................................................................................... 102 14.2 EXERCISE: CREATING THE CHILD TEST......................................................................... 102 14.3 EXERCISE: CREATING THE PARENT TEST...................................................................... 103 14.4 EXERCISE: PASSING DATA BETWEEN THE TESTS ........................................................... 105 14.5 CONCLUSION............................................................................................................. 106 15 MONITORING LOG FILES .................................................................................................... 107 15.1 OVERVIEW ................................................................................................................ 107 15.2 EXERCISE: LOOKING FOR ERROR MESSAGES ................................................................ 107 16 ADVANCED STUBS............................................................................................................ 111 16.1 17 EXERCISE: PARAMETERIZED STUBS ............................................................................. 111 FURTHER TEST AUTOMATION............................................................................................. 117 17.1 INTRODUCTION .......................................................................................................... 117 17.2 EXERCISE: PASSING TAGS BETWEEN TESTS ................................................................. 117 17.3 MANAGING TEST RESULTS .......................................................................................... 119 17.4 EXERCISE: MANAGING TEST RESULTS.......................................................................... 120 18 RUNNING TESTS EXTERNALLY ........................................................................................... 123 18.1 INTRODUCTION .......................................................................................................... 123 18.2 EXERCISE: SCHEDULING TESTS .................................................................................. 123 19 LEGAL NOTICES ............................................................................................................... 126 Page 3 of 127 © IBM Corporation 2001, 2013
6.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE Overview This document serves as a training manual to help familiarize the user with the functionality present in IBM® Rational® Integration Tester. Most of the training exercises make use of a variety of technologies, including IBM WebSphere® Application Server, IBM WebSphere MQ, IBM DB2®, and web services. It is assumed that the reader has a fair understanding of these systems. The main objectives of this training course are to present the various functionalities of Rational Integration Tester and how best to use them in testing Message Oriented Middleware applications. In this course we will: Deal with complex, multi‐component architectures, looking at how to model and test those within Rational Integration Tester Examine advanced functions of Recording Studio Work with several advanced features of tests: o Create tests using templates o Update tests based on their results o
Use data files to determine how tests will be run o Work with the various test actions available inside tests o Test against databases o Monitor log files Build test suites Run tests and test suites outside Rational Integration Tester. Before we dive into this training course, please make sure you have all the correct files in place. If you are using a cloud instance, the training files should be located on the desktop Otherwise, your instructor will let you know where to find any required files. Page 4 of 127 © IBM Corporation 2001, 2013
7.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 1 Preparation 1.1 Introduction When working with proprietary middleware technologies, there will often be a certain amount of configuration that needs to be carried out before you can begin to work with that technology from Rational Integration Tester. In most cases, you will need to set up the various Java libraries that allow connectivity to that technology. In a few cases, you might also need to perform other setup to enable recording and virtualization on that particular platform. In the example system used in this course, you will be using a number of IBM technologies. Some of these require more setup than others. The simplest one of these is IBM DB2. Rational Integration Tester includes drivers for a number of databases, including DB2, so no further setup needs to be done for these in order to run tests against them. Note that you might need to do further setup for recording or virtualization of JDBC connections, but that is outside the scope of this course. The second item you will need to work with is the WebSphere Application Server. While there is some setup to be performed here, it is still quite simple. You will need to tell the Library Manager where certain Java libraries provided with the WebSphere Application Server can be found. Provided you have installed the application server into the default location, you can expect Library Manager to find these quickly. WebSphere MQ also requires setup within the Library Manager. In addition to this, for certain recording and virtualization methods, an extra piece of software needs to be installed on the queue manager that you want to work with. As you will be recording traffic from WebSphere MQ in this course, we will need to set this up as well. 1.2
Configuring the Library Manager for WebSphere Application Server and MQ Depending on the version of WebSphere Application Server and MQ, specific product libraries are required. Please make sure that you have configured Library Manager with the right libraries. This has already been set up for any cloud instances. 1. In the Library Manager, click the IBM WebSphere Application Server item on the left side. You will now see a list of providers, for each supported version of the WebSphere Application Server. Page 5 of 127 © IBM Corporation 2001, 2013
8.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 2. In the Providers section on the right, select version 8.5 of WebSphere Application Server. 3. Go down to the Settings section, and make sure that each of the necessary .jar files has been found. If not, select each one in turn, clicking the Edit button to locate the .jar files. If necessary, your instructor will be able to provide you with a copy of each file. 4.
Next, you will need to do the same for IBM WebSphere MQ 7.1. Page 6 of 127 © IBM Corporation 2001, 2013
9.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 1.3 Intercept for WebSphere MQ In order to set up recording or stubbing over WebSphere MQ, which we will be using during this course, you might want to set up an extra tool: the intercept library. This is an extra library supplied by Rational Integration Tester that can be added to a WebSphere MQ installation. It can then intercept messages that are sent to a queue on a given queue manager, copying them to Rational Integration Tester while recording, or redirecting them to a stub during virtualization. There are alternative methods of configuring recording and stubbing for WebSphere MQ; however, as using the intercept library is the simplest method to use, we will be making use of it in this training course. It has already been installed onto the WebSphere MQ queue manager for use in this training course. Page 7 of 127 © IBM Corporation 2001, 2013
10.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 2 Project setup 2.1
The initial screen Once configuration of our system is complete, we are ready to launch Rational Integration Tester and create a new project. Launching Rational Integration Tester will bring up the following screen: If you are running Rational Integration Tester on your local computer, you will need to make sure you have a license at this stage; cloud instances should already have a license installed for you. Once licensing is sorted out, you have several options. From top to bottom: New Project: allows you to create a project. Clone Project: creates a copy of any Rational Integration Tester project. Fetch Project from Source Control: Check out a project from a source control system, and open it. Note that you will need to configure Rational Integration Tester to communicate with your source control system before doing this. Open Link: follows a link taken from the Test Lab to navigate to the results of a test or test suite. Page 8 of 127 © IBM Corporation 2001, 2013
11.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE Open an existing project: opens an existing project, either from the list of recent projects shown by Rational Integration Tester, or by browsing to a .ghp file. 2.2 Creating a new project Creating a new project involves the following four stages: 1. Setting the project name and location 2.
Connecting to external servers 3. Setting up user‐based permissions 4. Setting up change management integration Only the first step is compulsory; the others are optional, with the settings available to edit later from within the project. If you need to edit any of these settings after the project has been created, you can do it through the Project Settings window (found in the Project menu of Rational Integration Tester). That said, filling out the server settings listed in the second stage of the project creation process will normally be very useful, and we will be supplying that information for the examples used in this course. The first of these settings is for a results database, which we will be using during this training course. The results database provides the ability to record and view historical test results. Without this, you will only be able to view results from the current session. It also provides the ability to record logging data from any stubs that you use. Scripts are provided with Rational Integration Tester to help you set up and configure a results database, which can be an IBM DB2, MySQL, MS SQL, or Oracle database. Once it is set up, the database can be shared across multiple users and multiple projects. The other server settings available are for Rational Test Control Panel and the Results Server (legacy users only). Rational Test Control Panel provides the ability to manage any proxies and agents used by the software; these capabilities can be used while recording and stubbing. The Results Server setting is used to create links to the reports held on the server, which should also be connected to your results database; this functionality is now provided by Rational Test Control Panel, so the Results Server is no longer required, and will not be used in this project. As we only have a single user for our example project, we will not configure user‐based permissions for our project. It will be useful in other projects where it is necessary to restrict access to a project to certain individuals, or to allow different access levels to the project for different users. In particular, it will be helpful for projects that implement data masking. Permissions will allow one user to set up masks over certain message fields, so that other users cannot view the contents of those fields. Finally, we can configure a connection to change management tools such as JIRA, HP Quality Center, or any Open Services for Lifecycle Collaboration (OSLC) compliant change management system, such as IBM Rational Team Concert™. This allows us to link directly into these tools, and to raise defects directly from a test or test suite. Page 9 of 127 © IBM Corporation 2001, 2013
12.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE At the end of the wizard, a new project folder will be created within your file system. This folder will hold all resources, including a model of the system under test, along with any tests, stubs or other resources created for the project. Data files used by your project can also be stored here. This can help you make your project more portable by including everything in one place. Alternatively, you might want to include those data files in another location; Rational Integration Tester will be able to refer to them either way. 2.3 Exercise: Creating a new project You will now create a new project for the Vacation Booking project and configure a few settings that will be required later in the project. 1. From the initial screen of Rational Integration Project, choose New Project and click OK. 2.
Call the project Vacation Booking Testing. Page 10 of 127 © IBM Corporation 2001, 2013
13.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 3. Click Next. 4. The wizard will now display the Server Settings dialog box. At the top of this dialog box, in the Results Database section, you should see details that have already been filled in for the Database URL, User Name, and Password fields. If you need to re‐enter them, the settings for the databases on the cloud instances are shown below. For other environments, ask your trainer. Settings Value Database URL jdbc:db2://localhost:50000/resultdb User Name db2inst1 Password Gr33nhat 5.
Click Test Connection. A window should open stating that the connection was successful. 6. Below the database settings, we can connect to the Results Server and Rational Test Control Panel. We will not be using the Results Server, but Rational Test Control Panel will be needed later on. Use the following settings to connect: Settings Value URL http://localhost:7819/RTCP Domain Booking System Page 11 of 127 © IBM Corporation 2001, 2013
14.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 7. When you are satisfied with the details entered on this screen, click Finish. 8. The new project will be opened in Rational Integration Tester. 9.
Add a new environment using Project > Create New Environment. Give the environment the name Local, and click OK. 10. The Environments editor will open; click OK again to close it. You should then see that the Local environment is selected in the title bar. Page 12 of 127 © IBM Corporation 2001, 2013
15.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 3 Complex environments 3.1
Introduction The Platform training modules used a simple web service to introduce you to the toolset. This set of modules will use a more complex example, the Vacation Booking system, which has several different subsystems. Your instructor may choose to use some or all of these sections during your training course. So before we can go any further, we need to know how this example system under test fits together. There are three main sections to the system that we will be dealing with: a flight booking system, a hotel booking system, and a flight administration system. All three parts of the system are presented to the user through their web browser; the interface is generated by a Tomcat web server, which connects to the relevant parts of the system as required. In the background, the following software has been deployed: Tomcat IBM WebSphere Application Server IBM WebSphere MQ IBM DB2 In this module, you will see how the different parts of this system fit together. In the following modules, you will see two different methods that can be used to build the model of the system under test: using synchronization and recorded messages. 3.2 Managing flight bookings The Vacation Booking system has three separate subsystems. The first of these lets users book a flight on a fictional airline. Bookings can also be managed through the interface, allowing users to find, update, and delete existing bookings. The implementation for this is split into two parts: the set of services for making bookings, and the set of services for managing bookings. Page 13 of 127 © IBM Corporation 2001, 2013
16.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE When a user makes a booking, Tomcat publishes a message onto a MQ queue, which is then retrieved by the MakeBooking service running in WebSphere Application Server. This looks at the credit card type, and posts a message onto a queue for that card type (Global, Multinational, or Worldwide). A service for that card type, also running on WebSphere Application Server, will then pick up the message, and process it. In order to process the booking, the service needs to know what reservation numbers exist, create a new reservation number, and record it for future reference. All of this is done by referring to a DB2 database that is used to hold booking information. The reservation number is then passed back to MakeBooking, to Tomcat, and then the user. When a user wants to manage a booking, Tomcat will be interacting with a set of web services implemented by WebSphere Application Server. These services will allow the user to log into the booking system, search existing bookings, update bookings, or delete them. Searching, updating, and deleting will access the same database that was used previously for making bookings. 3.3 Finding and booking hotels Following a flight booking, a user might require a hotel in that destination. The HotelFinder web service allows the user to look up a list of hotels that are available in a particular city between a given pair of dates. Tomcat can then provide this list to the user. The HotelFinder web service is hosted by Tomcat itself, rather than running on WebSphere Application Server. Page 14 of 127 © IBM Corporation 2001, 2013
17.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE Vacation Booking webapp SOAP/HTTP getHotels bookHotel 3.4 Flight administration On the day of a flight, users from the airline will need to check in passengers. The administration services allow the user to first search through a list of flights, select a flight, and then select particular booking on that flight. This is all done by Tomcat, directly accessing the DB2 database used when creating and managing bookings. When a passenger is checked in, the airline user will need to check their passport, and update records accordingly. To do this once a booking has been selected, a message is posted to an MQ queue in COBOL Copybook format. It is picked up by the flight confirmation service (running as its own process), which then posts a reply back, also in Copybook format. Tomcat then uses the information in this reply message to update the database. Page 15 of 127 © IBM Corporation 2001, 2013
18.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE Page 16 of 127 © IBM Corporation 2001, 2013
19.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 4 Synchronization 4.1 Introduction The simplest option when building a model of the system under test is synchronisation. This process analyzes the services and infrastructure provided by the system and replicates that within the Architecture School. This will set up the logical and physical views, an environment, and any message schemas used by the various services in the system. In order to do this, Rational Integration Tester requires a valid synchronisation source to exist within the system under test, so that it can request information on the system. Supported synchronization sources include: WSDL UDDI (including WebSphere Service Registry and Repository) WebSphere Message Broker WebSphere Application Server webMethods Integration Server TIBCO BusinessWorks Project/Design Time Library SAP System Oracle SCA Domain Adding any of these to your project will give you the option to synchronise with the data held by that external resource. To start the synchronisation process, you can add any one of these infrastructure components to the Logical View of Architecture School, or by switching to Synchronisation view and adding it there. Either way, the process of adding a synchronization source will provide the option of synchronising. Multiple synchronisation sources can be added to the project if required.
After synchronisation, the system under test might change; as this will be recorded within the synchronisation source, it is possible for Rational Integration Tester to update the project to reflect these changes. To do this within the Synchronisation view, first click Check Synchronisation . This will compare the system model within the Rational Integration Tester project against any synchronisation sources and display any differences between these. Following on from that, you can click the Synchronise button, which will then update the Rational Integration Tester project to resolve these differences. Page 17 of 127 © IBM Corporation 2001, 2013
20.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 4.2 Exercise: Synchronizing with a WebSphere Application Server 1. You can start synchronization from either the Logical View or Synchronization View of the Architecture School. The process is largely the same either way, but in this example, you will use the Logical View, so switch to that view now. 2.
Make sure that nothing is selected, so that the next item you create will go at the top level. 3. From the toolbar, add a new IBM WebSphere Application Server. 4. A dialog box will open to start the synchronization process. The first thing you will need to do is to set up the connection details of the application server. To do this, click the New button. 5. A second dialog box will open. Configure the server with the host localhost and the SOAP Connector Port 8880. The security settings can be left blank. When you are done, click OK. 6. You will then return to the first dialog box. Now that you have entered details for an application server, click Next. 7. On the next screen, select Create a New Component and click Next again. Page 18 of 127 © IBM Corporation 2001, 2013
21.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 8. When asked which environment to use, choose the Local environment you created previously, and click Next again. 9. On the final screen of the wizard, select Open Synchronisation View and perform the synchronisation. 10.
Click Finish. The view will switch to Synchronisation view, and it will take a moment to read in details from the system under test and update your project. Once it is done, you should see the following in Synchronisation View: Page 19 of 127 © IBM Corporation 2001, 2013
22.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 11. If you switch between the different views in Architecture School, you should be able to see the same new elements added in Logical View, Physical View and Schema Library. Page 20 of 127 © IBM Corporation 2001, 2013
23.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 5 Building a
system model from recorded events 5.1 Introduction As you might have noticed, while Rational Integration Tester supports a number of synchronization sources, not all of these will exist in every system. If a system does not have any of the synchronization sources mentioned above, then there is nothing to refer to when building a model of a system under test. For example, a WebSphere MQ‐based system might be able to provide information on the available queues and topics, while being unable to provide any information on the operations that access those resources, the dependencies between operations, or the message schemas being used. In this case, we might be able to build a model of the system from recorded data. This is similar to the situation we see with the WebSphere Application Server and WebSphere MQ. The application server can tell us of the existence of the queue manager, but it does not give us enough information to be able to build up the operations that use that queue manager, or the dependencies between those operations. We could build these by hand to fill in the missing gaps, but instead we will use recorded messages to help us build the operations, leaving us with only a few dependencies to add manually. 5.2 Recording MQ messages Before you start doing this, we will take a quick look at how you will be recording messages on the MQ transport. There are several different ways to record messages over this transport; each has their own advantages and disadvantages. The choices are as follows: Queue browsing Proxy queues Mirror queues Dynamic mirror queues Queue aliasing Your choice will depend on several factors. Some methods, such as the use of proxy queues, require changes to the system under test. Others are invisible to the system under test, but require access to the MQ server in order to make modifications. Other factors will include determining if the system under test can be stopped temporarily, to ensure that no messages are missed, and connections can be set up appropriately; and finally, the amount of effort required on the part of the user, and the impact on the performance of the MQ server. For more information on the pros and cons of each method, refer to the Rational Integration Tester Information Center. In our example, we will be using dynamic mirror queues, as this requires no modification to the system under test, and requires a very small amount of setup on the part of the user. Regardless of the method that you have chosen, the recording setup should look similar to the following diagram: Page 21 of 127 © IBM Corporation 2001, 2013
24.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE The client application will communicate by way of request and reply queues with a given service. Rational Integration Tester will read the request and response messages being posted to the queues within the queue manager. While the queue manager might act slightly differently to its usual behavior (for example, by copying each message to a mirror queue), the messages themselves will be untouched, and the actions of the system under test should also be unchanged. Note that we can choose to record just a given service if we have an operation definition (and so know which queues to monitor), or we can record all queues within the queue manager by recording the MQ transport. 5.3 Exercise: Setting up the transports In the Vacation Booking system, you should now have a lot of information about the web services included in the system. However, the WebSphere Application Server does not provide information on the operations that run over MQ. This is because the applications installed on the application server do not provide enough information themselves. As you will not be able to synchronize with the server to get information about these, you will record the WebSphere MQ transport, and build up the operations that way. 1. Before you can record the transport, you will need to select your recording method. Go to the Physical View of Architecture School. 2.
Find the MQ Queue Manager called QM_vbooking, and double‐click it to edit it. 3. A dialog box will open showing the physical settings for your queue manager. Switch to the Recording tab. 4. Under Queue Recording, set the Recording Mode to Dynamic Mirror Queues. All other settings here can be left at their defaults. Page 22 of 127 © IBM Corporation 2001, 2013
25.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 5. Click OK to close the properties for the MQ Queue Manager. 5.4 Exercise: Adding the flight booking message schemas In order to make working with recorded messages easier, you will also need to add the message schemas that will be used in those messages. 1.
Return to the Schema Library. Here, we need to add three new XML schemas, so click the XSDs button on the left of the screen to show any available XML schema definition (XSD) files; none should be shown at the moment. 2. We could use the XSD button in the Schema Library toolbar to add new XSD files to the project, as we did with the addNumbers WSDL. However, as we have a group of files, we will just drag them into the schema library. Find the XSD Schemas folder on your desktop and drag it into the center panel of the Schema Library. 3. Rational Integration Tester should now show three new XSD files: BookFlightRequest, BookFlightResponse, and Payment. Page 23 of 127 © IBM Corporation 2001, 2013
26.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 4. You can select each of these, and view the associated message schemas on the right side of the screen. 5.5 Exercise: Recording events from a transport We will now capture events for the MQ Queue Manager transport. 1.
Before we get started, we will need to initialize a few components of the system, such as the GUI layer, to make sure that they are running. To do this, use the Start Tomcat shortcut on your desktop. 2. Return to Rational Integration Tester, and go to the Logical View of Architecture School. 3. Make sure you are in the Local environment (as shown in the Rational Integration Tester title bar). 4. Select the QM_vbooking infrastructure component. Note that there will be two: one representing the transport as a simple JMS system, the other as a WebSphere MQ queue manager. Choose the WebSphere MQ queue manager 5. Right‐click the QM_vbooking component, and select Record. The perspective will change to the Recording Studio, and the QM_vbooking transport should be listed in the Event Monitors panel. 6. Click the Start Recording button in the Events View toolbar to start recording events. 7. In a browser window, open the Vacation Booking home page. For a cloud image, this will be listed in the favorites menu of your web browser; otherwise, ask your trainer. Page 24 of 127 © IBM Corporation 2001, 2013
27.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 8. Click the “Stansted to Barcelona” Book Now button. Here, you will have the opportunity to book a flight and a hotel. For the moment, we will only worry about flights, so skip the hotel data at the top of the form, and just enter passenger and payment details for a flight. The values do not matter too much, as long as they are filled in. 9. Click Proceed when finished and you should see a confirmation page with a reservation number. Page 25 of 127 © IBM Corporation 2001, 2013
28.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 10. Return to Rational Integration Tester and you should see that four events have been recorded in the Events View. 11. Click the first message in the Events View. You should then see the message details displayed in the panel below, showing the message that was initially sent by Tomcat. 12.
We still need information on how the system deals with requests for other credit card types, as these will be posted to different queues, so return to your web browser, and make bookings for Global and Worldwide credit cards. These should also be recorded in Rational Integration Tester, giving you a total of 12 recorded events. 5.6 Exercise: Building operations from recorded events Now that we have recorded some events, we can use these for a number of different purposes. The first thing we will do is to complete the model of the system. 1. Take a look at your set of recorded messages, in particular the description fields. There should be 12 messages, and the descriptions will list the queues that were used while recording. This should include vbooking.booking, vbooking.payment.multinational, vbooking.payment.global, vbooking.payment.worldwide, along with their respective reply queues. If you are missing any of the different credit card queues, go back and record a booking using that particular type of card. 2. Pause the recording by clicking the Pause button. 3. Select all 12 messages before clicking the Save button. 4. The Recorded Events wizard will open, allowing us to choose what we will do with the selected events. To build a model of the system under test, we need to create some operations, so select that option, and then click Next. Page 26 of 127 © IBM Corporation 2001, 2013
29.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 5. Rational Integration Tester will now display the 12 recorded messages, attempting to separate them into distinct operations. It should look something like the following: Page 27 of 127 © IBM Corporation 2001, 2013
30.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 6. Because the operation names are generated from the queue names used, we might like to change them to something more useful. Select the first message belonging to the operation that is currently named vbooking.booking – vbooking.booking.reply. 7. You will now be able to enter a new name below, so enter MakeBooking, and click Rename. You will be asked if you want to apply this change to all other messages that were associated with the same operation; click Yes. You should then see the Operation column update accordingly. 8.
Next, we will add the message schemas for MakeBooking. To do this, select one of the request messages for MakeBooking on the left side of the window (it will contain all of the data you entered into the web form earlier). On the right side, select the second line of the message, beginning text (String). Page 28 of 127 © IBM Corporation 2001, 2013
31.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 9. The Add Schema button should now be active. Click it, and the Select Schema dialog box will open. On the left side, select XSDs, then the BookFlightRequest XSD. Click Finish to apply the schema to this message. You should then see the namespace update within all fields of the message: Page 29 of 127 © IBM Corporation 2001, 2013
32.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 10. Now select a response message for MakeBooking, and follow the same procedure, using the BookFlightResponse XSD. 11. We will need to go through the same process for the other operations in our system. Select the two messages that are associated with the vbooking.payment.multinational queue, give them an operation name of ProcessMultinational, and click Rename. 12.
We also need to set up message schemas for ProcessMultinational, but this will be a little bit simpler than for MakeBooking. If you take a look at the response message, you will see that it only includes a single text field, so we will not need to apply a schema there. Select the request message for the ProcessMultinational operation, and apply the Payment XSD as the schema. 13. You can set up the last two operations for Global and Worldwide cards in exactly the same way. Call them ProcessGlobal and ProcessWorldwide; you can use the same message schemas as for ProcessMultinational. Once you are done, the window should look like the following screen capture: Page 30 of 127 © IBM Corporation 2001, 2013
33.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 14. Click Next. You will then be able to select where in the model of the system these operations should be created. The wizard will suggest putting them under the IBM WebSphere Application Server component; we will create a separate service component inside that instead. Click the Select button. 15. A Select dialog box will open. Click the Create New Service Component
button and give the new service component a name of Flight Bookings. Make sure the new service component is selected, and then click OK to return to the wizard. Page 31 of 127 © IBM Corporation 2001, 2013
34.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 16. You will now see a summary, letting you know that Rational Integration Tester will be creating four operations for you. Make sure that Open resource after finish is cleared, and then click Finish to create all four operations. You can now switch back to the Architecture School to see what has been created. Page 32 of 127 © IBM Corporation 2001, 2013
35.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 17. In the Logical View, you can now double‐click each operation to view its properties. Do this for one of the operations you created, and view the Message Exchange Pattern tab. This should show you the message schemas you set earlier for request and reply messages; it should also show you the transport information used by that operation, including the names of the queues that it uses. 5.7 Exercise: Completing the system model You have now added a new group of operations to your model of the system under test. Each of these should have their message exchange pattern configured, based on the schema information you supplied while creating them. Each operation will also have a dependency on the WebSphere MQ transport, as that is the transport used within their message exchange pattern. However, the operations also have other dependencies. For example, the MakeBooking operation needs to use a payment processor to complete a booking. Remember that adding a dependency does not indicate an input/output relationship. In this example, when MakeBooking receives a booking that contains information for a Global card, it will use the ProcessGlobal operation to check that the booking is acceptable, and after it has received that response, it will then send back its own response. 1.
Within the Logical View of Architecture School, we now need to add some extra dependency information to give ourselves a complete system model. First, the MakeBooking operation should have a dependency on each of the credit card processing operations. For example, to add a dependency from MakeBooking to ProcessMultinational, select the Add Dependency button from the toolbar, click the MakeBooking operation, and then click the ProcessMultinational operation. Page 33 of 127 © IBM Corporation 2001, 2013
36.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 2. Follow the same process to create dependencies from MakeBooking to ProcessWorldwide and ProcessGlobal. 3. Next, each of the credit card processing operations should have a dependency on the Vacation Booking database. Add a dependency from ProcessMultinational to the VBooking XA Datasource component in the same way, and then do the same for ProcessGlobal and ProcessWorldwide. 4.
Note that dependencies are only shown for items you have selected. However, the entire dependency tree will be seen using the default preferences. To see this, select MakeBooking; you will then notice that a lot of dependencies will be displayed, making the diagram difficult to read. 5. This is difficult to read, and will only get more difficult if we make the model of the system more complex, so we will change the preference settings to show a single level of dependencies. Go to Project > Preferences, and in the General panel, set Max dependencies shown to 1, then click OK. The diagram should then become easier to read. Page 34 of 127 © IBM Corporation 2001, 2013
37.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE Page 35 of 127 © IBM Corporation 2001, 2013
38.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 6 Managing recorded
messages 6.1 Introduction You have already used the Recording Studio to record messages from the system under test, and turn those into both tests and operations. In this module, you will see a few other things that you can do with recorded messages. You will start off by looking at how you can manage and filter the messages that you have recorded. You will also see a couple of other things that you can do with recorded messages: creating requirements and triggers. 6.2 Exercise: Recording events from an operation Now that we have a model of the Vacation Booking system, we can choose to record events for particular operations, rather than recording everything in the system. As we now have multiple sources of events, we can also choose to filter events by source. We will capture booking events again, but this time we will be recording events based on operations rather than transports. We will see how we can filter these events. Later, we will see how we can reuse these events to build other resources within Rational Integration Tester. 1. Return to the Recording Studio perspective and find the Event Monitors panel. This should currently show that we are monitoring the QM_vbooking transport. We will stop monitoring this for the moment, so select it and click the Delete Event Monitor button to remove the event monitor. 2. We will also clear the events we recorded in the previous exercise. To do this, click the Clear All Events button in the Events View toolbar. 3. Click the Add Event Monitor button; this will allow us to select an operation to record. Choose the MakeBooking operation we created in the previous module. Page 36 of 127 © IBM Corporation 2001, 2013
39.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 4. You will now be given the option to choose to record any of the dependencies of the MakeBooking operation at the same time. You should see that the QM_vbooking transport is available, as are the other three operations. This is because the default behaviour is to show only items that MakeBooking has a direct dependency on. Switch the radio button at the top of the dialog box from Direct Only to Indirect Only, and you should see the VBooking XA DataSource component become available, while the other dependencies are hidden; MakeBooking only has a dependency on VBooking XA DataSource through the other operations in the project, rather than having a direct connection to it. Finally, switch to Both, and you should see all recordable components that MakeBooking has a dependency upon. 5. Select the ProcessMultinational, ProcessGlobal, and ProcessWorldwide operations. Note that if other operations had dependencies on the MakeBooking operation, we could select those on the Parent References tab; as nothing depends on MakeBooking in our system, this will not be necessary. Click OK to continue. 6.
All four operations created in the previous exercise should now be listed in the Event Monitors panel. If any of them are not listed, return to step 2 and add any missing operations. 7. Click the Start Recording button. 8. Switch to your web browser and submit another booking request, using a Multinational credit card. Page 37 of 127 © IBM Corporation 2001, 2013
40.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 9. Return to Rational Integration Tester, where you should see four events recorded in the Events View: 2 each for MakeBooking and ProcessMultinational. 10. You can filter recorded events to show only those events that were recorded for a given event monitor by selecting the event monitor in the Event Monitors panel. For example, click the MakeBooking event monitor. You should now see just the MakeBooking events, with the events recorded for ProcessMultinational filtered out. 11.
Click in the empty space below the list of event monitors to clear the filter. You should see all four events again. 12. Record two new bookings, again using the Global and Worldwide options. You should now have 12 messages in total. 13. Again, you will be able to filter by source. Note that you can select multiple event monitors at the same time when filtering, to show messages from multiple operations. 14. We will save two of these example messages as requirements. With the first message for MakeBooking selected, click the Save icon on the Events View toolbar to open the Recorded Events Wizard. 15. Select the requirements option on the first screen, and click Next. 16. On the second screen, you will be asked how the data within the message should be stored. You choose either hardcoded values, or to use a data source. We will look at using data sources later in the course, so for now, choose Store data as hard coded values, and click Next. 17. Following this, Rational Integration Tester will confirm that the requirement is associated with the correct operation. As we have recorded from an operation, this should state MakeBooking as the operation. This is correct, so click Next again. 18. You will then see a Header Transformation screen. Click Next through this screen. 19. On the Summary screen, you will be asked to give the requirement a name. Call it exampleRequest. Clear the box labeled Open Resource After Finish, and click Finish to create the new requirement. 20. Do the same for the corresponding reply message, calling it exampleReply. Page 38 of 127 © IBM Corporation 2001, 2013
41.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 21. You can now switch to the Requirements Library to view the saved messages. 6.3 Advanced exercise: Creating and running triggers A trigger is used to send an event to the system under test. It can be used to explore how the system responds to an input; it does not perform any validation on the corresponding response. Triggers can be created manually, or from a previously recorded event. In our example, we will use an existing event. 1. In the Recording Studio perspective, select the Triggers tab, below the Event Monitors panel: 2.
In the Events View panel select the first recorded event (the request) and then click the Save triggers from selected events toolbar button. 3. Give the new trigger the name MakeBookingTrigger ; it will be created under the Components tree in the Triggers view. 4. If necessary, expand the tree to show the new trigger (expand each node, or click to expand all nodes). 5. Double‐click the TriggerMakeBooking trigger to edit it. 6. The Edit Trigger dialog box is displayed. Select the Value tab and update one of the fields (for example, change the flightNumber field) in the message body. Page 39 of 127 © IBM Corporation 2001, 2013
42.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 7. Click OK to save the change and close the dialog box. 8. Click Record in the Monitor View if it has been stopped. 9.
Run the trigger by right‐clicking it in the Triggers view, and selecting Run Trigger from the context menu. A new series of events will be recorded in the Monitor View. 10. To verify that the request contains the updated field, select the event and view the updated field in the message view below. 11. Stop the recording using the button. Do not clear the recorded messages as they will be used in the following exercises. Page 40 of 127 © IBM Corporation 2001, 2013
43.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 7 Creating tests
for Vacation Booking 7.1 Introduction In the Platform modules, you created two simple tests for the addNumbers service. In this module, you will create tests for the Vacation Booking system. You will see some new methods of creating tests: The first uses the Message Exchange Pattern (MEP), while the second makes use of templates. 7.2 The Tests using MEP wizard Previously, you used the Test using MEP wizard. This helped you build one of your first tests by providing the information required to send messages to the service, as well as providing the appropriate message structures. All of this information was taken from the MEP that you had created in the Logical View of Architecture School. There is a second wizard that also uses the MEP, which can be used to help with creating tests containing randomly‐generated data. In the previous example you saw, after the message structures had been generated, the actual contents of each field were left blank. The Tests using MEP wizard (note that it is labeled for a group of tests, rather than a single test) can be used to generate such tests. After the wizard has analyzed the message structure being used for the input message, you are given the option to state how many times any optional or repeating elements should occur within the input message. Previously, all elements only occurred once, or not at all if they were optional and you had chosen to leave out all optional elements. Here, you have much more control over each part of the message. Following that, you will be given the option of stating how the content of each element should be generated. You can choose to leave it completely random, supply a constant value, or have a value generated based on a regular expression that you supply. Note that any random values will be fixed to those values after the generation of the test; they will not be randomly generated with each execution of the test. Depending on the type of data in the field, you might also be provided with other options. In the training example, the most important of those options deals with fields that contain enumerated values. You will see an example of this in the credit card type, which can hold the value of Worldwide, Multinational, or Global. By default, the generation of data for this type is set to Iterate Enum, which means that a test will be generated for each value of this field, giving you three separate tests, each with their own data. If there were multiple enumerated fields, you would have the option to determine the coverage of the generated tests over the enumerated fields. You could either try to generate tests that covered each and every combination of any enumerated fields, or just to generate tests that covered all values of each enumerated field at least once, without taking combinations into account. As with the example you saw earlier, where you saw the wizard create a single test, Rational Integration Tester does not know what the values contained by the response message should be. As with that example, the Tests using MEP wizard will also leave any fields in the response message blank, to be edited by the user. Previously, you edited these fields. In this example, you will leave the response message for now, and later overwrite the message with data taken from the live system. Page 41 of 127 © IBM Corporation 2001, 2013
44.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 7.3 Regular expressions This module makes use of regular expressions during the use of the Tests using MEP wizard. This course assumes some familiarity with regular expressions, but in case you do not use regular expressions often, a table has been provided to explain the tokens that will be used in this module, and future modules. Token Matches ^ The start of the string. No characters can occur before this point. $ The end of the string. No characters can occur after this point . Any single character. [ ] Any single character contained within the brackets. w A single word character (a letter or number). d A single digit. * The preceding character 0 or more times. For example, d* means 0 or more digits. + The preceding character 1 or more times. For example, d+ means 1 or more digits. {n} The preceding character repeated n times. For example, d{3} means 3 digits. {m,n} The preceding character repeated, between m and n times. d{4,6} means a set of 4, 5, or 6 digits. There are more tokens available to use within the regular expressions used in Rational Integration Tester, but this table will cover the majority of tokens used within this training course. 7.4 Exercise: Creating tests with the MEP wizard 1.
In the Test Factory perspective, right‐click the Tests virtual folder under the MakeBooking operation and select New > Tests using MEP. A wizard is launched that will help you create multiple tests to validate all possibilities from the operation’s message exchange pattern (MEP). 2. The first page of the wizard lets you control the structure of the request messages that will be generated for each test. You can alter that structure by selecting how many occurrences of each element should be included. As the message schema we are using does not allow for any optional or repeating elements, every element should occur exactly once. This means that we can leave all settings at their defaults for this example. Page 42 of 127 © IBM Corporation 2001, 2013
45.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 3. Click Next, which brings you to the wizard’s second page. Here, you can control the contents of the message by selecting different content types for each element and values for those elements that do not have random content generated for them. 4. Notice that Iterate Enum is selected for the Payment:cardType element. This will prompt the wizard to generate a unique test for each type of credit card that the operation can process (three in this case), which can be verified in the next page of the wizard. Page 43 of 127 © IBM Corporation 2001, 2013
46.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 5. Instead of allowing completely random strings for all fields, we are going to edit some of them. Set the flightNumber field to a constant, with a value of VB100. 6. For the price and weekNumber fields, we will allow random values, but we will set some constraints. In both cases, we would like to have a two digit number. Set the Type for the field to Random Regex, and the Value to dd 7.
In the final screen of the wizard, go to the With Tests section, and select Do Nothing. Click Finish to close the wizard and generate the tests. Page 44 of 127 © IBM Corporation 2001, 2013
47.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 8. Take a look at what this wizard did. In the Test Factory perspective, look at the Tests virtual folder under the MakeBooking operation. The wizard created three new tests. 9. Double‐click to open one of these: paymentcardType = multinational 10.
Double‐click to look inside the Send Request action. 11. Here you see the request message that will be sent for this test of the MakeBooking operation. The wizard has created the message with the expected structure and populated most fields automatically with randomized values. The flightNumber field should be set to VB100, while the weekNumber and price fields should be set to random two digit numbers. Similarly, the cardType field should be populated with one of the three possible card types (a different one in each of the three generated tests) Page 45 of 127 © IBM Corporation 2001, 2013
48.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 12. Close this window without making changes. 13. Open the Receive Reply action. At this stage, Rational Integration Tester has not been provided with much information about the expected response from this request. The correct message schema has been applied to the response message, but nothing else has been done. It is possible for you to edit this message, but this will be handled later. For now, you can leave the message as‐is. Page 46 of 127 © IBM Corporation 2001, 2013
49.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 14. Close this window. 7.5 Copying and linking requirements So far, we have seen how we can create message data within a test by hand, or from random data. In addition to this, we can also use previously created requirements to fill in message data. In doing this, we can either copy the data that is held within the requirement, or link to the requirement. Copying the message data will overwrite the information in the test action; it can then be edited further as required, but any updates to the requirement will not be reflected inside the test. Linking to the requirement will also overwrite the data in the test action, but in this case, the test action will always use whatever data is held within the requirement. This means that updates to the requirement will flow through to the test action as well. To copy or link a requirement to a test action, simply drag the requirement onto the test action. You will then be presented with the option to copy or link the requirement into the test action. Note that this will copy or link all settings from the requirement, including transport settings. The only exception will be any timeout and tolerance values held within the test action, which can be edited separately. Alternatively, you can open the test action, and go to the Config tab. Above the transport and message settings on this tab, you will find two link icons. These can be used to link the header (including transport settings) and the message body. Using the two icons, we can choose what we want to link, rather than linking everything at the same time. From these icons, you can also choose to change a link to use a different requirement, or to unlink the message. Unlinking a message Page 47 of 127 © IBM Corporation 2001, 2013
50.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE means that the message will then hold a copy of whatever was in the requirement at the time; future updates will not flow through to the test action automatically. If desired, you can relink to the requirement later on. 7.6 Test templates When creating new tests, similar sequences of actions can be used. Rather than recreating these every time, Rational Integration Tester provides the option of test templates, which can be used to store those common sequences for fast reuse when creating new tests. These new tests will then have copies of the actions used within the template, which can be altered as required. Test templates can be created in similar ways to tests. They can be created without any test actions, in the same way an empty test can be created. It is also possible to create a template based on the MEP of an operation. This will be similar to creating a single test from the MEP; the template will contain messages based on the schemas used in the MEP, with each field left blank for the user to fill in. After creating the template, it can then be edited in exactly the same way as a test, using the same settings and test actions. Once the template has been saved, tests can then be created based on the template. This will copy all of the properties of the template into a brand new test. Note that this is simply a copy, and any further updates to the template after that time will not automatically flow through to the tests created from the template. However, if the template uses linked requirements, changes to the requirements will still flow through to each test, as long as the requirements are not unlinked in those individual tests. 7.7 Exercise: Creating a test from a template 1.
Test templates, like tests, are created for operations. Return to the MakeBooking operation in the Test Factory Tree. 2. Right‐click the operation and select New > Templates > Test Template using MEP. Call the template basicTemplate. 3. Your test template will look much like the other tests you have created, though if you look at the messages contained in the Send Request and Receive Reply steps, you will notice that they are empty. Again, you will use requirements to fill in the message contents here. Drag the exampleRequest requirement onto the Send Request step. 4. When asked, choose to Update this action with a copy of the requirement. 5. Carry out the same procedure again, dragging the exampleReply onto the Receive Reply step. 6. The messages in the template should now be populated with data. Save and close the template. 7. Let’s use the template to create a new test. Right‐click the MakeBooking operation, then select New > Tests > Test From Template. 8. Within the dialog box that opens, select the basicTemplate, and give your new test a name, such as exampleFromTemplate. Page 48 of 127 © IBM Corporation 2001, 2013
51.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 9. Open the new test, and take a look. It should contain the same actions and data as the test template. You can now edit this further; for example, you might change some of the data within the Send Request action. Once you are finished, Save and close the test. Page 49 of 127 © IBM Corporation 2001, 2013
52.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 8 Repairing tests 8.1
Introduction The first tests that you created for the addNumbers web service were very simple. They passed if the system was giving us the correct responses, which it was doing. However, this might not always be the case. Obviously, some tests will fail due to the system not responding, or responding incorrectly. In these cases, you might like to know some more detail; for example, which field or fields were incorrect? At other times, you might have generated tests that you would like to use as regression tests. In these cases, you might just generate the request message, and use the reply message from the system as the correct response. If you already have a reply message in your test, as you have in the example tests that you generated from the MEP, then you might need to replace or update this message. You might have come across this process in other tools. In some tools, you might know it by the term “healing”; in others, including Rational Integration Tester, this process is called repairing the test. In this module, you will first see how to examine the output of your tests, and then go into more detail by comparing the expected and received messages. You will then see how to repair a test step containing an incorrect message. Finally, you will see how you can apply these changes to multiple tests using a rule. 8.2 Exercise: Reviewing test results You will now run your tests and review the results. These tests will not pass at first, so you will also use the Message Differencing Window to get more information. 1. Switch to the Test Lab perspective. 2. Run the exampleFromTemplate test by right‐clicking on it and selecting Run from the context menu, or select the test and click Run in Rational Integration Tester’s main toolbar. In this case, the test should fail because the reservation number does not match what is expected. 3. Click the Receive Reply error in red on the Console. The View Message Differences window pops up to reveal the difference in the Expected and Received messages. In this case the newReservationNumber elements are different. Page 50 of 127 © IBM Corporation 2001, 2013
53.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 8.3 Exercise: Repairing tests The exampleFromTemplate test failed because it did not take into account the fact that the system will allocate a new reservation number for each new reservation. You will now see how you can fix the test from the Test Lab perspective. Note: Before starting this exercise, make sure that you have saved all changes in your tests in the Test Factory perspective. You will be updating and saving tests through the Test Lab in this exercise. Different sets of changes in each perspective will only cause confusion, and are best avoided. 1. The View Message Differences window gives us the opportunity to correct any discrepancies between the expected and received messages. In this case, we will try to update the message by clicking the Overwrite expected field button. 2.
Select the test and click Run in the Task Monitor to run the test again. 3. The test should fail again due to a reservation number mismatch. The reservation numbers increment with each reservation, so attempting to use a hard coded value will not work. 4. Bring up the View Message Differences window for this new run of the test. We will try to repair the test again, but this time, we will use the Replace with regex match button to use a regex that will allow any reservation number. Page 51 of 127 © IBM Corporation 2001, 2013
54.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 5. Close the Message Differencing window, choosing to Apply your changes. 6. Open up the test in the Test Factory perspective. 7.
Double‐click the Receive Reply step and note that the value of the message field element newReservationNumber has been replaced by a regular expression. Page 52 of 127 © IBM Corporation 2001, 2013
55.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 8. Re‐run the test in the Test Lab. 9. This time the test passes. 10.
Bring up the Message Differences window for this latest run of the exampleFromTemplate test. Note that the regex is now displayed as part of the expected message, allowing the received message to pass the test. Page 53 of 127 © IBM Corporation 2001, 2013
56.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 11. The tests generated using the MEP wizard will need to be handled differently, as they have no data describing what the expected message is to look like. To start, run the paymentcardType = global test. This will fail. 12. Bring up the Message Differences window. You will see that the expected message is missing some of the fields found in the received message. 13.
Therefore, instead of overwriting just a single field, choose Overwrite expected message. 14. If we run the test again, it will still fail. This time, it will be due to the reservation number not matching, as in the exampleFromTemplate test. We could repair the field in the same way Page 54 of 127 © IBM Corporation 2001, 2013
57.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE that we did previously, but we would need to do the same thing for each of the other tests as well. Instead, we will use the Rule Cache to apply repairs to multiple tests. 8.4 The Rule Cache Every time that you have validated any part of a message so far, that validation has only applied to that single message. Rational Integration Tester can also set up rules to apply validation settings across multiple messages. For example, you might realize that you will not always get back the same response for a particular field, no matter what message it appears in. In our system, an example of this is the reservation number returned after a booking. In each test, it should always appear in the form of A followed by 5 digits, as specified by the regular expression we used in the previous exercise. Because it does not matter what test this is in (we want the same regular expression used in all of our tests), it would be easier to set this validation setting so that it is applied to all tests that use the same message schema. This is exactly what a rule does for us. The easiest way to create a rule is by choosing to add your repairs to the rule cache as you repair your tests. This is what you will be doing in the following exercise. You can also choose to create rules from the Config tab of a messaging action (right‐click and choose Rule Cache > Add to Cache…). You can also create rules from the Rule Cache view of Architecture School, which provides an overview of all rules within your current project. If you explore the Rule Cache, you will also notice that rules can be set up for more than just validation; you can also specify rules for providing values, filtering values, or storing values into variables. Once a rule is being applied to a particular field within a schema, it should show up in both the test action within the Test Factory, and within the Message Differencing Window. A rule will be indicated by the star icon: . You might also want to disable a rule for a particular messaging action by right‐clicking on the appropriate line of the message in the Config tab, and selecting Rule Cache > Disable. If you do this, the rule icon will be modified to add a red line through it (
) to show that a rule is available, but that it has been switched off in this particular case to allow the user to set their own method of dealing with that particular field. 8.5 Exercise: Creating validation rules 1. Run the paymentcardType = global test again. As predicted, it should fail due to the reservation number. 2. Bring up the Message Differences window, and select the check box Add to Rule Cache. 3. Make sure that the reservation number field is selected, and click the Replace with Regex button 4. You will be asked to confirm that you want to apply this change as a rule. 5. After this, check that you are satisfied with the proposed regex, and carry out the changes as normal. Before leaving the Message Differences window, you will notice that a star has been placed next to both the expected and received fields. 6. Close the Message Differences window, and run the test again. It should now pass. Page 55 of 127 © IBM Corporation 2001, 2013
58.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 7. Switch to the Test Factory perspective, and open the paymentcardType = global test. 8. View the Receive Reply step of the test, making sure that you are looking at the Config tab of the dialog box. Here, we can see that the regular expression has been applied, as in the previous exercise; but in this case, there is a star next to the regular expression, letting us know that a rule exists. 9.
Return to the Test Lab and run the other two tests that we have not yet repaired. You will find that they both fail at first, as the expected message is incorrect. This can be fixed as in the previous exercise. Once you have done this, there will be no need to worry about the reservation numbers any more. The regular expression specified within the rule will be applied for you automatically. Page 56 of 127 © IBM Corporation 2001, 2013
59.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 9 Creating and
running a stub A stub can be used to simulate a system or process that is unavailable. In the example below, we will create a stub from the request/reply events that were recorded earlier. This stub can then be used to simulate the business process that is unavailable. 9.1 Exercise: Creating a stub from recorded events 1. Open the Recording Studio perspective and clear any previously recorded events from the Events View. 2. In the list of Event Monitors, choose to record the MakeBooking operation. 3. Make sure that recording is currently switched on. 4. Go to the Test Lab perspective to run the paymentcardType = worldwide test, then return to the Recording Studio. 5. Click MakeBooking in the Event Monitors to filter out any messages from other sources. 6. Select a request message and the corresponding reply message in the Events View. 7. Click the Save button. Select stubs on the first page of the wizard, and click Next. 8. On the second page of the wizard, we have the option of creating several different types of stub. As this stub will be pretty simple, we will choose to use the Store data as hard coded values option. Click Next once you have done this. 9. The next page of the wizard simply asks for verification that all events have been sorted by the correct operation. As we have already filtered messages by the MakeBooking operation, this should show two messages from that operation. If so, click Next. 10. On the following page, the messages have been grouped into transactions. As there is only a single pair of messages for the moment, these should both be listed as a single transaction. Click Next again. 11. Following this, you will see the Header Transformation page. This will remove information from the message headers that normally will not be relevant to your stub, such as the timestamp of the recorded messages. Leave all checkboxes ticked here, and click Next. 12. On the final page, you will be able to specify a name for the stub. Set this to SimpleBookingStub, and make sure that Open resource after finish is checked. 13. Click Finish to create the stub. Rational Integration Tester should then switch to the Test Factory perspective. 14. We can now take a look at the stub we have created. In the Events section, we have a list of the events that the stub will respond to. The stub we have created only knows how to respond to events for MakeBooking. Page 57 of 127 © IBM Corporation 2001, 2013
60.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 15. Below this, we can see the messages we recorded previously, in the Input and Output tabs. 16. By default, the stub will attempt to filter out anything that does not exactly match the default message that we received. In those cases, it will not send a response message; instead it will discard the request message. In this example, we would like to be less strict, and respond to anything. To get started, switch to the Input tab, and take a look at the message body. You will see that each text field has a small filter icon next to it: 17.
We want to switch off any filtering that is checking for an exact field match. To switch off filtering for the exact matches, select all of the fields within the message (you might need to scroll down to do this). With everything selected, right‐click to bring up the context menu, and then click Contents > Field Actions > Filter > Equality. This will toggle the equality checks off, and the message body should then be shown without the filter icons, like the following screen capture: Page 58 of 127 © IBM Corporation 2001, 2013
61.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 18. Switch to the Output tab, and take note of the reservation number that will be sent by the stub. You should see this again in the following exercise. 19. Save your stub; it is now ready to run. 9.2
Exercise: Executing a stub from Rational Integration Tester Now that you have created a simple stub and edited it, you can run that stub inside Rational Integration Tester. 1. Before we start using our stub, we will switch off the service in WebSphere Application Server, so we are certain that it is not processing any messages, but instead leaving them for the stub. To do this, open up your web browser, and follow the link in your bookmarks to the Websphere Integrated Solutions Console. When asked for login details, leave them blank, and click the Log In button. 2. In the left pane select Applications>Application Types>WebSphere Enterprise Applications. 3. The list of applications that we are using within WebSphere Application Server will then be shown on the right side. Check the box for vbooking.booking.app ; this handles booking requests for us. 4. Above the list of applications, there is a Stop button. You can now click this to stop the booking application; note that this will take a moment. You should then see that the application has stopped successfully. Page 59 of 127 © IBM Corporation 2001, 2013
62.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE 5. Return to Rational Integration Tester, and switch to the Test Lab perspective. 6. You will still see your stub in the tree on the left of the screen. Run the stub, either by double‐clicking on it, or by selecting it and clicking the Run button. 7.
The stub will then be displayed in the Task Monitor. Some initial details will be shown below in the Console. This will be updated later on, as the stub receives incoming messages, and responds to them. 8. As it stands, the stub will now wait until it receives some input, so we will provide something for it to work with. Return to your web browser, and make a new booking. 9. In the Test Lab of Rational Integration Tester, take a look at the console output for your stub. You should now see that the stub has received a message, and sent a reply. 10. If you make another booking in your web browser, you should see that you are receiving the same booking number every time. As we turned off the filtering of messages within the stub, it should not make any difference what booking request we send to the stub; all messages will receive the same response. It would be possible to create a more complex stub which generated new reservation numbers for each booking. This would require use of more complex actions within the stub. Note that this might or might not be necessary, depending on what you intend to do with the stub. If all you require to Page 60 of 127 © IBM Corporation 2001, 2013
63.
IBM RATIONAL INTEGRATION TESTER TESTING TRAINING GUIDE get back from the stub is a reservation number – any reservation number – then there might not be any point in developing the stub further. If you require more complex behavior, then you will want to continue developing the stub. Page 61 of 127 © IBM Corporation 2001, 2013