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.
  3. The logfile output.

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>

The Logfile rallylog.log

**************************************************************************************************
     rally2_qc_connector
         pid: 1716   
         starting at: 2012-11-13 00:40:52 Z
         cwd: Z:/NetworkShare/JPKoleQC
         configs: x047a-QCtests2RallyTestcases.xml
         interval: -1
**************************************************************************************************
   ANY : ConnectorRunner.block in run - processing to commence using content from x047a-QCtests2RallyTestcases.xml
   ANY : Class.read_config_file - x047a-QCtests2RallyTestcases.xml last modified 2012-11-13 00:02:24 UTC, size: 1444 chars
   ANY : RallyConnection.initialize - Initializing Rally connection version 2.8.6
  INFO : RallyConnection.initialize - Rally Web Services version 1.16
   ANY : QCConnection.initialize - Initializing Quality Center connection version 2.8.6
  INFO : Connector.initialize - Ruby platform i386-mingw32
  INFO : Connector.initialize - Ruby version 1.9.2
  INFO : QCConnection.connect - Connecting to Quality Center
 DEBUG : QCConnection.block in identify_qc_version - Preparing to open Registry to examine: Software\Classes\CLSID\{C5CBD7B2-490C-45f5-8C40-B8C3D108E6D7}\InprocServer32
 DEBUG : QCConnection.block in identify_qc_version - Registry Software\Classes\CLSID\{C5CBD7B2-490C-45f5-8C40-B8C3D108E6D7}\InprocServer32 opened...
 DEBUG : QCConnection.block (2 levels) in identify_qc_version - Registry path to HPQC OTAClient.dll ==> C:\PROGRA~2\COMMON~1\MERCUR~1\TDAPIC~1\OTACLI~1.DLL
 DEBUG : QCConnection.win_path_expanded - expanded Registry path to DLL target: C:/Program Files (x86)/Common Files/Mercury Interactive/TDAPIClient/OTAClient.dll
  INFO : QCConnection.connect - Connected to Quality Center at http://vmwin2008qc11.f4tech.com:8080/qcbin/wcomsrv.dll (version 11.0.0.5761)
  INFO : QCConnection.connect -   Domain: DEFAULT
  INFO : QCConnection.connect -   Project: JPPROJECT11
  INFO : RallyConnection.connect - Connecting to Rally at https://rally1.rallydev.com/slm as user [email protected]
 DEBUG : RallyConnection.connect - Looking up workspace - JP's Workspace Playground
 DEBUG : RallyConnection.connect - Looking up projects
  INFO : RallyConnection.connect - Connected to Rally at https://rally1.rallydev.com/slm -  Workspace: JP's Workspace Playground
  INFO : RallyConnection.connect -   Projects: PR01 - Brewing - Beer - All Grain
  INFO : Connector.validate - Beginning validation
 DEBUG : RallyConnection.validate - Rally Connection - user entry "[email protected]" detected in config file
 DEBUG : RallyConnection.validate - Rally Connection - password entry detected in config file
 DEBUG : RallyConnection.validate - Rally Connection - artifact type "testcase" validated
 DEBUG : RallyConnection.validate - Rally Connection - IDField entry "ObjectID" validated
 DEBUG : RallyConnection.validate - Rally Connection - ExternalIDField entry "QCPR01ExtID" validated
 DEBUG : RallyConnection.validate - Rally Connection - FieldHandler target fields existence validated
 DEBUG : RallyConnection.validate - Rally Connection - Field Defaults settings validated
 DEBUG : Connector.validate - RallyConnection validate succeeded
 DEBUG : QCConnection.validate - Quality Center Connection - user entry "jpqc11" detected in config file
 DEBUG : QCConnection.validate - Quality Center Connection - password entry detected in config file
 DEBUG : QCConnection.validate - Quality Center Connection - artifact type "test" validated
 DEBUG : QCConnection.validate - Quality Center Connection - IDField entry "TS_TEST_ID" validated
 DEBUG : QCConnection.validate - Quality Center Connection - ExternalIDField entry "TS_USER_01" validated
 DEBUG : QCConnection.validate - Quality Center Connection - FieldHandler target fields existence validated
 DEBUG : QCConnection.validate - Quality Center Connection - Field Defaults settings validated
 DEBUG : Connector.validate - Quality Center Connection validate succeeded
 DEBUG : Connector.block in validate - RallyConnection field_mapping target "Name" existence validated
 DEBUG : Connector.block in validate - Quality Center Connection field_mapping target "TS_NAME" existence validated
  INFO : Connector.validate - Validation complete
   ANY : ConnectorRunner.run_services - Last Run 2012-11-12 23:48:26 UTC  --- Now 2012-11-13 00:41:13 UTC
   ANY : ConnectorRunner.process_service - Starting Service COPY_QUALITY CENTER_TO_RALLY
  INFO : QCConnection.find_new -   Found 1 New tests in QC
  INFO : Connector.copy_to_rally - Copy  to Rally
 DEBUG : Connector.block in map_fields_to_rally -   Mapping TS_NAME(JPtest) - to - Name(JPtest)
  INFO : RallyConnection.create_internal -   Created TC59
 DEBUG : QCConnection.update_external_id_fields - set QC Test TS_TEST_ID: 1  external id field TS_USER_01 --> |9456236932|
  INFO : Connector.copy_to_rally - Quality Center test 1 copied to Rally testcase TC59
   ANY : ConnectorRunner.process_service - Finished Service COPY_QUALITY CENTER_TO_RALLY
  INFO : QCConnection.disconnect - Disconnected from Quality Center
   ANY : ConnectorRunner.run_services - time file written with value of 2012-11-13 00:41:13 UTC
   ANY : ConnectorRunner.block in log_service_statistics - x047a-QCtests2RallyTestcases.xml: 1 items copied from Quality center to Rally 
   ANY : ConnectorRunner.log_service_statistics - x047a-QCtests2RallyTestcases.xml: service run took 22 seconds

