protractor-multicapabilities-htmlreporter_v2

Utility to generate html report for multicapabilities automation results

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
protractor-multicapabilities-htmlreporter_v2
0.0.69 years ago9 years agoMinified + gzip package size for protractor-multicapabilities-htmlreporter_v2 in KB

Readme

protractor-multicapabilities-htmlreporterv2
Utility to generate html report for protractor multi capabilities with data provider. Use case is when you want to execute the same test in multiple variants/versions and then you need to report the execution separately.

Installation

``` npm install protractor-multicapabilities-htmlreporterv2 ```

Protractor Usage

Execute the script in protractor afterLaunch callback. A callback function called once all tests have finished running and the WebDriver instance has been shut down.

afterLaunch: function() {
var reporter = require('protractor-multicapabilities-htmlreporter_v2');
reporter.generateHtmlReport('./ptor-out.json','Automation Results','./report.html');
}

Configurations

Add the below config for generating output for results in json format

resultJsonOutputFile: 'ptor-out.json'

Make sure test description follows the below format and json output file contains description 
in the same format.

Sample test file below, this below example shows hardcoded browser values, you can dynamically pass 
browsername and version using getProcessedConfig() as browser.params in onPrepare callback function.

...
it("Version1|Product_Page|iPhone|8.0" ,function () { 
...

it("Version2|Product_Page|iPhone|8.0" ,function () { 
...

Sample Protractor JSON output file

[
    {
        "description": "Version1|Category_Page|iPhone|8.0",
        "assertions": [],
        "duration": 4544
    },
    {
        "description": "Version2|Product_Page|iPhone|8.0",
        "assertions": [],
        "duration": 5898
    }
]

Html Report

Alt text

Sample retry output file

[
    {
        "version": "V1",
        "testName": "Order",
        "browser": "iPhone-8.0"
    },
    {
        "version": "V2",
        "testName": "Home",
        "browser": "iPhone-8.0"
    }
]

Release History

  • 0.0.1 Initial release
  • 0.0.2 New retry.js file for failed cases and it can be used for retry scenarios.
  • 0.0.3 Version bump
  • 0.0.4 Fixed bug related duplicated testnames
  • 0.0.5 Rverting the changes
  • 0.0.6 Added specfile info to retry response