Skip to main content

 

 
Go Search
Home
Getting Started
Knowledge Base
Training
Discussions
Downloads
Platform SDK
  

 
 
VersionOne Community > Downloads > Integration Documentation > QTP
 
VersionOne HP Quick Test Professional Integration

VersionOne HP Quick Test Professional Integration


Description

The VersionOne Quick Test Professional Integration (V1QuickTestPro) imports the results of tests defined HP's Quick Test Professional (QTP) into VersionOne. The results of an individual QTP test can be linked to a Test Artifact in VersionOne, so that development, and you organization, will receive quick feedback on which tests are passing and failing.

Once this integration is installed, VersionOne users update the Reference field on a VersionOne Test with the test names defined in QTP. The Test Run Trend report shows the aggregated test results for the test suite which was assigned to the project at the time of the test run. For individiual tests, each test in VersionOne should have its own test defined in QTP. If a test fails on a story or defect that is already closed, V1QuickTestPro can be configured to create a defect in the current iteration, so the team is notified of the failing test.

System Requirements

VersionOne: 7.3 or above

Integration Server:

  • Operating System—Windows 2000, 2003

  • Framework—Microsoft .Net 2.0

  • HP Quick Test Pro—Tested with Release 9.2

Downloads

The latest version of V1QuickTestPro is available at V1: Integration Downloads.

Installation

These installation instructions assume HP Quick Test Professional is already installed, configured, and working properly.

1. Determine Install Location

V1QuickTestPro can be installed on any server with network access to both your VersionOne and the QTP Test results. Exact placement should be determined by your internal software management requirements. The integation server must meet the System Requirements stated above.

2. Extract Files

Download V1QuickTestPro using the link above and extract it into a folder of your choice.

3. Configuration

3.1 Configure ServiceExecutor

  1. Open the file VersionOne.ServiceExecutor.exe.config in a text editor and locate the QTPReaderService1 configuration element. This element is used to define the location where QTP writes the test results and to asociate this location with a TestSuite in VersionOne.

    Table 1. QTPReaderService Configuration Parameters

    ParameterDescription
    WatchQTP test results output folder. Paths are relative to the V1QuickTestPro installation folder.
    FilterSpecify the file you want to watch. Wildcards are accepted. By default the pattern is Results.xml.
    SuiteNameVersionOne Test Suite.


    VersionOne.ServiceExecutor support multiple QTPReader services. If you want more than one, duplicate an existing QTPReaderService element and rename it incrementing the last digit. The following example demonstrates this with two QTPReaderService elements.

    Example 1. 

    <QTPReaderService1 class="VersionOne.ServiceHost.TestServices.Mercury.QTPReaderService, VersionOne.ServiceHost.TestServices">
    	<Watch>C:\QTP\Release10\TestData and Results</Watch>
    	<Filter>Results.xml</Filter>
    	<SuiteName>Release10TestSuite</SuiteName>
    </QTPReaderService1>
    <QTPReaderService2 class="VersionOne.ServiceHost.TestServices.Mercury.QTPReaderService, VersionOne.ServiceHost.TestServices">
    	<Watch>C:\QTP\Release20\TestData and Results</Watch>
    	<Filter>Results.xml</Filter>
    	<SuiteName>Release20TestSuite</SuiteName>
    </QTPReaderService2>
    

  2. The TestWriterService listens for test run and suite results published by the QTPReaderService and updates VersionOne with the results.

    Table 2. TestWriterService Configuration Parameters

    ParameterDescription
    ApplicationUrlThe URL for your VersionOne application
    UsernameThe VersionOne account username, if using native VersionOne security. If using Windows Integrated Security, leave empty.
    PasswordThe VersionOne account password, if using native VersionOne security. If using Windows Integrated Security, leave empty.
    APIVersionThe minimum application version required for this hosted service.
    IntegratedAuth*False if using VersionOne native security, true is using Windows Integrated Security. If VersionOne is configured to use Windows Integrated Security, the account the service is running as must be a configured VersionOne user with a project role of Team Member or higher. Also, Username and Password should be empty if IntegratedAuth is true.
    PassedOidThe TestStatus asset Oid in VersionOne that indicates test a test succeeded
    FailedOidThe TestStatus asset Oid in VersionOne that indicates that a test failed
    TestReferenceAttributeThe cross-reference used to associate tests in VersionOne to test in the external test system ('Number' is the default, 'Reference' another option)
    ChangeCommentThe change comment put into history for any modifications the service makes in VersionOne
    DescriptionSuffixA suffix for the description of any defects that the service creates; Embedded Rich Text (HTML) is valid in this suffix
    CreateDefectIndicates whether the TestWriterService should create defects when automated tests fail for closed tests in VersionOne. Valid values are:
    • All: creates a 'failed test' defect for any closed tests in the project

    • CurrentIteration: only creates a 'failed test' defect for closed tests within the current iteration

    • None: never creates defects


    Example 2. 

    <TestWriterService class="VersionOne.ServiceHost.TestServices.TestWriterService, VersionOne.ServiceHost.TestServices">
    	<Settings>
    		<ApplicationUrl>http://localhost/VersionOne/</ApplicationUrl>
    		<Username>admin</Username>
    		<Password>admin</Password>
    		<APIVersion>7.1.0.0</APIVersion>
    		<IntegratedAuth>false</IntegratedAuth>
    	</Settings>
    	<PassedOid>TestStatus:129</PassedOid>
    	<FailedOid>TestStatus:155</FailedOid>
    	<TestReferenceAttribute>Number</TestReferenceAttribute>
    	<ChangeComment>Updated by VersionOne.ServiceHost</ChangeComment>
    	<!-- Embedded Rich Text (HTML) is valid in this suffix -->
    	<DescriptionSuffix>Check the external test system for more details.</DescriptionSuffix>
    	<CreateDefect>All</CreateDefect>
    </TestWriterService>
    

