rspec_junit_formatter
knapsack_pro-ruby
rspec_junit_formatter | knapsack_pro-ruby | |
---|---|---|
1 | 2 | |
298 | 131 | |
- | 1.5% | |
0.6 | 8.4 | |
5 days ago | 4 days ago | |
Ruby | Ruby | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rspec_junit_formatter
-
How to run fast RSpec tests on CircleCI with parallel jobs and have nice JUnit XML reports in CircleCI web UI
rspec_junit_formatter - it’s a ruby gem that generates an XML report for executed tests with information about test failures. This report can be automatically read by CircleCI to present it in CircleCI web UI. No more browsing through long RSpec output - just look at highlighted failing specs in the TESTS tab :)
knapsack_pro-ruby
-
Testing Ruby on Rails on Github Actions with RSpec
name: Main on: [push] jobs: test: runs-on: ubuntu-latest # If you need DB like PostgreSQL, Redis then define service below. # https://github.com/actions/example-services/tree/master/.github/workflows services: postgres: image: postgres:10.8 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: "" POSTGRES_DB: postgres ports: - 5432:5432 # needed because the postgres container does not provide a healthcheck # tmpfs makes DB faster by using RAM options: >- --mount type=tmpfs,destination=/var/lib/postgresql/data --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 redis: image: redis ports: - 6379:6379 options: --entrypoint redis-server # https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix strategy: fail-fast: false matrix: # [n] - where the n is a number of parallel jobs you want to run your tests on. # Use a higher number if you have slow tests to split them between more parallel jobs. # Remember to update the value of the `ci_node_index` below to (0..n-1). ci_node_total: [8] # Indexes for parallel jobs (starting from zero). # E.g. use [0, 1] for 2 parallel jobs, [0, 1, 2] for 3 parallel jobs, etc. ci_node_index: [0, 1, 2, 3, 4, 5, 6, 7] env: RAILS_ENV: test GEMFILE_RUBY_VERSION: 2.7.2 PGHOST: localhost PGUSER: postgres # Rails verifies the time zone in DB is the same as the time zone of the Rails app TZ: "Europe/Warsaw" steps: - uses: actions/checkout@v2 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: # Not needed with a .ruby-version file ruby-version: 2.7 # runs 'bundle install' and caches installed gems automatically bundler-cache: true - name: Create DB run: | bin/rails db:prepare - name: Run tests env: KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }} KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }} KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }} KNAPSACK_PRO_LOG_LEVEL: info # if you use Knapsack Pro Queue Mode you must set below env variable # to be able to retry CI build and run previously recorded tests # https://github.com/KnapsackPro/knapsack_pro-ruby#knapsack_pro_fixed_queue_split-remember-queue-split-on-retry-ci-node KNAPSACK_PRO_FIXED_QUEUE_SPLIT: true # RSpec split test files by test examples feature - it's optional # https://knapsackpro.com/faq/question/how-to-split-slow-rspec-test-files-by-test-examples-by-individual-it KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES: true run: | bundle exec rake knapsack_pro:queue:rspec
-
Parallel scaling RSpec tests on Buildkite to increase CI build speed
env: # You should hide you secrets like API token # Please follow https://buildkite.com/docs/pipelines/secrets KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: "204abb31f698a6686120a40efeff31e5" # allow to run the same set of test files on job retry # https://github.com/KnapsackPro/knapsack_pro-ruby#knapsack_pro_fixed_queue_split-remember-queue-split-on-retry-ci-node KNAPSACK_PRO_FIXED_QUEUE_SPLIT: true steps: - command: "bundle exec rake knapsack_pro:queue:rspec" parallelism: 2
What are some alternatives?
Knapsack - Knapsack splits tests evenly across parallel CI nodes to run fast CI build and save you time.
setup-ruby - An action to download a prebuilt Ruby and add it to the PATH in 5 seconds
shoulda-matchers - Simple one-liner tests for common Rails functionality
Aruba - Test command-line applications with Cucumber-Ruby, RSpec or Minitest.
Spork - A DRb server for testing frameworks (RSpec / Cucumber currently) that forks before each run to ensure a clean testing state.
circleci-cli - :cyclone: CLI client / command line tool for CircleCI
email-spec - Collection of RSpec/MiniTest matchers and Cucumber steps for testing email in a ruby app using ActionMailer or Pony
mutant - Automated code reviews via mutation testing - semantic code coverage.
WebsiteOne - A website for Agile Ventures