Documentation

Looking for something in particular?

How to Integrate Provar Manager

3rd Party Test Results Integration

In this section, we will explain how you can import test results from other tools in JUnit or TestNG format into Provar Manager.

You can either use the assistant on any Test Cycle record or use the API.

Option 1: Assistant on a Test Cycle.

Firstly, you need to create a Test Cycle to define information like browser, device, operating system, testing tools, environment and test plan.

Once you have created a test cycle, you can use the assistant to upload your test results file and let Provar Manager process it.

  1. Click Upload Test Results. An Upload Test Results screen is displayed.

Above: Snapshot of Test Results Uploader on a Test Cycle record.

  1. In the Tester field, select the tester who will be related to the generated test executions.
  2. In the Test results format field, select what is the format of the file that you are uploading. We have selected JUnit.
  3. In the Missing Test Case Strategy field, we have selected Create. This defines what Provar Manager should do when a test case is not found in the system.
  4. In the Test Type field, we have selected Unit testing. In case the previously selected strategy is Create, this will define what type of test cases will be created.
  5. Click Next.
  1. Click Upload Files to select and upload the file. For example, we have uploaded an XML file (test-result.xml). Click Done.
  1. Click Next. And, you can see the message ‘Your test results were uploaded and are being processed.’
  1. Click Finish.

Note: At this point, Provar Manager will parse the file and create a test execution record for each test case. The test cases are matched based on their External Id.

As a result of following these steps, you can see Provar Manager has created a record of Test results Processing Jobs.

If you click on this record you can see the Status as Completed.

This is how the Test Results Processing Job record works:

  • When you create it, the status is Draft.
  • Once the test results are attached, the status can be changed to Ready so it gets processed.
  • Provar Manager will automatically change the status to In Progress
  • After processing, the status will be changed to either Completed or Failed.

If you go back to the Test Cycle (click on test cycle) and refresh Test Executions (click refresh icon) and you can see it created a test execution for each of the test cases and they passed i.e. the Status is Pass. You can go to each one and see the details.

Every test result method can be seen as a Test Step Execution.

Because the selected strategy was “Create”, test cases of type Unit testing were automatically created.

Option 2: Through API

If you want to import test results via API then you will do the same thing as explained before: you will create the Test Cycle record first, then the Test Results Processing record and then upload the file to it. Afterwards, set the Status as Ready and it will be processed.  

JUnit Test Results Sample and Mapping

<?xml version=”1.0″ encoding=”UTF-8″?>
<testsuites disabled=”0″ errors=”1″ failures=”1″ name=”” tests=”” time=””>
    <testsuite errors=”1″ failures=”5″ name=”nose2-junit” skips=”1″ tests=”25″ time=”0.004″>
        <testcase classname=”pkg1.test.test_things” name=”test_params_func:2″ time=”0.000098″>
            <failure message=”test failure”>Traceback (most recent call last): File “nose2/plugins/loader/parameters.py”, line 162
</failure>
        </testcase>
    </testsuite>
</testsuites>
XML TagProvar Manager Object
testsuitesN/A
    testsuiteN/A
        testcase.classnameTest Execution > Test Case (via External Id)
        testcase.nameTest Step (Action)
            failure.messageDefect (Name)
            failure.bodyDefect (Description)

TestNG Test Results Sample and Mapping

<?xml version=”1.0″ encoding=”UTF-8″?>
<testng-results skipped=”0″ failed=”2″ ignored=”0″ total=”8″ passed=”6″>
  <suite name=”TestAll” duration-ms=”25″ started-at=”2018-03-06T17:22:48Z” finished-at=”2018-03-06T17:22:48Z”>
    <test name=”calculator” duration-ms=”25″ started-at=”2018-03-06T17:22:48Z” finished-at=”2018-03-06T17:22:48Z”>
      <class name=”com.xpand.java.CalcTest”>
        <test-method status=”FAIL” name=”CanAddNumbersFromGivenData” duration-ms=”1″ started-at=”2018-03-06T17:22:48Z” finished-at=”2018-03-06T17:22:48Z”>
          <params>
            <param index=”0″>
              <value>
                <![CDATA[2]]>
              </value>
            </param>
          </params>
          <exception class=”java.lang.AssertionError”>
            <message>
              <![CDATA[expected [4] but found [5]]]>
            </message>
            <full-stacktrace>
              <![CDATA[java.lang.AssertionError: expected [4] but found [5]
    at org.testng.Assert.fail(Assert.java:93)
]]>
            </full-stacktrace>
          </exception>
          <attributes>
            <attribute name=”test”>
              <![CDATA[CALC-1]]>
            </attribute>
          </attributes>
        </test-method>
      </class>
    </test>
  </suite>
</testng-results>
XML TagProvar Manager Object
testng-resultsN/A
    suiteN/A
        testN/A
            class.nameTest Execution > Test Case (via External Id)
                test-method.nameTest Step (Action)
                    paramsTest Step (added to Action)
                    exceptionN/A
                        messageDefect (Name)
                        full-stacktraceDefect (Description)
                    attributesTest Step (Comments)
Review Provar on G2
Documentation library

Trying to raise a case with our support team?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top