teerapap / grunt-protractor-runner

A Grunt plugin for running protractor runner.
MIT License
149 stars 123 forks source link

Report Issue when using multicapabilities in protractor #97

Open raghulraj opened 9 years ago

raghulraj commented 9 years ago

I am running my test using protractor multi capabilities option in sauce labs. The issue is, it creates a new session for each capability and execute tests. In my report, I can see only the last executed test results. How can we handle this scenario?

My multi capabilities config: multiCapabilities:[{ name: 'Chrome', browserName: 'chrome', platform: 'Windows 8.1', version: '37', shardTestFiles: true, maxInstances: 1, tags: ['chrome37'] }, { name: 'Firefox', browserName: 'firefox', platform: 'Linux', version: '33', shardTestFiles: true, maxInstances: 1, tags: ['firefox'] } ]

Protractor section in Gruntfile.js:

protractor: {
  options: {
    keepAlive: true,
    configFile: "config/test_conf.js"
  },
  e2e: {
    options: {
      args: {
        params: {
          platform: "desktop",
          env: "qa",
          suite: "e2e"
        },
        specs:["tests/e2e/e2etests.js"],
        verbose:true
      }
    }
    }
chazzlabs commented 9 years ago

@Raghulraj Did you find a resolution to this issue? I'm seeing the same thing now running my tests with this simple multiCapabilities config:

multiCapabilities: [
        { 'browserName': 'firefox' },
        { 'browserName': 'chrome' }
    ]

I'm not convinced this is an error with grunt-protractor-runner but rather with Selenium's Firefox driver, but I haven't had any luck finding any more information.

joeydaowang commented 9 years ago

I have the similar problem, I use

    capabilities: {
        'browserName': 'firefox',
        shardTestFiles: true,
        maxInstances: 2
    },

Only the log of first browser instance printed properly.

joeydaowang commented 9 years ago

Any feedback here please, I am using Protractor 1.8.0 + grunt-protractor-runner 1.1.4. Upgrade to 1.2.1, it has the same issue. When manually run protractor via 'npm run protractor', there is no issue i.e. all log printed. So I assume it is an issue of grunt-protractor-runner?

eoinyoneill commented 8 years ago

I am also having this issue, say i run chrome with max instances of 6, 5 of those 6 instance will print to the report, the last one to finish is not printed. I am going to have to move away from the grunt protractor runner and use native node commands to run the tests so I can have the full report.

I end up with [launcher] 1 instance(s) of WebDriver still running ..