Whether you're looking for a way to manage multiple parallel development efforts, or are simply looking for a way to automate management and tracking of your test assets, IBM® Rational® ClearCase® can help. In this article, we will look at several different strategies for managing test assets. Once we have discussed some of the pros and cons of the different methods for managing test assets, we will look at how to implement some of them using ClearCase. This article is intended for readers who are comfortable using the Rational testing tools and have a basic familiarity with ClearCase, but who may have never implemented configuration management (CM) for test assets.
Before we jump into implementation examples, we will review some basic configuration management concepts. After that, we will compare different strategies for setting up a CM environment for test artifacts, and we will provide implementation examples. Finally, we will provide a list of resources that you can use to get more information on this topic.
We have tried to organize the information in this article so that you can quickly skip to sections most appropriate to your knowledge level. If we don't cover a specific topic in detail, we try to point you to a resource that will.
A test asset is any artifact that is developed by the testing or QA teams. In the IBM® Rational Unified Process® (RUP®), this includes the following artifacts (grouped by roles in RUP):
In more practical terms, a test asset refers to any artifact that you can access via the Test Asset Workspace in Rational TestManager, or that you can access in some other way via one of the Rational Software Quality tools:
|
| Test Asset Workspace in Rational TestManager |
In this article, we will discuss how to manage all assets that exist in the Rational test datastore for your project. If you have test assets that exist outside of that repository, either you will need to modify the instructions given in this article to accommodate them, or you will need to relocate them to a location within the test datastore. When looking at examples of how to work with test assets within a CM environment, we will consider test scripts, test plans, manual test cases, datapools, and log files.
What is configuration management?
So, what's configuration and change management, and how can you leverage it to support your testing effort?
Configuration and Change Management, in the simplest of terms, is managing who changes which development assets, when they change them, and why they change them. In addition, configuration management provides support for tracking versions of artifacts, establishing, and reproducing product baselines, support for parallel and multi-geographic development.
Every project has a configuration management process and environment, although it may not be practical, documented, or repeatable. A "good" configuration management process accomplishes the following goals:
- Establishes a stable environment for software development, providing team members with private workspaces in which to write and test their code, and enable them to introduce their changes into the team environment when they are ready.
- Defines and enforces project policies, i.e., who is authorized to make changes to artifacts.
- Records an audit trail of who changes what artifacts, when they change them, and why they change them.
- Scales as the development team grows.
- Supports heterogeneous, geographically distributed (i.e., offshore or outsourced) parallel development.
- Increases team productivity, leading to an accelerated development cycle.
- Ensures development of a high quality product.
One of the biggest challenges facing software development teams today is the lack of a well-defined, repeatable, and practical configuration management process. Our experience has been that omitting any of the above items from a team's development environment can cause a development effort to deteriorate into chaos. The larger the development effort, the larger the negative impact to the project's schedule and cost, ultimately resulting in a slower time to market and a decrease in the quality of the product being developed.
Unified Change Management (UCM)
The Rational Unified Process defines UCM as "Rational Software's approach to managing change in software system development, from requirements to release. UCM spans the development life cycle, defining how to manage change to requirements, design models, documentation, components, test cases, and source code."
The tools supporting the UCM environment within the Rational SDP are ClearCase and IBM® Rational® ClearQuest®. ClearCase provides a secure repository for storing project artifacts. It supports parallel development. It manages all artifacts in the development process, from design models and code to test to the artifacts that are changed because of performing these activities. In addition, it provides traceability support for relating activities that occur during of the development effort, such as fixing a bug or implementing an enhancement request. ClearQuest provides defect and change tracking as well as reporting capabilities that enable everyone on the software team to be informed of real-time project status at any point in the development lifecycle.
In this article, we will set up a project using ClearCase with UCM. To do this, we will use the following tools:
- ClearCase Administration Console -- Administrative tools for Versioned Object Bases (VOBs), i.e., the secure repositories in which you will store your versioned assets; Views, ClearCase log files, and scheduled jobs.
- ClearCase Project Explorer -- Tool in which you will create, manage, work on, and view information about UCM projects.
- ClearCase Explorer -- Tool that provides transparent access to files and directories under source control, and from which you can issue ClearCase commands.
- Rational Administrator -- Tool to establish and manage traceability between artifacts created by the Rational toolset, such as IBM® Rational® RequisitePro® databases, Rational Test datastores, ClearQuest databases, and IBM® Rational® Rose® visual models.
You can find more information about these tools by following the links in the Resources section at the end of this article.
Developing software using ClearQuest-enabled UCM, is beyond the scope of this article. For more information on this topic, please refer to:
IBM Rational ClearCase -- Developing Software, v2003.06.00 and Later (Windows)
ftp://ftp.software.ibm.com/software/rational/docs/v2003/cc_family/cclt_pdf/ucm_dev.win.pdf
The following steps were tested with Rational® ClearCase LT® v2003 and Rational® Suite Enterprise v2003, running Microsoft® Windows XP Professional and Microsoft® Windows 2000. We assume that you have installed the tools and that you have completed the initial tool configuration.
The first step will be to set up our ClearCase environment. Once complete, we will set up our Rational project by creating our test datastores and baselining our test assets. This section provides step-by-step instructions on how to configure our ClearCase environment and our Rational project.
However, before we begin, let us introduce a few key concepts.
ClearCase stores artifacts under version control in a secure repository called a Versioned Object Base (VOB). The VOB stores a given artifact's source code, which could be either a binary or text (ASCII) file, in a data pool called a source pool. For text files, ClearCase stores the differences (or deltas) between versions of the file, in separate data containers. ClearCase also maintains a cache of the latest version of each text file, in a pool called the cleartext pool. A vast majority of the time, these storage pools are transparent to the end user.
ClearCase Administration Console
- Start the ClearCase Administrative Console by going to All Programs > ... etc.
- Select the VOBs icon from the tree displayed in the console.
- Create a new VOB by selecting "Action > New > VOB" from the menu. This opens the VOB creation wizard.
- From this page of the VOB Creation Wizard, enter the name for the new VOB, test_assets, and click Next.
Note: VOB names must be unique.
- During this step, we accept the default of "Allow this VOB to contain multiple components." Then click Finish. ClearCase then creates the VOB.
- Review the information in the confirmation dialog and click OK.
- Next appears the "Creating VOB" confirmation dialog. Click Close.
- Close the ClearCase Administration Console.
Next, we will use ClearCase Explorer to create the view ClearCase will use to create our test assets component for our project. Before we do that, however, we will explain the concept of a ClearCase view and UCM stream.
As discussed in the previous section, a VOB stores versions of controlled artifacts. A stream keeps track of ClearCase activities (i.e., events or actions that cause changes to be made to versioned artifacts). Streams enable multiple users to access and create baselines of activities associated with the stream. A view is a specific configuration of a stream, which specifies which version of each file element should appear to a given user. A user can create multiple views in order to see different items within the VOB. In ClearCase, views may be either dynamic (which live on the ClearCase server through a mapped network drive) or snapshot (which reside on the client's local machine). Dynamic views automatically update, transparently and immediately allowing users to see changes made to a given artifact. While snapshot views require that, the user copy items to be edited locally, then copy them back to the view later and refresh However, in this example we use ClearCase LT, which supports only snapshot views.
- Open ClearCase Explorer.
- From the Browser Pane, select the "Base ClearCase" page.
- Next, select the "Create View" icon from the "Base ClearCase" page. This opens the "View Creation" wizard.
- For the "Choose a Project" step, select "No" and click Next.
- For the "Choose Location for a Snapshot View" step, accept the default path for the view and click Finish.
- Review the confirmation dialog and click OK. This brings up the "Choose Elements to Load" dialog.
- Select "test_assets" from the Available Elements list and add it to the Selected Elements list. Click OK.
- Rational ClearCase creates the view and displays the "View Creation Status" dialog. Click OK.
- You should now see the new view in the Browser Pane with the root of the VOB visible in the Folder Pane
We will step away from ClearCase Explorer for now; we will revisit it later to create our Integration View, so we can deliver our work and make it available to the rest of the team.
- Open ClearCase Project Explorer, and expand the Projects folder in the Explorer tree.
- Next, right click the Components folder in the Explorer tree and select "New > Component in a VOB..." This will open the "Create a Component in a VOB" dialog.
- Select the "test_assets" VOB from the VOB list, and enter "test_assets" as the name of the new component. Then enter "test_assets" as the name for the Root Directory. Click OK.
- ClearCase then displays the "Choose a View" dialog.
- Select the view we created in the ClearCase Explorer, in this example "Administrator_view." Click OK.
- We now see the new component, test_assets, in the list of components in the VOB.
The next step is to create a UCM project. The UCM project will store information about our project such as component configurations, project baselines, and streams and their associated views.
- In ClearCase Project Explorer, right click the Projects folder in the Explorer tree and select "New > Project..." This brings up the "New Project" wizard.
- Enter the project name and description as shown below, and click Next.
- In step 2 of the "New Project" wizard, select No, and click Next.
- In step 3 of the "New Project" wizard, click Add. This brings up the "Add Baseline" dialog.
- Select the "test_assets" component. Click "Change >>" and choose "All Streams" for the "From Stream" field. Click OK.
- You should now see the "test_assets" component in the "Make the following components modifiable" list. Click Next.
- Check the "test_assets" component to make the component modifiable. This allows us to make changes to the component, such as adding new files or creating new versions. Click Next.
- For Step 5, accept the defaults and click Finish.
- Review the confirmation dialog and click OK.
- Rational ClearCase creates the new project and the integration stream, as shown below.
- Close ClearCase Project Explorer.
ClearCase Explorer -- revisited
The next thing we need to do is create a view, corresponding to the stream that we've just created. If you already are familiar with UCM, then you will need to forget what you know about how to set up views on the client machine.
In this example, we will be setting up a shared view for multiple users to access. For the uninitiated, this means we will be setting the location where all of the users (in this case, testers) will get their data. In addition to being a centralized location for the project data, this view will be used by the Rational Administrator when setting up the Rational Project and test datastores. This view should be at a location accessible by all users who require access to the test assets. The project's technical lead, who is responsible for baselining the project assets, should create this view.
To create the view:
- Switch back to ClearCase Explorer.
- Select the "Toolbox" tab from the browser pane, and then select the "Base ClearCase" page.
- Next, select the "Create View" icon. This will again open the "View Creation" wizard.
- Select "Yes" for "Will this view be used for working on one of the Projects described in the ClearCase project tree?" select SampleProject from the list of projects, and click Next.
- Uncheck the "Create a development stream" check box. A development stream allows parallel development for a controlled artifact; the Rational Testing tools, however, do not support parallel development at this time. Click Next.
- In the final two steps of the wizard, accept the default information and click Next.
- After you click Finish on "Choose Components," review the confirmation dialog and select OK.
- ClearCase then creates the view for the integration stream. Click OK on the confirmation dialog.
- Close ClearCase Explorer.
During this step, we will configure the test datastore and manage the testing assets with UCM. In our example, we are creating the project in a local drive; however, in your environment; you will probably create the project on a shared network drive.
- Open Rational Administrator.
- Right click on Projects and select "New Project..." This opens the "New Project" wizard.
- On the first tab of the "New Project" wizard, enter the project information and check the "Use ClearCase and Unified Change Management to baseline project assets" check box. Note that it needs to be a snapshot view.
- Click Next. This opens a warning/confirmation dialog reminding you about shared drives.
- Click OK. This opens the "Project UCM Policies" step for the "New Project" wizard.
- Uncheck the "Version Control Requirements Assets" check box and select the "Version Control Test Assets" check box. In the "Associated UCM Project" list box, select the SampleProject project we created earlier. Click Next.
- This opens the "Security" dialog. If you are a fan of security, which we are not, you could enter passwords here. However, since we are trusting fools we will leave this screen blank and click Next.
- Review the "Summary" dialog, ensure the "Configure Project Now" check box is selected, and click Finish.
- This will open the "Configure Project" window.
- Select the "Create..." button to associate a test datastore with the project. This will open the "Create Test Datastore" wizard.
- In this example, we will be using Microsoft Access® for our database; however, in your environment you will most likely use the SQL Anywhere database. Click Next.
- This will take us to step two of the wizard, where we will set the datastore path. Where it displays "<Directory in ClearCase view>" in the path, we will need to browse to the location where we created the view to the integration stream. In our example, we used the default settings, which created the stream under Documents and Settings. Note: in your environment, be sure you append "\TestDatastore" to the end of the path you enter, or you will get an error that won't allow you to continue to the next step.
- Click Next. This will bring up the initialization step for the project. If you have data from existing projects, you want to use, you can enter it here; or, you can simply click Next.
- In the final step, review the attributes for the datastore and click Finish.
- Rational Administrator will create the datastore for you (note: this may take some time). In addition to creating a test datastore, Rational Administrator is adding the files to source control through the view. When it is finished, it will check out all of the files in the datastore.
- When this process is complete, you will receive a confirmation dialog.
- Click OK on the "Configure Project" window.
- Close Rational Administrator.
You now have CM in place for test assets.
Managing test assets in a CM environment
At a high level, testing assets in the Rational Software Quality solution do not currently support parallel development using UCM. What this means to the end user (i.e., the tester using the Rational solution) is that there is no difference between using a project under configuration management control and one outside of configuration management control. The tool will not behave differently, and there will be no additional workflows for testers. This will come as surprise to you if you expected that your testers would have to perform check-ins and check-outs, just as their development counterparts do. Because there are no UCM-enabled parallel development capabilities, all test assets in the project are always checked out. This means that the only time you have to do a check-in, is to make a baseline.
When would I want to make a baseline? Either at the end of a stable iteration, or before a major new development effort gets underway within the test datastore. The next series of steps show how to check in all of the test assets, create a new baseline, and then check out all of the assets again. Your project's Rational Administrator or technical lead should perform this activity.
As part of checking in the test assets, we will need to create an activity for the check in. An activity is a development task associated with a stream, in our case, with the ClearCase project's integration stream. During the check-in process, an activity records a change set, which is a list of associated versions of files changed because of performing the activity. When we check-in the test assets, we need to create an activity with which to associate them. The new files created since the last check-in, as well as any existing files that have been modified, will be associated with this activity, and will be recorded in the activity's change set.
- Make sure that NO ONE is using the testing assets. In order to check in the test assets, Rational Administrator will need to have exclusive access to all of the test asset files. If someone is using a file, that file will not be checked in and cannot be included in our baseline.
- Open Project Administrator.
- Right click on the project and select "Configure..."
- On the Configure Project window, select "Check In All..." This will open the following confirmation dialog.
- Select Yes. This will open the "Check In All Test Assets" dialog.
- Enter a description for your activity (described above) and click OK.
- This will open the Check In dialog, which could run for a long time, depending on the size of your project.
- Once it completes you will get the following dialog:
- All new test assets have been added to version control. Any modified test assets have been checked in. And all test assets have again been checked out for testers to begin working again.
- Open ClearCase Project Explorer.
- In the Project Explorer tree, navigate to the integration stream for your project. In our example, this is the SampleProject_Integration stream.
- Right-click on the stream and select "Make Baseline..."
- This will open the "Make Baseline" dialog.
- On the "General" tab, enter the name for the baseline (something simple - in our example, we call the baseline "SampleProject_Iteration1") and a description for the baseline.
- On the "Activities" tab, select the activities you wish to include in the baseline. Notice the activity that we created in the last step is listed here.
- Click OK. You will get the following warning:
- This warning is telling you that a version of each test asset file is currently checked out. If you create a baseline at this point, changes made to your test assets since the last checkin will not be part of this baseline. Again, as this is not a typical UCM environment, you will always have files checked out. As long as you are sure that all of your changes were checked in, click OK.
- ClearCase will create a baseline, and pop up a dialog when finished.
The following items are useful in helping guide you through using ClearCase and UCM with your testing assets.
When implementing UCM with test assets, we have encountered errors when attempting to check-in files that exceed 1MB in size. This can be a problem when checking in verification points, log files, or any Microsoft Word® documents that reside in the test datastore. To work around this limitation, ensure that you store any test documentation in a repository outside of the test datastore in a location that may also be under version control within ClearCase, e.g., within RequisitePro. In addition, minimize the use of graphics-based verification points that may dramatically increase the size of the associated files.
When to check-in all test assets
Performing the check-in of all test assets, as we discussed previously, requires all users to stop working with the test assets during the check-in process. This process could take a considerable amount of time to complete. It is best to perform this activity at a time that will cause minimal disruption to your team's work activities.
Microsoft Windows path length limitation
Currently, the Microsoft Windows operating systems, including Windows 95, 98, NT and 2000, have a path limitation of 255 characters. Windows will fail to create files with a specified path that exceeds this length. Be mindful when naming components and streams, so as to avoid this pitfall. We suggest defining an appropriate standard naming convention for VOBs, components, and streams, as part of a ClearCase usage model for your organization or project.
Incremental vs. full baselines
When creating a baseline for your testing assets, you have the choice of creating either an incremental baseline or a full baseline. The advantage of an incremental baseline is that it takes less time to create than a full baseline. The disadvantage of an incremental baseline, however, is that it takes longer to revert to a previous baseline, as each controlled file in the incremental baseline must be recreated based on the changes between the versions.
For information on the tools covered in this article, check out the following:
- IBM Rational ClearCase and ClearCase LT Administrator's Guide, v2003.06.00 and Later, (UNIX/Windows)
ftp://ftp.software.ibm.com/software/rational/docs/v2003/cc_family/cclt_pdf/cc_admin.pdf - IBM Rational ClearCase -- Developing Software, v2003.06.00 and Later (Windows)
ftp://ftp.software.ibm.com/software/rational/docs/v2003/cc_family/cclt_pdf/ucm_dev.win.pdf - IBM Rational ClearCase and ClearCase LT -- Managing Software Projects, v2003.06.00 and Later (UNIX/Windows)
ftp://ftp.software.ibm.com/software/rational/docs/v2003/cc_family/cclt_pdf/cc_proj.pdf - Rational Unified Process: Tool Mentor: Using UCM Change Sets with Rational ClearCase
For information on developing software using IBM Rational ClearQuest-enabled UCM, go to:
- IBM Rational ClearCase -- Developing Software, v2003.06.00 and Later (Windows)
ftp://ftp.software.ibm.com/software/rational/docs/v2003/cc_family/cclt_pdf/ucm_dev.win.pdf
A good resource for a deeper look at Software Configuration Management and Rational ClearCase is:
- Software Configuration Management Strategies and Rational ClearCase: A Practical Guide, by Brian White
Mike Kelly is currently a software testing consultant for the Computer Horizons Corporation in Indianapolis. He's had experience managing a software automation testing team and has been working with the Rational tools since 1999. His primary areas of interest are software development lifecycles, software test automation, and project management. Mike can be reached by e-mail.
Tony Hutson is currently a Rational Tool Administrator in Indianapolis and President of the Indianapolis Rational Users Group. Tony has more than 10 years of experience using Rational tools. His interests include mentoring project teams in object-oriented development, implementing the Rational Unified Process, requirements management, and use case development. Tony can be reached by e-mail
Comments (Undergoing maintenance)





