Rally - HP ALM - HP ALM Config Run to Test Case Result
search cancel

Rally - HP ALM - HP ALM Config Run to Test Case Result

book

Article ID: 125049

calendar_today

Updated On:

Products

Rally On-Premise Rally SaaS

Issue/Introduction

The two configuration files below will:

  1. Copy QC Tests to Rally TestCases
  2. Copy QC Runs to Rally TestCaseResults



Environment

Release: AGUE5099000-SAAS-Agile Central-Unlimited Edition SaaS-50 User Pack
Component:

Resolution

QC-config-run2testcaseresult.pxml

The two configuration files below will:

  1. Copy QC Tests to Rally TestCases
  2. Copy QC Runs to Rally TestCaseResults

Below are three sections relating to this QC connector run:

  1. The first configuration file.
  2. The second configuration file.

Configuration File x047a-QCtests2RallyTestcases.pxml

<Config>
    <RallyConnection>
        <Url>Your-Rally-URL</Url>
        <WorkspaceName>Your-Rally-Workspace</WorkspaceName>
        <Projects>
            <Project>Your-Rally-Project</Project>
        </Projects>
        <User>Your-Rally-Username</User>
        <Password>Your-Rally-Password</Password>
        <ArtifactType>TestCase</ArtifactType>
        <ExternalIDField>Your-Rally-ExternalID</ExternalIDField>
    </RallyConnection>

    <QCConnection>
        <Url>Your-QC-URL</Url>
        <Domain>Your-QC-Domain</Domain>
        <Project>Your-QC-Project</Project>
        <User>Your-QC-Username</User>
        <Password>Your-QC-Password</Password>
        <ArtifactType>TEST</ArtifactType>
        <TestFolder>Your-QC-TestFolder</TestFolder>
        <IDField>TS_TEST_ID</IDField>
        <ExternalIDField>Your-QC-ExternalID</ExternalIDField>
    </QCConnection>

    <Connector>
        <FieldMapping>
            <Field><Rally>Name</Rally>  <Other>TS_NAME</Other></Field>
        </FieldMapping>
    </Connector>

    <ConnectorRunner>
        <Preview>false</Preview>
        <LogLevel>debug</LogLevel>
        <Services>COPY_QC_TO_RALLY</Services>
    </ConnectorRunner>
</Config>

Configuration File x047b-QCtests2RallyTestcases.pxml

<Config>
    <RallyTestResultConnection>
        <Url>Your-Rally-URL</Url>
        <WorkspaceName>Your-Rally-Workspace</WorkspaceName>
        <Projects>
            <Project>Your-Rally-Project</Project>
        </Projects>
        <User>Your-Rally-Username</User>
        <Password>Your-Rally-Password</Password>
        <ArtifactType>TestCaseResult</ArtifactType>
    </RallyTestResultConnection>

    <QCRunConnection>                                             
        <Url>Your-QC-URL</Url>
        <Domain>Your-QC-Domain</Domain>
        <Project>Your-QC-Project</Project>
        <User>Your-QC-Username</User>
        <Password>Your-QC-Password</Password>
        <ArtifactType>RUN</ArtifactType>
        <IDField>RN_RUN_ID</IDField>
        <ExternalIDField>Your-QC-ExternalID</ExternalIDField>

        <!-- The following is a QC custom field, created in QC under:
                  Tools >> Customize... >> Project Entities >> Test >> User Fields
            It will be used by the connector to store the OID (object ID) of the
            Rally Test Case Result within the QC Test (viewed under "Test Plan").
       -->
        <TestExternalIDField>TS_USER_01</TestExternalIDField>
        <RunDaysToSearch>30</RunDaysToSearch>
    </QCRunConnection>

    <Connector>
        <FieldMapping>
            <!-- The following four fields are the Required fields on a Rally "Test Case Results":
           -->
            <Field><Rally>TestCase</Rally> <Other>RN_TEST_ID</Other>    </Field>
            <Field><Rally>Verdict</Rally>  <Other>RN_STATUS</Other>    </Field>
            <Field><Rally>Date</Rally>     <Other>RN_EXECUTION_DATE</Other> </Field>
            <Field><Rally>Build</Rally>    <Other>RN_USER_02</Other>    </Field>
        </FieldMapping>

        <RallyFieldHandlers>
            <!-- The following is a required field handler. It tells the
               connector how to lookup the associated "Test Case" in Rally
           -->
            <RallyReferenceFieldHandler>
                <FieldName>TestCase</FieldName>
                <!-- The following is the Rally custom field in the
                   "Test Case" object which the connector will use to
                   store the OID (Object ID) of the associated QC Test
               -->
                <ReferencedFieldLookupID>TCExternalID</ReferencedFieldLookupID>
            </RallyReferenceFieldHandler>
        </RallyFieldHandlers>

        <OtherFieldHandlers>
            <!-- The following is a required field handler. It tells the
               connector how to convert a QC run date to Rally date.
           -->
            <QCRunDateFieldHandler>
                <FieldName>RN_EXECUTION_DATE</FieldName>
            </QCRunDateFieldHandler>

            <OtherEnumFieldHandler>
                <FieldName>RN_STATUS</FieldName>
                <Mappings>
                    <Field><Rally>Fail</Rally>        <Other>Failed</Other></Field>
                    <Field><Rally>N/A</Rally>         <Other>N/A</Other></Field>
                    <Field><Rally>No Run</Rally>      <Other>No Run</Other></Field>
                    <Field><Rally>Inconclusive</Rally><Other>Not Completed</Other></Field>
                    <Field><Rally>Pass</Rally>        <Other>Passed</Other></Field>
                </Mappings>
            </OtherEnumFieldHandler>
        </OtherFieldHandlers>
    </Connector>

    <ConnectorRunner>
        <Preview>false</Preview>
        <LogLevel>Debug</LogLevel>
        <Services>COPY_QC_TO_RALLY</Services>
    </ConnectorRunner>
</Config>