Skip to content

captain-examples/minitest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Captain working with minitest

  1. 🧪 Ensure minitest produces JSON output

By default, minitest does not include reporters that produce enough detail for Captain. We recommend installing the minitest-reporters gem and using it to produce JUnit output.

gem install minitest-reporters
# test_helper.rb
require "minitest/reporters"

Minitest::Reporters.use!(
  [
    Minitest::Reporters::DefaultReporter.new,
    Minitest::Reporters::JUnitReporter.new("tmp/reports", true, single_file: true)
  ]
)
  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.

  - run: |
      captain run \
        --suite-id captain-examples-minitest \
        --test-results "tmp/reports/*.xml" \
        --language Ruby \
        --framework minitest \
        -- \
        bundle exec rake
    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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages