2017 © Pedro Peláez
 

library testrail-report-aggregator

Tool to aggregation report from JUnit like format to TestRail run report.

image

tonicforhealth/testrail-report-aggregator

Tool to aggregation report from JUnit like format to TestRail run report.

  • Tuesday, June 14, 2016
  • by drefixs
  • Repository
  • 2 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Testrail Report Aggregator

License Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight, (*1)

Tool to aggregation report from JUnit like format to TestRail run report., (*2)

Installation using Composer

$ composer require tonicforhealth/testrail-report-aggregator

Junit report example


<testsuites>
    <testsuite name="IDENT.IDENT2.1.9.4 description" tests="1" failures="0"/>
    <testsuite name="IDENT.IDENT2.1.9.5 description" tests="1" failures="0"/>
    <testsuite name="IDENT.IDENT2.1.9.6 description" tests="1" failures="1">
        <failure
                message="Some error text of the Test IDENT.IDENT2.1.9.6"/>
    </testsuite>
</testsuites>

Case sync use ident which find in the name by using regex ^[\w._-]+.[\w]+.[\w]+, (*3)

Usage

<?php

        $testRunId = 1885;
        $apiUrl = 'https://test.testrail.com/index.php?/api/v2/';
        $user = 'dev@test.com';
        $passwordOrToken = 'chengeMePls'
        $junitXml = 'fixture/simple_junit_report.xml';

        $authentication = new BasicAuth(
            $user,
            $passwordOrToken
        );
        $plugins[] = new AuthenticationPlugin($authentication);

        $pluginClient = new PluginClient(HttpClientDiscovery::find(), $plugins);

        $httpMethodsClient = new HttpMethodsClient($pluginClient, MessageFactoryDiscovery::find());

        $junitReport = new JunitReport($junitXml);

        $testRailReportA = new JUnitToTestRailRunTransformer($testRunId);

        $testRailSync = new TestRailSync($apiUrl, $httpMethodsClient);

        $testRailReport = $testRailReportA->transform($junitReport);

        $testRailSync->sync($testRailReport);

        $testRailSync->pushResults($testRailReport);

The Versions