Skip to content

dtaniwaki/e2e-tester

Repository files navigation

e2e-tester

Dependency Status Build Status Coverage Status Code Climate Gratipay

End-to-end test across the browsers.

Requirement

Optional

Usage

bundle install
npm install
bundle exec rake bower:install
bundle exec puma -C config/puma.rb -d
bundle exec sidekiq -C config/sidekiq.yml -d
open http://localhost:3000/

The followings are optional, but make you happier with this application.

Public API

E2E Tester provides public API to automate your e2e test.

Browserstack

You can use the browsers of Browserstack through WebDriver.

As environment variables,

BROWSERSTACK_USERNAME=foo
BROWSERSTACK_PASSWORD=bar

Or in config/settings.local.yml,

browserstack:
  username: foo
  password: bar

Then, run the rake task to update the browsers.

bundle exec rake browser:update:browserstack

ActiveAdmin

To use ActiveAdmin for this application, you need to create admin user to sign in.

AdminUser.create!(name: 'Your Name', email: 'foo@example.com', password: 'password', password_confirmation: 'password')

Then, open the admin console in your browser and sign in as the user.

open http://localhost:3000/admin/

Run in Docker

You can try the e2e tester without any settings with docker-compose.

cp .docker_env.sample .docker_env
docker-compose up
open http://$(docker-machine ip $machine):3000

You can use .docker_env to set environment variables which you don't want to expose.

Test

To run rspec, rubocop and brakeman in order,

bundle exec rake

rspec

bundle exec rspec
open coverage/index.html # The test coverage will be collected automatically.

rubocop

Run rubocop for the code regulation

bundle exec rubocop -D
bundle exec rubocop -D --auto-correct # To correct them automatically as much as possible

brakeman

Run brakeman for static vulnerability scan.

bundle exec brakeman

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2014 Daisuke Taniwaki. See LICENSE for details.

About

Open source End-to-End test service

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published