Evilweed / protractor-beautiful-reporter

An npm module which provides html reports of your Protractor tests with screenshots
MIT License
169 stars 40 forks source link

protractor-beautiful-reporter retry with flake #207

Open paulcastro2014 opened 3 years ago

paulcastro2014 commented 3 years ago

As stated in the docs, protractor-beautiful-reporter does not work with protractor-retry or protractor-flake. The collection of results currently assumes only one continuous run. Is there any workaround to achieve this? or maybe another reporter... Ideal scenario would be to show in the report the execution that Pass only

miller45 commented 2 years ago

The results are accumlated in the combined.json file. So in theory you could parse that file after the whole run, filter out double results by using the latest result only and write the pactched file back. Here is an example


  {
        "description": "should greet the named user|angularjs homepage",
        "passed": false,
        "timestamp": 1534696707767
    },
    {
        "description": "should greet the named user|angularjs homepage",
        "passed": true,
        "timestamp": 1534696710000
    }
]```
So if you use something like retry, you would have entries with the same "description" n-times. (Here it is two). So you could look at the timestamp and weed out duplicate entries by taking the only one with the oldest timestamp.