Automated Testing - Group home

DevOps for z using Rational Development and Test Environment for z Systems (RD&T): Video Series – Part 4

  
In the final part of this video series, a new enhancement request has been implemented and is included in the latest integration build. It is now packaged and ready for deployment and unit/function testing on an RD&T environment running CICS.

In this video Urban Code Deploy (UCD) and Rational Developer for z Systems (RDz) Host Utilities will be used to:

    • deploy a package to RD&T in a running CICS region

    • perform quality analysis on the deployment (zUnit & Code Coverage)

    • mark the deployment with status indicators, which describe the rate of passing zUnit test cases and the amount of code coverage on the deployment



Review Items

If you missed part one of this video series, it will help to review DevOps for z using Rational Development and Test Environment for z Systems (RD&T): Video Series – Part 1 and the first video Better DevOps on IBMz with Rational Development and Test Environment for z Systems (RD&T) - Part 1 which shows priming an RD&T environment from an existing mainframe environment using UCD.

If you missed part two of this video series, it will help to review DevOps for z using Rational Development and Test Environment for z Systems (RD&T): Video Series – Part 2 and the second video DevOps for IBMz with Rational Development & Test Environment (RD&T) - Part 2 which shows a developer implementing a development change set based on an enhancement request. The developer uses RDz + RTC to check out code, implement a change set, compile to RD&T, and run a debug session on the change code. This video uses items that were introduced in part two and it will help to review the zUnit, code coverage, and Integrating RDz Quality Analysis with RTC Builds sections.

If you missed part three of this video series, it will help to review DevOps for z using Rational Development and Test Environment for z Systems (RD&T): Video Series - Part 3 and the third video DevOps for IBMz with Rational Development & Test Environment (RD&T) - Part 3 which shows the integration build that includes the new change set and the creation of the Urban Code Deploy package.

The Deployment process with zUnit + Code Coverage

Using Urban Code Deploy this is what the deployment process looks like:

Rick_Blog_UCD_Process

While, this diagram seems pretty complex, it is very similar to the ANT script used in part two. The deployment process works like this:

    • The load modules from the UCD package are copied to the CICS datasets and the CICS region is refreshed to load these new modules.

    • At the same time debug daemons are being started to collect code coverage results when the zUnit is being executed.

    • Once the CICS refreshed and the debug daemons are ready, zUnit is executed on the application.

    • Once the unit tests are done, there are scripts that analyze the results of zUnit and Code Coverage. Then the scripts mark the deployment with status indicators.

    • Finally some cleanup work is performed.



Status Indicators

For this demo there are two sets of status indicators used, one for zUnit (pass/fail) status and one for Code Coverage (pass, warning, and fail) status. Here is what those status indicators look like in UCD, and the criteria used for each.

Rick_Blog_Status_Flags

Once a deployment is marked with a status, you can use that as Environment Gate in UCD. An Environment Gate is a requirement that must be met before a UCD component can be deployed to an environment.

So in this demo scenario these status indicators can give initial feedback on whether or not the code appears to be ready for the next testing environment beyond the Unit/Function test environment on RD&T¹. While this probably should not be used as all-inclusive criteria, this could be used as a minimalist indicator on the status of the code.

For more information on version statuses, please visit the UCD Knowledge Center:
https://www.ibm.com/support/knowledgecenter/SS4GSP_6.1.1/com.ibm.udeploy.doc/topics/comp_version_status.html

For more information on environment gates, please visit the UCD Knowledge Center:
https://www.ibm.com/support/knowledgecenter/SS4GSP_6.1.1/com.ibm.udeploy.doc/topics/app_gate.html

¹ Note: The load module or object code compiled on RD&T cannot be promoted to production. The production build must occur on z System hardware.

Video Series

The final installment of this video series will show deploying a package for unit/function test with UCD using automated zUnit + code coverage analysis. Please view the video here.

To recap here is the 4 part video series, on "How to do DevOps for z using Rational Development and Test Environment for z Systems (RD&T)", that was featured in my InterConnect presentation "Continuous Integration and Deployment on Rational Development and Test Environment for z Systems".


    • Part 1 of this video series shows priming an RD&T environment from an existing mainframe environment using UCD. This will set up the environment to allow for our development scenario.


    • Part 2 of this video series shows a developer implementing a development change set based on an enhancement request. The developer will use RDz + RTC to check out code, implement a change set, compile to RD&T, and run a debug session on the changed code.


    • Part 3 of this video series shows an integration build with zUnit + Code Coverage, thus showing how a team build or an automated build will be run to pick up new change sets. Once this build is successfully run, an UCD package is created setting up for the next phase, deploying for unit/function test.


    • Part 4 of this video series shows deploying a package for unit/function test with UCD using automated zUnit + code coverage analysis.