Skip to content

captain-examples/cucumber-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Captain working with Cucumber

To configure cucumber-js such that it works with Captain, we need to:

  1. 🧪 Ensure cucumber produces json output

cucumber-js --format json:tmp/cucumber.json will produce Captain-compatible JSON output in tmp/cucumber.json. To ensure GitHub logs continue to have test output, also include a stdout-friendly formatter (for example, --format summary)

# .captain/config.yaml
test-suites:
  captain-examples-cucumber-js:
    command: cucumber-js --format json:tmp/cucumber.json --format summary
    results:
      language: JavaScript
      framework: Cucumber
      path: tmp/cucumber.json
  1. 🔐 Create an Access Token

Create an Access Token for your organization within Captain (more documentation here).

Add the new token as an action secret to your repository. Conventionally, we call this secret RWX_ACCESS_TOKEN.

  1. 💌 Install the Captain CLI, and then call it when running tests

See the full documentation on test suite integration.

- uses: rwx-research/setup-captain@v1
- run: captain run captain-examples-cucumber-js
  env:
    RWX_ACCESS_TOKEN: ${{ secrets.RWX_ACCESS_TOKEN }}
  1. 🎉 See your test results in Captain!

Take a look at the final workflow!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published