Monitor your specs runtime.
🍊 Battle-tested at Instacart
Add this line to your application’s Gemfile:
gem 'specmon'
Run:
rails g specmon:install
rake db:migrate
And mount the dashboard in your config/routes.rb
:
mount Specmon::Engine, at: "specmon"
Add to assets/javascript/application.js
//= require specmon/application
Add to assets/stylesheet/application.scss
*= require specmon/application
Specmon supports multiple projects 🎉
Add additional projects in config/specmon.yml
:
projects:
project-1-master:
url: <%= ENV["SPECMON_DATABASE_URL"] %>
name: <%= ENV["PROJECT_1_CIRCLE_NAME"] %>
username: <%= ENV["PROJECT_1_CIRCLE_USERNAME"] %>
token: <%= ENV["PROJECT_1_CIRCLE_TOKEN"] %>
branch: master
show_owners: true
adapter: circleci
project-2-master:
url: <%= ENV["SPECMON_DATABASE_URL"] %>
name: <%= ENV["PROJECT_2_CIRCLE_NAME"] %>
username: <%= ENV["PROJECT_2_CIRCLE_USERNAME"] %>
token: <%= ENV["PROJECT_2_CIRCLE_TOKEN"] %>
branch: master
show_owners: false
adapter: circleci
# change the time zone
# time_zone: "Pacific Time (US & Canada)"
Specmon supports CircleCI
Override test section in your circle.yml
file to generate a rspec.xml
file
test:
override:
- bundle exec rspec --backtrace --color --profile --format documentation --format RspecJunitFormatter --out $CIRCLE_TEST_REPORTS/rspec.xml
And in your Gemfile
group :test do
gem 'rspec_junit_formatter', github: 'instacart/rspec_junit_formatter'
end
By using show_owners
and instacart/rspec_junit_formatter
, you can assign a owner
to your spec and display runtime per owner
.
describe 'team1', owner: :team1 do
it 'It success' do
expect(true).to eq(true)
end
end
You can fetch data from circle by adding in your cron
file:
*/5 * * * * rake specmon:project-1-master:recent_builds
*/5 * * * * rake specmon:project-2-master:recent_builds
Specmon uses a number of awesome, open source projects.
Created by rahilsondhi and kwent
That’s awesome! Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features