**************************************************************************************************
     rally2_qc_connector
         pid: 744   
         starting at: 2012-11-13 00:41:46 Z
         cwd: Z:/NetworkShare/JPKoleQC
         configs: x047b-QCruns2RallyTestcaseresults.xml
         interval: -1
**************************************************************************************************
   ANY : ConnectorRunner.block in run - processing to commence using content from x047b-QCruns2RallyTestcaseresults.xml
   ANY : Class.read_config_file - x047b-QCruns2RallyTestcaseresults.xml last modified 2012-11-13 00:30:27 UTC, size: 3125 chars
   ANY : RallyTestResultConnection.initialize - Initializing Rally connection version 2.8.6
  INFO : RallyTestResultConnection.initialize - Rally Web Services version 1.16
   ANY : QCRunConnection.initialize - Initializing Quality Center Tests connection version 2.8.6
  INFO : Connector.initialize - Ruby platform i386-mingw32
  INFO : Connector.initialize - Ruby version 1.9.2
  INFO : QCRunConnection.connect - Connecting to Quality Center
 DEBUG : QCRunConnection.block in identify_qc_version - Preparing to open Registry to examine: Software\Classes\CLSID\{C5CBD7B2-490C-45f5-8C40-B8C3D108E6D7}\InprocServer32
 DEBUG : QCRunConnection.block in identify_qc_version - Registry Software\Classes\CLSID\{C5CBD7B2-490C-45f5-8C40-B8C3D108E6D7}\InprocServer32 opened...
 DEBUG : QCRunConnection.block (2 levels) in identify_qc_version - Registry path to HPQC OTAClient.dll ==> C:\PROGRA~2\COMMON~1\MERCUR~1\TDAPIC~1\OTACLI~1.DLL
 DEBUG : QCRunConnection.win_path_expanded - expanded Registry path to DLL target: C:/Program Files (x86)/Common Files/Mercury Interactive/TDAPIClient/OTAClient.dll
  INFO : QCRunConnection.connect - Connected to Quality Center at http://vmwin2008qc11.f4tech.com:8080/qcbin/wcomsrv.dll (version 11.0.0.5761)
  INFO : QCRunConnection.connect -   Domain: DEFAULT
  INFO : QCRunConnection.connect -   Project: JPPROJECT11
  INFO : RallyTestResultConnection.connect - Connecting to Rally at https://rally1.rallydev.com/slm as user [email protected]
 DEBUG : RallyTestResultConnection.connect - Looking up workspace - JP's Workspace Playground
 DEBUG : RallyTestResultConnection.connect - Looking up projects
  INFO : RallyTestResultConnection.connect - Connected to Rally at https://rally1.rallydev.com/slm -  Workspace: JP's Workspace Playground
  INFO : RallyTestResultConnection.connect -   Projects: PR01 - Brewing - Beer - All Grain
  INFO : Connector.validate - Beginning validation
 DEBUG : Connector.validate - RallyConnection validate succeeded
 DEBUG : QCRunConnection.validate - Quality Center Tests Connection - user entry "jpqc11" detected in config file
 DEBUG : QCRunConnection.validate - Quality Center Tests Connection - password entry detected in config file
 DEBUG : QCRunConnection.validate - Quality Center Tests Connection - artifact type "run" validated
 DEBUG : QCRunConnection.validate - Quality Center Tests Connection - IDField entry "RN_RUN_ID" validated
 DEBUG : QCRunConnection.validate - Quality Center Tests Connection - ExternalIDField entry "RN_USER_01" validated
 DEBUG : QCRunConnection.validate - Quality Center Tests Connection - FieldHandler target fields existence validated
 DEBUG : QCRunConnection.validate - Quality Center Tests Connection - Field Defaults settings validated
 DEBUG : Connector.validate - Quality Center Tests Connection validate succeeded
 DEBUG : Connector.block in validate - RallyConnection field_mapping target "TestCase" existence validated
 DEBUG : Connector.block in validate - Quality Center Tests Connection field_mapping target "RN_TEST_ID" existence validated
 DEBUG : Connector.block in validate - RallyConnection field_mapping target "Verdict" existence validated
 DEBUG : Connector.block in validate - Quality Center Tests Connection field_mapping target "RN_STATUS" existence validated
 DEBUG : Connector.block in validate - RallyConnection field_mapping target "Date" existence validated
 DEBUG : Connector.block in validate - Quality Center Tests Connection field_mapping target "RN_EXECUTION_DATE" existence validated
 DEBUG : Connector.block in validate - RallyConnection field_mapping target "Build" existence validated
 DEBUG : Connector.block in validate - Quality Center Tests Connection field_mapping target "RN_USER_02" existence validated
 DEBUG : Connector.block in validate - Rally Connection field_handler validation for "TestCase" succeeded
 DEBUG : Connector.block in validate - Quality Center Tests Connection field_handler validation for "RN_EXECUTION_DATE" succeeded
 DEBUG : Connector.block in validate - Quality Center Tests Connection field_handler validation for "RN_STATUS" succeeded
  INFO : Connector.validate - Validation complete
   ANY : ConnectorRunner.run_services - Last Run 2012-11-12 23:58:24 UTC  --- Now 2012-11-13 00:42:05 UTC
   ANY : ConnectorRunner.process_service - Starting Service COPY_QUALITY CENTER TESTS_TO_RALLY
  INFO : QCRunConnection.find_new - find_new query: RN_USER_01 = "" and RN_EXECUTION_DATE >= "2012-11-11"
 DEBUG : QCRunConnection.find_new - find_new returned 1 total Test Runs
 DEBUG : QCRunConnection.find_new - find_new    found 1 Test Runs with corresponding Rally tests
  INFO : QCRunConnection.find_new -   Found 1 New runs in QC
  INFO : Connector.copy_to_rally - Copy  to Rally
  WARN : RallyReferenceFieldHandler.initialize - Could not find Rally TestCase with TCExternalID - 1
  WARN : ConnectorRunner.exception - Message Could not find Rally TestCase with TCExternalID - 1
   ANY : ConnectorRunner.process_service - Finished Service COPY_QUALITY CENTER TESTS_TO_RALLY
  INFO : QCRunConnection.disconnect - Disconnected from Quality Center
   ANY : ConnectorRunner.run_services - time file written with value of 2012-11-13 00:42:05 UTC
   ANY : ConnectorRunner.block in log_service_statistics - x047b-QCruns2RallyTestcaseresults.xml: 0 items copied from Quality center tests to Rally 
   ANY : ConnectorRunner.log_service_statistics - x047b-QCruns2RallyTestcaseresults.xml: service run took 19 seconds

Feedback

Need more help? The CA Agile Central Community is your one-stop shop for self-service and support. To submit feedback or cases to CA Agile Central Support, find answers, and collaborate with others, please join us in the CA Agile Central Community.