title: protractor-jasmine2-html-reporter doesn't consolidate results for all test when tests are shared using 'shardTestFiles': true in conf file
body: <p>Recently we have configured our e2e-tests to be on Jenkins &amp; soon we realized that we have to use shared test files: true options as complete suite run is taking very long time for us peeking 9-10hrs on daily basis. but when we configured below two options in conf file. tests are running fine but final report displays only the last specs run results in save path. consolidate all options is not giving the full reports.</p>
  
  <p>please find our conf file details. any help will be appreciated.</p>
  
  <p>Edit the conf file as per solution provide by Aditya. please help</p>
  
  <pre><code>   var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');
  var log4js = require('log4js');
  var params = process.argv;
  var args = process.argv.slice(3);
  
  exports.config = {
    //seleniumServerJar: './node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.48.2.jar',
    seleniumAddress: 'http://localhost:4444/wd/hub',
    allScriptsTimeout: 100000,
    framework: 'jasmine2',
  
    onPrepare: function () {
  
      return new Promise(function(fulfill, reject) {
        browser.getCapabilities().then(function(value) {
          reportName = value.get(Math.random(8,2)) + '_' + value.get('browserName') + '_' + Math.floor(Math.random() * 1E16);
          jasmine.getEnv().addReporter(
            new Jasmine2HtmlReporter({
              //cleanDestination: false,
              savePath: __dirname+'/target',
              //docTitle: 'Web UI Test Report',
              screenshotsFolder: 'image',
              //takeScreenshots: true,
              takeScreenshotsOnlyOnFailures: true,
              consolidate: true,
              consolidateAll: true,
               preserveDirectory: true,
              //fixedScreenshotName: true,
              filePrefix: reportName + ".html"
            })
          );
          fulfill();
        });
      });
  
      // browser.manage().timeouts().implicitlyWait(11000);
      var width = 768;
      var height = 1366;
      browser.driver.manage().window().setSize(768, 1366);
      browser.ignoreSynchronization = false; 
    },
  
    afterLaunch: function afterLaunch() {
      var fs = require('fs');
      var output = '';
      fs.readdirSync('target/').forEach(function (file) {
        if (!(fs.lstatSync('target/' + file).isDirectory()))
          output = output + fs.readFileSync('target/' + file);
      });
      fs.writeFileSync('target/ConsolidatedReport.html', output, 'utf8');
  
    },
  
    suites:{
  
      example:['./test/e2e/specs/**/*Spec.js',]
    },
  
  
    /*  capabilities: {
        'browserName': 'chrome'
      },*/
  
    multiCapabilities: [
      {
        'browserName': 'chrome'
      },
      {
        'browserName': 'firefox'
      }
    ],
  
  
    resultJsonOutputFile:'./results.json',
  
    // Options to be passed to Jasmine-node.
    jasmineNodeOpts: {
      showColors: true,
      defaultTimeoutInterval: 100000
    }
  };
  </code></pre>