msfeature

0.0.2 • Public • Published

msfeature

Cukes

NPM Version Build Status

Introduction

mfeature is a cucumber-js step definition library with msDSL.

Run your test with any Selenium browser: Phantomjs, Chrome, Firefox, IE

Prerequisites

Quick start

$ mkdir mytest && cd mytest
$ npm init
$ npm install chai chai-as-promised webdriver-manager cucumber --save
$ npm install msfeature --save

Launch a Selenium server (if one is not running)

$ webdriver-manager start

Create feature file structure

$ mkdir features && mkdir features/support

Create feature/support/msfeatureconf.js file

var mink = require('msfeature');
 
var parameters = {
  driver: {
    baseUrl: 'https://www.npmjs.com',
    logLevel: 'silent',
    desiredCapabilities: {
      browserName: 'chrome'
    },
    host: 'localhost',
    port: 4444
  }
};
 
module.exports = function () {
  mink.init(this, parameters);
};

Create feature/test.feature file

# features/test.feature
Feature: I can use msfeature to check the content of my website
 
  Background:
    Given I am on "https://www.npmjs.com/package/msfeature"
 
  Scenario: Check Homepage content
    When  I wait 3 seconds
    Then  I should see "msfeature" in the "a" element

Run your tests

$ cucumber-js --require features/support/msfeatureconf.js

Package Sidebar

Install

npm i msfeature

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • ctrees