{"id":15032624,"url":"https://github.com/sncf-connect-tech/soda-test-service","last_synced_at":"2025-04-09T21:23:32.689Z","repository":{"id":55865735,"uuid":"169387087","full_name":"sncf-connect-tech/soda-test-service","owner":"sncf-connect-tech","description":"A lightweight test service to follow your Selenium-Grid activity.","archived":false,"fork":false,"pushed_at":"2020-12-18T16:12:19.000Z","size":220,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-23T23:16:16.944Z","etag":null,"topics":["rustlang","selenium","selenium-grid","soda","test-service","testing"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sncf-connect-tech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-06T10:15:46.000Z","updated_at":"2024-07-19T12:55:54.000Z","dependencies_parsed_at":"2022-08-15T08:01:12.953Z","dependency_job_id":null,"html_url":"https://github.com/sncf-connect-tech/soda-test-service","commit_stats":null,"previous_names":["voyages-sncf-technologies/soda-test-service"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sncf-connect-tech%2Fsoda-test-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sncf-connect-tech%2Fsoda-test-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sncf-connect-tech%2Fsoda-test-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sncf-connect-tech%2Fsoda-test-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sncf-connect-tech","download_url":"https://codeload.github.com/sncf-connect-tech/soda-test-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248113135,"owners_count":21049788,"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":["rustlang","selenium","selenium-grid","soda","test-service","testing"],"created_at":"2024-09-24T20:18:55.493Z","updated_at":"2025-04-09T21:23:32.665Z","avatar_url":"https://github.com/sncf-connect-tech.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SODA - Test Service [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com) [![Build Status](https://travis-ci.org/voyages-sncf-technologies/soda-test-service.svg?branch=master)](https://travis-ci.org/voyages-sncf-technologies/soda-test-service) [![codecov](https://codecov.io/gh/voyages-sncf-technologies/soda-test-service/branch/master/graph/badge.svg)](https://codecov.io/gh/voyages-sncf-technologies/soda-test-service) [![crates.io](https://meritbadge.herokuapp.com/soda-test-service)](https://crates.io/crates/soda-test-service) [![Join the chat at https://gitter.im/voyages-sncf-technologies/soda-test-service](https://badges.gitter.im/voyages-sncf-technologies/soda-test-service.svg)](https://gitter.im/voyages-sncf-technologies/soda-test-service?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\r\n\r\n\u003e Plase note that the API will strongly evolve until the stable version in 1.0.0. Do not use if you're looking for a stable software.\r\n\r\nThe test service is a microservice belonging to the project Selenium On Demand Acronym. It acts like a reverse proxy in front of your Selenium hub. The test service is useful to :\r\n\r\n- Get some insights on test sessions (teams, browers, os)\r\n- Correlate test session failures to specific OS / browers\r\n- Follow the test sessions in realtime\r\n\r\n![Demo with a test session](doc/img/session-logs.gif)\r\n\r\n# Getting Started\r\n\r\nThese instructions will get you a minimal Selenium Grid with :\r\n\r\n- A Selenium hub\r\n- A test-service in front of your hub\r\n- A Selenium node Chrome (Linux)\r\n- A Selenium node Firefox (Linux)\r\n\r\n## Docker compose\r\n\r\n### By using our [docker-compose.yml](docker-compose.yml)\r\n\r\n- `docker-compose up -d`\r\n- [http://localhost:8080](http://localhost:8080)\r\n\r\n### By adding the test service to your docker compose\r\n\r\nCopy the following snippet to add the test service in your docker-compose file and customize it as you want. It's fully compatible with the official repositories of [SeleniumHQ/docker-selenium](https://github.com/SeleniumHQ/docker-selenium).\r\n\r\n\r\n```\r\ntest-service:\r\n  image: soda/test-service:0.3.1\r\n  ports:\r\n    - \"8080:8080\"\r\n  environment:\r\n    - HUB_PORT_4444_TCP_ADDR=hub\r\n    - HUB_PORT_4444_TCP_PORT=4444\r\n  networks:\r\n    - your-selenium-network\r\n```\r\n\r\nThen run your services with the following docker-compose command :\r\n\r\n```\r\n# Equivalent to docker-compose up -d test-service hub chrome firefox\r\ndocker-compose up -d\r\n```\r\n\r\nFinally access the Selenium hub through the test-service : `http://localhost:8080`\r\n\r\n# Development\r\n\r\n## Prerequisites\r\n\r\n- [Install rust](https://www.rust-lang.org/tools/install)\r\n\r\n\u003e Pro tip : when you're developing, always use [`cargo check`](https://rust-lang-nursery.github.io/edition-guide/rust-2018/cargo-and-crates-io/cargo-check-for-faster-checking.html) to avoid long build times.\r\n\u003e Then, when you are ready to test your work, use `cargo run` which will build a non-optimized binary and launch it.\r\n\r\n## Launch the Selenium grid behind the test service\r\n\r\n```bash\r\n# Launch the Selenium hub with chrome and firefox on localhost:4444\r\ndocker-compose up -d hub chrome firefox\r\n\r\n# Launch the test service on localhost:8080 and forward requests to the hub, a default client timeout is set to 60s\r\n# Arguments : \u003cLISTEN ADDR\u003e:\u003cLISTEN PORT\u003e \u003cFWD ADDR\u003e:\u003cFWD PORT\u003e \u003cDURATION_IN_SECS\u003e\r\n./soda-test-service.exe --listen=localhost:8080 --forward=localhost:4444 --timeout=300\r\n```\r\n\r\n## Tests\r\n```bash\r\ncargo test\r\n```\r\n\r\nYou can also get the code coverage with [Tarpaulin](https://crates.io/crates/cargo-tarpaulin) :\r\n\r\n```bash\r\ncargo install cargo-tarpaulin \u0026\u0026 cargo tarpaulin\r\n\r\n# You can also generate the html report\r\ncargo tarpaulin -o Html --output-dir ./report\r\n```\r\n\r\n# License\r\n\r\nThis project is licensed under either of\r\n\r\n- Apache license, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0))\r\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT))\r\n\r\nat your option.\r\n\r\n## Contribution\r\n\r\nYour contribution is welcome! You can find more information in the [CONTRIBUTING.md](CONTRIBUTING.md).\r\n\r\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsncf-connect-tech%2Fsoda-test-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsncf-connect-tech%2Fsoda-test-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsncf-connect-tech%2Fsoda-test-service/lists"}