{"id":18548748,"url":"https://github.com/mycargus/watir-docker-grid","last_synced_at":"2025-04-09T21:32:20.346Z","repository":{"id":53565572,"uuid":"80026842","full_name":"mycargus/watir-docker-grid","owner":"mycargus","description":"A dockerized Selenium Grid with RSpec and Watir","archived":false,"fork":false,"pushed_at":"2021-03-24T06:38:24.000Z","size":41,"stargazers_count":7,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T11:56:52.909Z","etag":null,"topics":["docker","rspec","selenium-grid","watir"],"latest_commit_sha":null,"homepage":"https://github.com/mycargus/watir-docker-grid","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mycargus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-25T15:23:30.000Z","updated_at":"2023-03-05T05:29:09.000Z","dependencies_parsed_at":"2022-08-29T17:02:52.234Z","dependency_job_id":null,"html_url":"https://github.com/mycargus/watir-docker-grid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mycargus%2Fwatir-docker-grid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mycargus%2Fwatir-docker-grid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mycargus%2Fwatir-docker-grid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mycargus%2Fwatir-docker-grid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mycargus","download_url":"https://codeload.github.com/mycargus/watir-docker-grid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248114818,"owners_count":21050122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","rspec","selenium-grid","watir"],"created_at":"2024-11-06T20:35:31.963Z","updated_at":"2025-04-09T21:32:19.868Z","avatar_url":"https://github.com/mycargus.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/mycargus/watir-docker-grid.svg?branch=master)](https://travis-ci.com/mycargus/watir-docker-grid)\n\n# A Dockerized Selenium Grid with RSpec and Watir\n\nI built this project to quickly provision a dockerized environment for running\nUI tests against a dockerized app. It employs a dockerized [Selenium Grid]\nwhich yields a far more cost-effective CI solution compared to purchasing and\nmaintaining dedicated machines.\n\nI've included bash scripts in the `bin/` directory as wrappers for the\n`docker-compose` commands. Hopefully, once you've completed the initial setup,\nyou won't have to recall any docker commands. :smiley:\n\nBoth RSpec and Watir are automatically provisioned in the `testrunner` docker\nimage. You can easily customize their configurations in `spec/spec_helper.rb`.\n\n## Dependencies\n\n- a clone of this repo on your machine\n- [Docker]\n\n## Setup\n\nHere's the default workflow when writing RSpec tests in this project:\n\n- `bin/build \u0026\u0026 bin/start \u0026\u0026 bin/test`\n- make changes to files inside the spec/ directory\n- verify changes with `bin/build \u0026\u0026 bin/start \u0026\u0026 bin/test`\n\n:sadtrombone:\n\nTo make your life easier, first do this:\n\n```bash\ncp docker-compose.dev.override.yml docker-compose.override.yml\n```\n\nNow any changes you make within this repo on your host file system will\nautomatically show up in the `testrunner` docker container. Here's your new\nworkflow:\n\n- `bin/build \u0026\u0026 bin/start \u0026\u0026 bin/test`\n- make changes to files inside the spec/ directory\n- `bin/test`\n\n:party:\n\nSome folks have reported file permission issues with this workflow, so YMMV.\n\n### Where do I add my app?\n\nBy default this project will use a bare-bones Sinatra web [app] as the system\nunder test (SUT). If you want to replace that default web app with your own,\nopen the `docker-compose.yml` file, find the `web` service configuration, and\nreplace `mycargus/hello_docker_world:master` with your app's docker image label.\n\nFor example:\n\n```yaml\nweb:\n  image: my-app-under-test:master\n```\n\nIf you're not sure how to create or pull a docker image, I recommend working\nthrough the official Docker tutorial located on their website.\n\n## How do I execute the tests?\n\nStart the Selenium hub, the SUT, and the Selenium browser nodes:\n\n```sh\n$ bin/start\n```\n\nExecute the tests with Rspec and Watir from inside the `testrunner` container:\n\n```sh\n$ bin/test\n```\n\nWhen you're done, stop and remove the docker containers:\n\n```sh\n$ bin/stop\n```\n\n## I want to see the app under test. How can I do that?\n\nIf you're using the default web app provided, then open your browser and go to\n\u003chttp://locahost:8080\u003e.\n\nIf you're using your own web app, make sure to expose a port in your web app's\nDockerfile. For example, if you have `EXPOSE 9887` in your web app's Dockerfile,\nthen you can view it at \u003chttp://localhost:9887\u003e.\n\n## Can I view the Selenium grid console?\n\nYep! After having started the Selenium hub and nodes (`bin/start`), open a\nbrowser and go to \u003chttp://localhost:4444\u003e, then click the 'console' link.\n\n## A test is failing. How do I debug it?\n\nStart the Selenium hub, the app under test, and the Selenium _debug_ browser\nnodes:\n\n```bash\nbin/start-debug\n```\n\nView the chrome debug node via VNC (password: `secret`):\n\n```bash\nopen vnc://localhost:5900\n```\n\nView the firefox debug node via VNC (password: `secret`):\n\n```bash\nopen vnc://localhost:5901\n```\n\nNext execute the tests against the browser nodes and watch them run in the VNC\nwindow(s):\n\n```bash\nbin/test\n```\n\nAgain, once you're finished:\n\n```bash\nbin/stop\n```\n\n[app]: https://github.com/mycargus/hello_docker_world\n[docker]: https://docs.docker.com/\n[selenium grid]: https://github.com/SeleniumHQ/docker-selenium\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmycargus%2Fwatir-docker-grid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmycargus%2Fwatir-docker-grid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmycargus%2Fwatir-docker-grid/lists"}