3.2 Configure VersionOne

  1. Before V1QuickTestPro can update a test in VersionOne you must associate the VersionOne test with the QTP test. This association is controled by the TestReferenceAttribute in the ServiceExecutor configuration file. By default this field is the Reference field on a VersionOne Test artifact.

    To configure this association, you need to edit the VersionOne Test artifact and enter the QTP test name in the Reference field.

    Figure 1. 


  2. In order for the Test Run Trend reports to function properly, your QTP test Suite needs to be accociated with a VersionOne Project. To accomplish this you need to create a TestSuite in VersionOne, set the appropriate fields, and assigning this suite to a Project.

    A VersionOne TestSuite is created from the Administration | Project | TestSuite menu.

    Figure 2. 


    The Reference attribute on the VersionOne TestSuite defined the association to the QTP Test. This vaule of this field must match the value that was specified in the SuiteName element in the ServiceExecutor configuration file

    Figure 3. 


    Finally, assign the TestSuite to the appropriate project.

    Figure 4. 


4. Start up

Open up the command prompt, navigate to your installation folder, and run the following command: VersionOne.ServiceExecutor.exe

Here is the expected output where there are no results to publish into VersionOne

Example 3. 

C:\V1MercuryQTP>VersionOne.ServiceExecutor.exe
Loaded VersionOne.ServiceHost.Logging.ConsoleLogService, VersionOne.ServiceHost.Core.
Loaded VersionOne.ServiceHost.Logging.FileLogService, VersionOne.ServiceHost.Core.
Loaded VersionOne.ServiceHost.TestServices.Mercury.QTPReaderService, VersionOne.ServiceHost.TestServices.
Loaded VersionOne.ServiceHost.TestServices.TestWriterService, VersionOne.ServiceHost.TestServices.
[Info] Initialized ConsoleLogService
[Info] Initializing FileLogService
[Info] Initialized FileLogService
[Info] Initializing QTPReaderService1
[Info] Initialized QTPReaderService1
[Info] Initializing TestWriterService
[Info] Initialized TestWriterService
[Startup]
[Shutdown]

C:\V1MercuryQTP>


5. Test the Service

Before testing you must execute at least one test. Once this is complete, open up the command prompt, navigate to your installation folder, and run the following command: VersionOne.ServiceExecutor.exe

When V1QuickTestPro and VersionOne are configured correctly you should see data being published into VersionOne.

Example 4. 

C:\V1MercuryQTP>VersionOne.ServiceExecutor.exe
Loaded VersionOne.ServiceHost.Logging.ConsoleLogService, VersionOne.ServiceHost.Core.
Loaded VersionOne.ServiceHost.Logging.FileLogService, VersionOne.ServiceHost.Core.
Loaded VersionOne.ServiceHost.TestServices.Mercury.QTPReaderService, VersionOne.ServiceHost.TestServices.
Loaded VersionOne.ServiceHost.TestServices.TestWriterService, VersionOne.ServiceHost.TestServices.
[Info] Initialized ConsoleLogService
[Info] Initializing FileLogService
[Info] Initialized FileLogService
[Info] Initializing QTPReaderService1
[Info] Initialized QTPReaderService1
[Info] Initializing TestWriterService
[Info] Initialized TestWriterService
[Startup]
[Info] Updating status of Acceptance Test "Test:1366:1598".
[Info] Suite:
                TestRun.Date = 11/20/2007 9:17:20 AM
                TestRun.Failed = 1
                TestRun.Elapsed = 0
                TestRun.Description = Release10TestSuite on 11/20/2007 9:17:20 AM
                TestRun.Passed = 2
                TestRun.NotRun = 0
                TestRun.Name = Release10TestSuite
                TestRun.TestSuite = TestSuite:1771

[Shutdown]

C:\V1MercuryQTP>


6. Automation

To automate the publishing of results after each test run is accomplished by creating a QTP test script that calls VersionOne.ServiceExecutor.exe and add this script to the end of your QTC batch process.

Example 5. QTP Test Script to publish results to VersionOne


Example 6. Batch Modification to include script


Copyright © 2008, VersionOne, Inc. All rights reserved. This document was generated 2008-01-24 08:42:34.