Once you install the karma-cucumberjs adapter getting it working with your project is a matter of editing your Karma config file.

###Config
The adapter requires that the files array in the karma config contain the files it will require to run your Cucumber feature suite. The adapter looks for the following files:

Cucumber reporter CSS

HTML/JS app template

feature files

karma-cucumberjs adapter

Project step definition JS files

After Karma finishes opening the browsers that you want to test against the adapter will load the HTML reporter CSS file, the app template, the feature files and the step definitions into the captured browsers.

files: [

// These are not watched because they're not expected to change.

// These are not included because they are not JavaScript files and Karma inserts

// these as <script> tags.

// These are served however, as the adapter will load them into the captured browsers.

// The cucumber-html.css file can be copied and customized, simply change the path.

// The adapter will load any file ending with '.css' into the captured browsers.

Step definitions must be written slightly different than what you may be used to with Cucumber.js.
Each set of step definitions in a JS file needs to be wrapped in a callback and added to the list of step definitions using the addStepDefinitions() function.
An example is included below that is from features/step_definitions/Testing_steps.js.

// This addStepDefinitions() function is why the step definitions must

// be configured to load after the adapter.

addStepDefinitions(function (scenario) {

// Provide a custom World constructor. It's optional, a default one is supplied.

scenario.World = function (callback) {

callback();

};

// Define your World, here is where you can add some custom utlity functions you

// want to use with your Cucumber step definitions, this is usually moved out

The app.template file should contain an HTML partial used to set up the application under test and kick off the Cucumber run.
It would typically contain some HTML markup for the app, perhaps a script tag with some JS to start up the application, and a call to startCucumberRun(), which is a global function that is added by the karma-cucumberjs adapter. The adapter will not start running tests until the function is called.
Below is the example app.template that is used to test the karma-cucumberjs adapter.

// This MUST be called once the application is ready to undergo testing.

startCucumberRun();

</script>

##grunt-karma
The adapter is compatible with grunt-karma, take a look at the Gruntfile.js for karma-cucumberjs for an example. It is very simple to use, simply configure Karma as needed using the grunt config. The karma-cucumberjs Gruntfile is a working example of using Karma for both Jasmine and Cucumber.

#Bugs
Please report any bugs and feature requests using the GitHub issue tracker.

#Contributing
First off thank you for your interest in this project. I would be more than happy to have people help the project along by contributing fixes and features. I do however ask that each pull request is kept to a single feature as much as possible to ease the merging process. Also, please provide unit tests for your changes so that I can better understand the intended changes and so that I may integrate PRs as quickly and efficiently as possible. Thank you much again and hope this project helps you as much as it helps me!