msfeature
v0.0.2
Published
BDD feature testing for msDSL
Downloads
5
Maintainers
Readme
msfeature
Introduction
mfeature is a cucumber-js step definition library with msDSL.
Run your test with any Selenium browser: Phantomjs, Chrome, Firefox, IE
Prerequisites
- Node.js
- Selenium server with WebDriver (Selenium 2.0), see:
- Webdriver-manager
- PhantomJS Optional
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