mojotech / pioneer

Integration Testing
MIT License
527 stars 35 forks source link

[RFC] Plugin Architecture #325

Open StevenLangbroek opened 9 years ago

StevenLangbroek commented 9 years ago

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();
    }
  });
}
orizens commented 9 years ago

+1 I'd also like to use browserstack

sethkrasnianski commented 8 years ago

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 commented 8 years ago

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

orizens commented 8 years ago

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

sethkrasnianski commented 8 years ago

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

orizens commented 8 years ago

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