ColdCukes
ColdCukes is a ColdFusion/CFML project that parses Gherkin Feature files and creates associated TestBox BDD Unit Test files
Diagram
Requirements
- only verified on Adobe CF 10
- only verified on Window 7
- tested with TestBox 2.2, which is required to run the generated tests
Installation
- Clone this repo locally to your web root
- Run it locally from http://localhost/ColdCukes - you should be able to push the button and run it with no changes
- It should output which TestBox files were generated. You can look at them to see the magic. NOTE that if the test files were already there, it will seem like nothing changed
Usage
- see index.cfm
- If TestBox is set up locally, you can run any Unit Tests in the /tests/specs directory at http://localhost/ColdCukes-public/tests/runner.cfm
- Move/copy/merge stub files from /tests/stubs to /tests/specs in order to run them via the runner above
- Add new directories with new Gherkin *.feature files in /testData, and run http://localhost/ColdCukes again, to create new Unit Test stub files
Gherkin Feature Files
TestBox BDD/Gherkin Test Files
- Resulting files are in this basic format, depending on the *.feature files: https://github.com/Ortus-Solutions/TestBox/blob/master/tests/specs/GivenWhenThenTest.cfc
TODO List
- Code reviews/suggestions welcome
- Ability to parse more complex Gherkin feature files (NOTE: it doesn't even handle AND steps yet)
- Ability to add more complex TestBox test stub files?
- Ability to choose other config options like tab characters and directory filters?
- Test in Lucee
- Test in Railo
- Test in Adobe ColdFusion 8-9, and 11
- Test on Linux
- Text on Mac
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
History
- Version: Alpha 0.001 -- 2016-01-26
- Version: Alpha 0.002 -- 2016-01-27
Credits
- Aaron Longnion
- Fidano
- TestBox from the ColdBox team
- Cucumber/Gherkin - https://github.com/cucumber/gherkin
License
MIT License: https://github.com/Fidano/ColdCukes/blob/master/LICENSE