wb

wrap-bdd

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

Showing:

Popularity

Downloads/wk

0

GitHub Stars

0

Maintenance

Last Commit

6yrs ago

Contributors

2

Package

Dependencies

2

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

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

  1. Download and install nodejs
  2. Run : npm install -g yo generator-wrap-bdd cucumber
  3. Create a local folder for storing the necessary cucumber-js artifacts : mkdir bdd
  4. cd bdd
  5. 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.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial