New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

wrap-bdd

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wrap-bdd

a behavior driven development framework for test complete projects and any other testing projects

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

wrapping-BDD

This repository contains code which allows cucumber-js BDD framework to be wrapped around a testing tool by means of a custom driver.

Install instructions

  • Download and install nodejs
  • Run : npm install -g yo generator-wrap-bdd cucumber
  • Create a local folder for storing the necessary cucumber-js artifacts : mkdir bdd
  • cd bdd
  • yo wrap-bdd

Collaborator instructions

All source is written using coffee script. In the command prompt of root directory use the following to quickly compile all coffee script source: coffee --compile --output lib/ src/

To wrap cucumber-js BDD with any testing tool, a testtoolfactory.coffee is provided to return an appropriate instance of the test tool driver. When writing the test tool driver, the only two criteria are that the test driver expose a testResult method and test driver emit a testResult event. The testResult method accepts a callback function with a boolean parameter. The 'testResult' event should be emitted when the testing tool has finished and returned result. Following are sample blocks where you will need to make changes when introducing a new test driver:

testtoolfactory.coffee:


createObject: (paramObj) ->
		switch process.env.oletesttool
			when 'TestComplete'
				new tc paramObj
			when 'TestExecute'
				new te paramObj
			else
				throw new TypeError 'Invalid/Unsupported Testing tool. Fix: set oletesttool=TestComplete'

customdriver.coffee


module.exports = class tcdriver extends EventEmitter
	constructor: (paramObj,tool) ->
    		# do something and maybe you want to emit the 'testResult' event here
	testresult: (cb)->	
		cb @result
		return

Test scripts

Still need to work on this.

FAQs

Package last updated on 19 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts