title: Browser gets disconnected while executing karma test cases
body: <p>Hi I have somewhat around 603 testcases written in jasmine. And I am trying to run these test cases using <strong>ng test</strong> command. But every time browser gets disconnected at 390 testcase and restarts the browser again and runs the testcases again from number 1. Message is following:-</p>
  
  <p><code>HeadlessChrome 0.0.0 (Windows 7 0.0.0): Executed 390 of 603 (14 FAILED) (0 secs / 37 mins 55.402 secs)
  HeadlessChrome 0.0.0 (Windows 7 0.0.0) ERROR
    Disconnected
  HeadlessChrome 0.0.0 (Windows 7 0.0.0): Executed 390 of 603 (14 FAILED) DISCONNECTED (38 mins 45.052 secs / 37 mins 55.402 secs)
  HeadlessChrome 0.0.0 (Windows 7 0.0.0) ERROR
  HeadlessChrome 0.0.0 (Windows 7 0.0.0): Executed 390 of 603 (14 FAILED) DISCONNECTED (38 mins 45.052 secs / 37 mins 55.402 secs)
  26 08 2019 14:57:29.558:INFO [karma]: Restarting HeadlessChrome 0.0.0 (Windows 7 0.0.0) (1 of 5 attempts)
  26 08 2019 14:57:33.062:INFO [HeadlessChrome 0.0.0 (Windows 7 0.0.0)]: Connected on socket CF0U7yNUkencldeeAAAB with id 69964403</code></p>
  
  <p>Karma.conf file</p>
  
  <pre><code> module.exports = function(config) {
      config.set({
          basePath: '',
          frameworks: ['jasmine', '@angular-devkit/build-angular'],
          plugins: [
              require('karma-jasmine'),
              require('karma-phantomjs-launcher'),
              require('karma-chrome-launcher'),
              require('karma-junit-reporter'),
              require('karma-jasmine-html-reporter'),
              require('karma-coverage-istanbul-reporter'),
              require('@angular-devkit/build-angular/plugins/karma')
          ],
          client: {
              clearContext: false
          },
          coverageIstanbulReporter: {
              reports: ['html', 'lcovonly'],
              fixWebpackSourcePaths: true
          },
          angularCli: {
              environment: 'dev'
          },
          mime: {
              'text/x-typescript': ['ts']
          },
          reporters: ['progress', 'kjhtml', 'junit'],
          junitReporter: {
              outputFile: './target/surefire-reports/TEST-com.ericsson.bss.rm.cpm.cpc.xml',
              suite: 'com.ericsson.bss.rm.cpm.cpc',
              useBrowserName: false
          },
          port: 9876,
          failOnEmptyTestSuite: false,
          colors: true,
          logLevel: config.LOG_INFO,
          autoWatch: false,
          mime: { 'text/x-typescript': ['ts', 'tsx'] },
          browsers: ['ChromeHeadless'],
          singleRun: true,
         captureTimeout: 800000,
         browserDisconnectTimeout: 2000,
         browserDisconnectTolerance: 5,
         browserNoActivityTimeout: 800000,
         webpack: { node: { fs: 'empty' } }
      });
  };
  </code></pre>
  
  <p>Package.json file:-</p>
  
  <pre><code>"devDependencies": {
      "@angular/cli": "^8.2.0",
      "@ericsson/cus-ui": "3.0.0",
      "@types/jasmine": "2.8.8",
      "@types/jasminewd2": "~2.0.2",
      "@types/node": "~12.0.8",
      "codelyzer": "^5.0.1",
      "jasmine-core": "~2.8.0",
      "jasmine-spec-reporter": "~4.2.1",
      "karma": "~2.0.0",
      "karma-chrome-launcher": "~2.2.0",
      "karma-cli": "~1.0.1",
      "karma-coverage-istanbul-reporter": "^1.2.1",
      "karma-jasmine": "~1.1.0",
      "karma-jasmine-html-reporter": "^0.2.2",
      "karma-junit-reporter": "^1.2.0",
      "karma-phantomjs-launcher": "^1.0.4",
      "karma-remap-istanbul": "0.6.0",
      "karma-spec-reporter": "0.0.30",
      "protractor": "5.4.2",
      "ts-node": "~8.2.0",
      "tslint": "~5.17.0",
      "typescript": "~3.4.3"
  }
  </code></pre>