All Projects → mycargus → Rspec Capybara Docker Grid

mycargus / Rspec Capybara Docker Grid

Licence: mit
A dockerized Selenium Grid with RSpec and Capybara

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Rspec Capybara Docker Grid

Crystalball
Regression Test Selection library for your RSpec test suite
Stars: ✭ 259 (+735.48%)
Mutual labels:  rspec
Rspec Benchmark
Performance testing matchers for RSpec
Stars: ✭ 460 (+1383.87%)
Mutual labels:  rspec
Aruba
Test command-line applications with Cucumber-Ruby, RSpec or Minitest. The most up to date documentation can be found on Cucumber.Pro (https://app.cucumber.pro/projects/aruba)
Stars: ✭ 900 (+2803.23%)
Mutual labels:  rspec
Shoulda Matchers
Simple one-liner tests for common Rails functionality
Stars: ✭ 3,166 (+10112.9%)
Mutual labels:  rspec
Autodoc
Generate documentation from your rack application & request-spec.
Stars: ✭ 366 (+1080.65%)
Mutual labels:  rspec
Rubocop Rspec
Code style checking for RSpec files
Stars: ✭ 603 (+1845.16%)
Mutual labels:  rspec
rubybookshelf
The Thoughtbot contest Winner application
Stars: ✭ 14 (-54.84%)
Mutual labels:  rspec
Fuubar
The instafailing RSpec progress bar formatter
Stars: ✭ 856 (+2661.29%)
Mutual labels:  rspec
Knapsack
Knapsack splits tests evenly across parallel CI nodes to run fast CI build and save you time.
Stars: ✭ 430 (+1287.1%)
Mutual labels:  rspec
Capybara error intel
🐛 Ruby gem for heuristic error messages in Capybara based Page Objects
Stars: ✭ 16 (-48.39%)
Mutual labels:  rspec
Infrataster
Infrastructure Behavior Testing Framework
Stars: ✭ 322 (+938.71%)
Mutual labels:  rspec
N plus one control
RSpec and Minitest matchers to prevent N+1 queries problem
Stars: ✭ 345 (+1012.9%)
Mutual labels:  rspec
Rspec Style Guide
Best practices for writing your specs!
Stars: ✭ 735 (+2270.97%)
Mutual labels:  rspec
Everydayrails Rspec 2017
Sample source for the 2017 edition of Everyday Rails Testing with RSpec.
Stars: ✭ 280 (+803.23%)
Mutual labels:  rspec
Rspec Validator spec helper
Provide dummy class for validator spec
Stars: ✭ 19 (-38.71%)
Mutual labels:  rspec
Rspec junit formatter
RSpec results that your CI can read
Stars: ✭ 255 (+722.58%)
Mutual labels:  rspec
Sinatra Template
A base Sinatra application template with DataMapper, and RSpec. Just fork and build.
Stars: ✭ 534 (+1622.58%)
Mutual labels:  rspec
Heavens door
Capybara test scenario recorder for Rails
Stars: ✭ 857 (+2664.52%)
Mutual labels:  rspec
Rails Api And Angularjs
Integration between rails and angularjs which includes rspec tests.
Stars: ✭ 22 (-29.03%)
Mutual labels:  rspec
Chefspec
Write RSpec examples and generate coverage reports for Chef recipes!
Stars: ✭ 825 (+2561.29%)
Mutual labels:  rspec

Build Status

A Dockerized Selenium Grid with RSpec and Capybara

I built this project to quickly provision a dockerized environment for running UI tests against a dockerized app. It employs a dockerized Selenium Grid which yields a far more cost-effective CI solution compared to purchasing and maintaining dedicated machines.

I've included bash scripts in the bin/ directory as wrappers for the docker-compose commands. Hopefully, once you've completed the initial setup, you won't have to recall any docker commands. 😃

Both RSpec and Capybara are automatically provisioned in the testrunner docker image. You can easily customize their configurations in spec/spec_helper.rb.

Dependencies

  • a clone of this repo on your machine
  • Docker

Setup

Here's the default workflow when writing RSpec tests in this project:

  • bin/build && bin/start && bin/test
  • make changes to files inside the spec/ directory
  • verify changes with bin/build && bin/start && bin/test

:sadtrombone:

To make your life easier, first do this:

cp docker-compose.dev.override.yml docker-compose.override.yml

Now any changes you make within this repo on your host file system will automatically show up in the testrunner docker container. Here's your new workflow:

  • bin/build && bin/start && bin/test
  • make changes to files inside the spec/ directory
  • bin/test

:party:

Some folks have reported file permission issues with this workflow, so YMMV.

Where do I add my app?

By default this project will use a bare-bones Sinatra web app as the system under test (SUT). If you want to replace that default web app with your own, open the docker-compose.yml file, find the web service configuration, and replace mycargus/hello_docker_world:master with your app's docker image label.

For example:

web:
  image: my-app-under-test:master

If you're not sure how to create or pull a docker image, I recommend working through the official Docker tutorial located on their website.

How do I execute the tests?

Start the Selenium hub, the SUT, and the Selenium browser nodes:

bin/start

Execute the tests with Rspec and Capybara from inside the testrunner container:

bin/test

When you're done, stop and remove the docker containers:

bin/stop

I want to see the app under test. How can I do that?

If you're using the default web app provided, then open your browser and go to http://locahost:8080.

If you're using your own web app, make sure to expose a port in your web app's Dockerfile. For example, if you have EXPOSE 9887 in your web app's Dockerfile, then you can view it at http://localhost:9887.

Can I view the Selenium grid console?

Yep! After having started the Selenium hub and nodes (bin/start), open a browser and go to http://localhost:4444, then click the 'console' link.

A test is failing. How do I debug it?

Start the Selenium hub, the app under test, and the Selenium debug browser nodes:

bin/start-debug

View the chrome debug node via VNC (password: secret):

open vnc://localhost:5900

View the firefox debug node via VNC (password: secret):

open vnc://localhost:5901

Next execute the tests against the browser nodes and watch them run in the VNC window(s):

bin/test

Again, once you're finished:

bin/stop
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].