2017 © Pedro Peláez
 

library testing

image

webforge/testing

  • Tuesday, June 13, 2017
  • by pscheit
  • Repository
  • 1 Watchers
  • 0 Stars
  • 196 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 16 Versions
  • 1 % Grown

The README.md

testing

install with npm

npm install --save-dev webforge-testing

setup webdriver io with cucumber

tests/js/webdriverio/setup.js, (*1)

module.exports = function(that) {

  require('webforge-testing').setup(that, {
    root: [__dirname, '..', '..', '..']
  });

};

tests/js/webdriverio/step-definitions.js, (*2)

module.exports = function() {

  require('./setup')(this);

  //this.Given(....)
  //this.Then(....)

};

cucumber.bat, (*3)

@echo off

IF EXIST node_modules\webforge-testing\node_modules\.bin\wdio.cmd (
  node_modules\webforge-testing\node_modules\.bin\wdio tests\js\webdriverio\wdio.cucumber.conf.js %*
) ELSE (
  node_modules\.bin\wdio tests\js\webdriverio\wdio.cucumber.conf.js %*
)

tests/js/webdriverio/wdio.cucumber.conf.js, (*4)

var hostname = require('os').hostname();

exports.config = {
    /**
     * server configurations
     */
    host: '127.0.0.1',
    port: 4444,

    /**
     * specify test files
     */
    specs: [
        './features/*.feature'
    ],
    exclude: [
    ],

    maxInstances: 1,

    /**
     * capabilities
     */
    capabilities: [
        {
            browserName: 'phantomjs'
        }
    ],
    /*
     {
        browserName: 'chrome'
    }, {
        browserName: 'firefox'
    }
    */

    /**
     * test configurations
     */
    baseUrl: 'host-dependend',

    logLevel: 'silent',
    coloredLogs: true,
    screenshotPath: '.screenshots',
    waitforTimeout: 10000,
    framework: 'cucumber',

    reporters: ['spec'],
    reporterOptions: {
        outputDir: './reports'
    },

    cucumberOpts: {
        failFast: true,
        require: ['./tests/js/webdriverio/step-definitions.js']
    }
};

if (hostname === 'psc-laptop') {
  exports.config.baseUrl = 'http://sprotten-stories.laptop.ps-webforge.net';
} else if (hostname === 'psc-desktop') {
  exports.config.baseUrl = 'http://sprotten-stories.desktop.ps-webforge.net';
} else if (hostname === 'draco') {
  exports.config.baseUrl = 'http://staging.sprotten-stories.com';
  exports.config.reporters = ['spec', 'junit'];
  exports.config.cucumberOpts.failFast = false;
  exports.config.services = ['selenium-standalone'];
} else {
  throw new Error('configure for your host ('+hostname+') the baseUrl');
}

The Versions

13/06 2017

v1.3.0

1.3.0.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

13/06 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

13/06 2017

v1.2.5

1.2.5.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

13/06 2017

v1.2.4

1.2.4.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

13/06 2017

v1.2.3

1.2.3.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

26/01 2017

v1.2.2

1.2.2.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

05/12 2016

v1.2.1

1.2.1.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

05/12 2016

v1.1.5

1.1.5.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

01/12 2016

v1.2.0

1.2.0.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

13/11 2016

v1.1.4

1.1.4.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

19/10 2016

1.1.3

1.1.3.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

19/10 2016

1.1.2

1.1.2.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

19/10 2016

1.1.1

1.1.1.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

19/10 2016

1.1.0

1.1.0.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

28/09 2016

1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

 

by Philipp Scheit

28/09 2016

v1.0.0

1.0.0.0

  Sources   Download

MIT

by Philipp Scheit