pioneer icon indicating copy to clipboard operation
pioneer copied to clipboard

[RFC] Plugin Architecture

Open StevenLangbroek opened this issue 9 years ago • 6 comments

Elaborating on #324, it would be great to have a plugin architecture, each plugin using internal hooks, and exposing configuration options, much like karma-sauce-launcher exposes configuration for SauceLabs, and uses internal hooks to wire up its behavior:

var mocks = require('./mocks');

module.exports = function(pioneer){
  return pioneer.config({
    format: 'json',
    plugins: ['saucelabs', 'junit'],
    jUnit: {
      path: './spec/reports/integration.xml'
    },
    sauceLabs: {
      testName: 'Application Integration Tests',
      username: 'stevenlangbroek',
      accessKey: 'd6c47114-eff5-45b5-84ad-26d85552e861',
      browsers: {
        sl_ios_safari: {
          base: 'SauceLabs',
          browserName: 'iphone',
          platform: 'OS X 10.9',
          version: '7.1'
        },
        sl_android_42: {
          base: 'SauceLabs',
          platform: 'Linux',
          browserName: 'android',
          deviceName: 'LG Nexus 4 Emulator'
        },
        sl_android_40: {
          base: 'SauceLabs',
          platform: 'Linux',
          version: '4.0',
          browserName: 'android',
          deviceName: 'Motorola Atrix HD Emulator'
        }
      }
    },
    before: function(){
      return mocks.start();
    },

    after: function(results){
      mocks.stop();
    }
  });
}

StevenLangbroek avatar May 12 '15 15:05 StevenLangbroek

+1 I'd also like to use browserstack

orizens avatar Jun 07 '15 09:06 orizens

I think this is a very useful idea. Particularly if we can use browserstack as a preliminary example. We've been wanting to hook into it for a while so that it properly attaches metadata to each test.

sethkrasnianski avatar Oct 07 '15 21:10 sethkrasnianski

Are you interested in making a pass at it @StevenLangbroek or @orizens?

sethkrasnianski avatar Oct 07 '15 21:10 sethkrasnianski

@sethkrasnianski what do you mean by "making a pass"?

orizens avatar Oct 08 '15 06:10 orizens

@orizens, I was a little vague. I should have said "Are you interesting in implementing a proof of concept?".

sethkrasnianski avatar Oct 08 '15 13:10 sethkrasnianski

@sethkrasnianski I am - however, currently, have zero time for this.

orizens avatar Oct 08 '15 13:10 orizens