Upload
nickolas-watson
View
215
Download
0
Embed Size (px)
Citation preview
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Integration Quality Assurance – WmUnit
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Issues with Integration Projects
• Resources• Changing requirements• Platform upgrading• Re-deployment• Partner integration and testing
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Issues with Resources
• Too often, key individuals play an important role in a project and do not hand over enough knowledge
• After key resources move on, integration code needs to be maintained
• Deployment staff whom do not write code, need to have confidence code they are supporting works
• Project Managers need to have confidence when working with external consultants
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Issues with Upgrading
• webMethods, like all integration vendors, upgrades the version of their platform every 12-18 months. Falling too far behind means unsupported code.
• Why isn’t upgrading easy? How do you currently control your upgrades? Can you immediately and accurately determine if your code works on a new platform, or do you require expensive external assistance?
• How will the next JVM upgrade affect your project?• Upgrading should not be guesswork
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Issues with Re-deployment
• If an integration project is successful and needs to be rolled out and scaled to meet business demand, how easy is it for the system administrators to reconfigure it with confidence?
• When moving between platforms, how thorough are your integration projects tested?
• When new features are added, how can you tell that nothing has been accidentally broken?
• How do we add new trading partners without spending too much time ‘hand holding’?
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
A Controlled Integration Strategy
• The cornerstone to any successful integration strategy/competency centre is control
• What is control?– Controlling standards & best practices (GEAR,
CCDM)– Controlling technology (Using open standards)– Controlling quality (Strong, Robust & Visible
testing techniques)
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
A Controlled Approach
• Each project we deliver is a product• Integration projects should endure
the same test techniques as any other product
• Prevention is better than a cure• WmUnit is the cornerstone of the
development and deployment cycles of a project
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Focus on integration quality: Testing
• Significantly reduce the risk of change by introducing a testing regime
• Relate specifications to code via tests• Develop trust in your code by creation of
automated tests• Support the later maintenance effort by
providing a base of automated tests
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Goals of WmUnit
• Make testing on the webMethods platform:– Easier (no cumbersome custom developed test
harnesses)– Faster (leave developers in a familiar area)– Allow the inclusion of existing test harness code
with minimal alteration– In container testing rather than external HTTP
tools– Provide a level of reporting on the status of test
cases success/failure
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Writing a WmUnit test case
• Uses familiar programming constructs– Creating a service– Selecting a service specification – Setting of inputs/expected outputs in a
map step or via restore pipeline from file
– Invoking service to test and utility “assert” services
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
From scratch - step 1
• Create a service– Mirror directory
structure of package to be tested
– Name should be descriptive of the type of test
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
From scratch - step 2
• Set service specification to TestCase
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
From scratch - step 3
• Include test case description (optional)
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
From scratch - step 4
• Input/Expected output(s)
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
From scratch - step 5
• Invoke service to test, map output, cleanup
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
From scratch - step 6
• Invoke one of the utility assert services
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
From scratch - step 7
• Can map error message (optional)
%wmTestResult/isValid%=="false"
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Running by hand
• Can run individually by hand with the developer– Test cases are just services after all
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Running the test package using WmUnit
• Using http://servername:port/WmUnit
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
2 Steps to creating more tests
• Copy the service, rename
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
2 Steps to creating more tests
• Update the values in the first map step
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Complementary tools
• WmUnit can be complimented by the following tools:– JMeter and Pure test
• For hooking into WmUnit to create load testing
– JUnit• For included jarred up code, pure java (non-
webMethods code)
– Other out of container test harnesses• For invoking as part of a batch script or command
line load test
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
• WmUnit provides test runner which is externally invokable and generally a much nicer way to group together test logic– Set of end to end tests– Sets of mapping specification tests– Developer unit tests
Complementary tools
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Why WmUnit?• Less cumbersome than writing:
– Java code– Jmeter, puretest scripts (or HTTP Unit type code)
• In container– All Integration Server functionality available
• Tailored to WebMethods– Assert services to make life easier– Write in flow, java, c/c++ etc
• Existing solution– No need to waste resources on writing a test engine
• Can use existing test harnesses that developers have written• Runnable in developer individually if desired• No chatty network calls required• Invoked via web interface• Can be used for end to end, stress testing and down to low level
unit testing
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Managing your integration quality
• WmUnit allows history of results to be kept– Allows viewing of project test case
growth– success/failure ratio to be examined– Number of test runs performed during
development
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Test History Over time
• Typical project– Overall umber of
tests increase over time
– Change may break existing tests
– Should be mostly green (existing tests)
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Test History Over time
• Also a typical scenario:– Set of
acceptance criteria
– Specifications are met
– Test first development
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
WmUnit Patterns
• Standard unit testing patterns for WmUnit– Problem, description, solution, sample
implementation– Common testing solutions that appear
again and again
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
WmUnit Pattern Catalogue
• Catalogue online:http://www.customware.net/repository/
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Demonstration
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
For Further Information
• Product homepagehttp://www.customware.net/wmunit
• Documentation repositoryhttp://www.customware.net/
repository
CustomWare Asia Pacific Pty Ltd 2001-2004. All Rights Reserved
Questions