New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiCapabilities - multiReports #61

Closed
oscarbuho888 opened this Issue Jun 6, 2017 · 1 comment

Comments

2 participants
@oscarbuho888

oscarbuho888 commented Jun 6, 2017

Hello everyone,

In this moment i am run the test cases with the option multiCapabilities of BrowserStack, thus the test cases run parallel. The problem is that only generate the report with the last browser that run. I would like to know if i can define diferents routes to generate a "Serenity" report for each browser in which the test cases are executed?

Then send my configuration:

var browserstack = require('browserstack-local');
const crew = require('serenity-js/lib/stage_crew');
require('ts-node/register');

exports.config = {

    baseUrl: 'http://todomvc.com',

    // https://github.com/angular/protractor/blob/master/docs/timeouts.md
    allScriptsTimeout: 110000,
    seleniumAddress: 'http://hub-cloud.browserstack.com/wd/hub',
    framework: 'custom',
    //frameworkPath: require.resolve('protractor-cucumber-framework'),
    frameworkPath: require.resolve('serenity-js'),
    serenity: {
        dialect: 'cucumber',
        crew: [
            crew.serenityBDDReporter(),
            crew.consoleReporter(),
            crew.Photographer.who(_ => _
                .takesPhotosOf(_.Tasks_and_Interactions)
                .takesPhotosWhen(_.Activity_Finishes)
            )
        ]
    },

    specs: [ 'features/**/*.feature' ],
    cucumberOpts: {
        require:    [ 'features/**/*.ts' ],
        format:     'pretty',
        compiler:   'ts:ts-node/register'
    },

    'commonCapabilities': {
    'browserstack.user' : process.env.BROWSERSTACK_USERNAME || 'userName',
    'browserstack.key' : process.env.BROWSERSTACK_ACCESS_KEY || 'accesKey',
    'build': 'protractor-browserstack',
    'name': 'parallel_local_test',
    'browserstack.local': true,
    'browserstack.debug': 'true'
  },

  'multiCapabilities': [{
    'browserName': 'Chrome'
  },{
    'browserName': 'Firefox'
  },{
    'browserName': 'IE'
  }],

   beforeLaunch: function(){
    console.log("Connecting local");
    return new Promise(function(resolve, reject){
      exports.bs_local = new browserstack.Local();
      exports.bs_local.start({'key': exports.config.commonCapabilities['browserstack.key'] }, function(error) {
        if (error) return reject(error);
        console.log('Connected. Now testing...');

        resolve();
      });
    });
  },

  // Code to stop browserstack local after end of test
  afterLaunch: function(){
    return new Promise(function(resolve, reject){
      exports.bs_local.stop(resolve);
    });
  }

    // so that every tests starts with a system in a known state
    //restartBrowserBetweenTests: true
};

exports.config.multiCapabilities.forEach(function(caps){
  for(var i in exports.config.commonCapabilities) caps[i] = caps[i] || exports.config.commonCapabilities[i];
});

@jan-molak jan-molak added ready in progress and removed ready labels Jul 8, 2017

jan-molak added a commit that referenced this issue Jul 15, 2017

feat(core): sceneTagged event allows for the scene to be tagged with …
…an arbitrary tag

This feature will enable addressing #61

affects: @serenity-js/core

@jan-molak jan-molak closed this in bdeb5fb Jul 15, 2017

@jan-molak jan-molak removed the in progress label Jul 15, 2017

@jan-molak

This comment has been minimized.

Show comment
Hide comment
@jan-molak

jan-molak Jul 15, 2017

Owner

Hey @oscarbuho888! The latest version (1.8.0) should address this problem. Could you please take it for a spin when you have a moment and let me know what you think?

Owner

jan-molak commented Jul 15, 2017

Hey @oscarbuho888! The latest version (1.8.0) should address this problem. Could you please take it for a spin when you have a moment and let me know what you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment