UrbanCode is Application Release Software from IBM that enables organisations to release more software faster. Green Hat is software from IBM that enables organisations to virtualize services and systems which are for example unavailable or expensive to provision. This is often referred to as 'Service Virtualization' or Application/Component Virtualization.
The benefits of using UrbanCode and Green Hat together are:
- Capture defects earlier in the development lifecycle and reduce errors in the software release and deployment process
- Improve productivity with push-button deployment for developer and operations teams
- Faster time-to-market: with the ability to test more frequently you'll be able to find and fix defects earlier and automate your release and deployment practices to ensure you can meet your customer and business requirements
- Compliance and auditability: provide a platform to enforce security and traceability
- Environment cost and management: With the ability to virtualize services you're able to dramatically reduce your environment footprint and costs with environments such as; UAT, SIT, test and pre-production.
You can use IBM® Rational® Test Workbench (aka Green Hat) to automate functional, integration, and performance tests of applications. In IBM UrbanCode Deploy, the plugin that includes process steps for Rational Test Workbench and associated applications is known as the Green Hat plugin.
Green Hat PlugIn
You can use the Green Hat plugin to work with environments, stubs, scenarios, and tests in Rational Test Workbench, IBM Rational Integration Tester, and IBM Rational Test Control Panel. Specifically, you can use the Green Hat plugin to create virtual services that model services that your application depends on. You can virtualize services such as HTTP web services, Java Database Connector (JDBC) connected databases, MQ and Message Broker messaging topics and queues, and CICS® resources. You can also use the Green Hat plugin to run integration tests in Rational Integration Tester.
To use this plugin, you must have an installation of Rational Test Workbench. Find out more about that here.
This plugin supports Rational Test Workbench v8.5 or later. The steps in this plugin run on any agents that are supported by both the IBM UrbanCode Deploy and the Rational Test Control Panel Ant client, except for agents on z/OS.
No special steps are required for installation. See Installing plug-ins in UrbanCode Deploy.
Example: Virtualizing services in a component process
The following component process creates and updates an environment in IBM® Rational® Test Control Panel and then runs an integration test in IBM Rational Integration Tester.
You can use a similar process as part of an overall scenario that includes virtualized services. This process assumes that the application binary files are in the component. It also assumes that the environment contains an installation of Rational Integration Tester. The process runs the following steps in order:
- The Create Transient Environment step uses a base environment stored in Rational Test Control Panel to create a transient environment.
- The Update Transient Environment step updates the host name tag in the transient environment to correspond to the host where the environment is deployed, which could be in the cloud.
- The Start Stub step initiates the virtualized service.
- The Run Integration Tests step runs tests on the agent.
- The Stop Stub step shuts down the virtualized service.
The Delete Transient Environment step deletes the transient environment.
The Delete Transient Environment step deletes the transient environment.
Example: Virtualizing services with Rational Test Workbench
The following example describes a scenario that includes a component process that uses virtualized services. In this example, an application in IBM® UrbanCode Deploy comprises two components. One component is the user interface for a web application running on an application server. The second component is a virtual representation of a web service.
Before you begin
You must install IBM Rational® Test Workbench, including IBM Rational Test Control Panel and IBM Rational Integration Tester. To learn more about Rational Test Workbench, see the Rational Test Workbench information center.
About this task
To virtualize the web service, you can use the Green Hat plug-in to create a transient environment that mimics the behavior of the actual web service. The user interface component is deployed as any other component to a node where the IBM UrbanCode Deploy agent is installed, either on a specific host or on the cloud. When the application server is configured on the user interface component, the proxy is installed so that HTTP calls are routed to the IBM Rational Test Control Panel server, which then returns the data from the stub.
- Use IBM Rational Test Control Panel to record and publish the virtual services that you want to emulate. These virtual services are also known as stubs. When you create the stubs, add environment tags to replace the recorded data with dynamic data, such as the host name. To learn more about stubs, see Stubs in the Rational Test Workbench information center.
- In IBM UrbanCode Deploy, create an application with two components, one for the user interface component and one for the virtualized service. To learn more about creating applications, see Applications.
- Create a component process to install the user interface component. The following steps show an example set of process steps for an application running on Tomcat.
- Install Tomcat Use the Tomcat plug-in to install the application server.
- Download Artifacts Use a source control plug-in such as the UrbanCode Versioned File Storage plug-in to download the user interface application.
- Unzip Use the File Utils plug-in to extract the user interface application.
- Modify Tomcat Artifacts Use the Tomcat plug-in to update the WSDL host name that the user interface application uses for calls to web services.
- Update Config File Use the Tomcat plug-in to add the proxy information for IBM Rational Test Control Panel to the tomcat6 configuration file. For Tomcat, you change the JAVA_OPTS properties for http.proxyHost and http.proxyPort to point to the host name and port number of the IBM Rational Test Control Panel proxy.
- Start Tomcat Use the Tomcat plug-in to start the application server.
- Create a component process to deploy the virtualized service and to run integration tests. The following steps show an example set of process steps.
- Create Transient Environment Use a base environment that you have created in IBM Rational Test Control Panel to create a transient environment. The transient environment is used to start the stub with dynamic property values.Update Transient Environment Update the environment with properties specific to the deployment environment.
- Start Stub. Start the virtualized service in the transient environment.
- Run Integration Tests When the application process runs, at this point the user interface component is deployed and the virtual services are running. You can run tests using any test software that is available on the agent. In this example, you run tests in IBM Rational Integration Tester.
- Stop Stub Shut down the virtualized service.
- Delete Transient Environment Delete the transient environment.
- Results When you run the application process, the user interface component is deployed and then the virtual services component is deployed. After integration tests run, the virtual services are shut down.
We're working on a DevOps Toolchain map to show you how all these pieces work together - watch this space. Have you tried integrating your release management and testing tools yet?