For many, integrating your test management system with your automation environment is a key aim. Whilst Quality Center integrates with UFT and QTP out of the box, many have other integration requirements. In cases where you might be looking to integrate TestComplete automated tests with Quality Center the following set up and execution instructions may help.
A few things need to be addressed as part of the initial setup. A couple of things on the TestComplete client side and a couple of things on the Quality Center server.
For TestComplete and the TestComplete client machine you need to …
1) install the HP QC Connectivity Add-In on the TestComplete client machine. This utility is provided by HP and can be found by
i) going to the Quality Center start page (e.g. http://YOUR_HOST:8080/qcbin) and selecting the “Add-Ins Page” link.
ii) on the Add-ins page select “HP Quality Center Connectivity”
iii) This will give you the Connectivity Add-in page from where you need to download and install the add-in
2) apply the TestComplete QC licence. Once you have your license for the TestCompelte Quality Center connector you can apply this by…
i) select Help then “Activate License”
ii) usually you would select ‘Automatic Activation’ and apply the license.
You can check the license is installed correctly by …
a) select Help then “About”
b) on the about dialogue select “View Available Features”
3) enable the TestComplete Quality Center Connector from within TestComplete. To do this you need to ..
i) start TestComplete and select “Install Extensions” from the File menu
ii) scroll to the bottom of the ‘Install Extensions’ dialogue box and make sure the “TestComplete Connector for HP Quality Center” check box is checked…
From here you should see the “HP Quality Center” option listed in the File drop down
If you don’t see this listed in the file menu then you can fix this by…
a) right clicking anywhere on the tool bar and selecting ‘customize’
b) select the ‘commands’ tab in the Customize dialogue
c) in the categories list select “HP Quality Center”
d) in the ‘Commands’ box select HP Quality Center and drag this across to the file menu
For Quaility Center you will need to configure the following…
4) first off this integration can be configured in two different modes. You need to decide which of the following modes best fits with your way of working…
a) Run Tests
In run tests mode TestComplete scripts can be stored and run from QC. Results of runs will be logged in QC to.
b) Run Tests and Create Defects
In Run Tests and Create Defects modes TestComplete scripts can be stored and run from QC. Results of runs will be logged in QC to. However, if a TestComplete project run fails the log files from that failure will be zipped up and sent to QC. They will be stored in QC under a defect record that is automatically created.
To configure your preferred mode you need to find the following directory in your TestComplete install…
Program Files (x86)SmartBearTestComplete9QC Integration
In here you’ll find 2 files…
Run test and create defect in QC.vbscript
Run test.vbscript
Pick the required file (and only this file) and open in a text editor. Copy the text and from with in the QC interface follow these steps…
i) select Tools -> Customize..
ii) in the menu list select “Workflow”
iii) then select “Script Editor”
This should give you this script editor window…
From here open the “Test Lab module script” node. And in the right hand pane text editor window paste in the vbscript file contents from the file you opened above.
Save this and exit out of the Quality Center customization mode.
At this point you’ll be ready to start uploading your TestComplete scripts/projects in to Quality Center prior to running them. To get your projects uploaded in to QC you will need to…
5) Open TestComplete and select your project. Prior to uploading your project you will want to prepare your project by …
i) deleting all the log files (or copy them somewhere else if you need to keep them)
ii) deleting any visualizer files (or copy them somewhere else if you need to keep them)
iii) select the required tests you want to run within individual projects
The reason for this is that the whole TestComplete project gets zipped up, uploaded and stored in QC. When you come to run it from QC the project will be downloaded from QC on to the client machine. If the project contains log files and visualizer screen shots all these files end up being copied between machine. They are not needed but if they’re large it slows things down.
6) At this point then you can upload the project to QC by…
a) select File -> HP Quality Center….
b) enter Host, loing name and password of your QC installation.
c) select the QC Domain and Project
d) select (or create) the folder in the QC Test Plan where the project will be stored
When you select Next the TestComplete project and associated tests will be uploaded to Quality Center. The mapping between QC and TestComplete artifacts is as follows:
Quality Center TestComplete
Test Plan Folder Project Suite
VAPI-XP-Test Project
When the TestComplete project is uploaded to QC the zipped file is stored at the folder level within the Test Plan area as an attachment. Under this project VAPI-XP-TEST tests are created for each project within the project suite.
7) at this point you are ready to group tests (TC projects) into Test Sets and then execute those test sets. So within the Test Lab – Test Sets area you can create a new test set. From the execution grid you can pull TC projects in to a test set
So in this example we have a test set which contains 2 TestComplete projects. When we run this test set both automation projects will be executed on the client machine.
8 ) Select Run Test Set to execute the automation project on the client machines. Select the host to run on for each project and then run all or selected projects…
Before executing the run make sure that TestComplete is not running on the client machine.
9) At this point QC will download the zipped project file (that is stored in the QC Test Plan folder) to the client machine where the automated tests will be executed.
TestComplete will be started and the projects selected in the Test Set executed.
10) Once the tests have been executed on the client machine, TestComplete will automatically be closed down and the results uploaded into QC. Depending on which vbscript you selected in the setup you will get different outcomes at this point…
Run test.vbscript
Test results will be uploaded to the Test Runs area within QC.
Run test and create defect in QC.vbscript
In addition to the test results being uploaded defects may also be created in QC. If an auotmation run fails then a defect is automatically created with the log file attached to the defect. The log files will be zipped .mht files. So unzipping and opening within IE will give you the full log history
Conclusion
Setting up and configuring the TestComplete to Quality Center connector can take 30 minutes to an hour, but it’s not particularly complicated. Once configured you’ll get the ability to upload all your TestComplete scripts to QC. It’s worth noting that if you need to change the scripts you will need to change them in TestComplete then upload them to QC again. You can’t modify them directly from QC.
So whilst this is a very effective integration you won’t get the same degree of integration that you see between UFT/QTP and QC. Having said that if you’re a fan of TestComplete (perhaps because it has better support for different browsers) and you do use QC then you have an effective way to manage manual and automated (both UFT and TC) testing by using this connector.