{"id":31588647,"url":"https://github.com/gregoryandrikopoulos/regnat","last_synced_at":"2026-04-15T10:34:14.818Z","repository":{"id":281013146,"uuid":"942718180","full_name":"gregoryAndrikopoulos/Regnat","owner":"gregoryAndrikopoulos","description":"WebdriverIO + Axios test automation framework with Selenium Grid (Docker), Mocha, Allure, and GitHub Actions CI/CD. A complete boilerplate for cross-browser UI and API testing.","archived":false,"fork":false,"pushed_at":"2025-10-05T01:21:47.000Z","size":1555,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T03:40:10.244Z","etag":null,"topics":["allure","automation","axios","cross-browser-testing","docker","dotenv","e2e-test","eslint","faker-js","github-actions","github-secrets","javascript","mocha","prettier","selenium-grid","smoke-test","visual-regression-testing","webdriverio"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregoryAndrikopoulos.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-04T15:03:48.000Z","updated_at":"2025-10-05T01:21:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"3952d881-e70d-4b55-b3a7-6ee918fa5a4f","html_url":"https://github.com/gregoryAndrikopoulos/Regnat","commit_stats":null,"previous_names":["gregoryandrikopoulos/webdriverio-mocha-suite","gregoryandrikopoulos/automationexercise-wdio-tests","gregoryandrikopoulos/regnat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gregoryAndrikopoulos/Regnat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregoryAndrikopoulos%2FRegnat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregoryAndrikopoulos%2FRegnat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregoryAndrikopoulos%2FRegnat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregoryAndrikopoulos%2FRegnat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregoryAndrikopoulos","download_url":"https://codeload.github.com/gregoryAndrikopoulos/Regnat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregoryAndrikopoulos%2FRegnat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278547821,"owners_count":26004775,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["allure","automation","axios","cross-browser-testing","docker","dotenv","e2e-test","eslint","faker-js","github-actions","github-secrets","javascript","mocha","prettier","selenium-grid","smoke-test","visual-regression-testing","webdriverio"],"created_at":"2025-10-06T02:11:57.212Z","updated_at":"2025-10-06T02:12:15.556Z","avatar_url":"https://github.com/gregoryAndrikopoulos.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Regnat\n\n\u003e Structured WebdriverIO v9 + Axios setup for reliable **UI** and **API** testing.\n\nProvides a clean, maintainable foundation for scalable automation, with support\nfor Selenium Grid, Docker, CI pipelines, **Allure reporting**, and **visual\nregression checks**.\n\n---\n\n## Website Under Test\n\nRegnat is designed to test any modern web application.  \nFor demonstration purposes, it is configured to run against\n[Automation Exercise](https://www.automationexercise.com/).\n\n---\n\n## Workflow Status\n\n[![E2E Tests](https://github.com/gregoryAndrikopoulos/regnat/actions/workflows/e2e_test.yml/badge.svg)](https://github.com/gregoryAndrikopoulos/regnat/actions/workflows/e2e_test.yml)\n[![API Tests](https://github.com/gregoryAndrikopoulos/regnat/actions/workflows/api_test.yml/badge.svg)](https://github.com/gregoryAndrikopoulos/regnat/actions/workflows/api_test.yml)\n[![Smoke Test](https://github.com/gregoryAndrikopoulos/regnat/actions/workflows/smoke_test.yml/badge.svg)](https://github.com/gregoryAndrikopoulos/regnat/actions/workflows/smoke_test.yml)\n[![SCA](https://github.com/gregoryAndrikopoulos/regnat/actions/workflows/sca.yml/badge.svg)](https://github.com/gregoryAndrikopoulos/regnat/actions/workflows/sca.yml)\n[![SAST](https://github.com/gregoryAndrikopoulos/regnat/actions/workflows/sast.yml/badge.svg)](https://github.com/gregoryAndrikopoulos/regnat/actions/workflows/sast.yml)\n\n---\n\n## Technologies Used\n\n- **WebdriverIO v9** — automation testing framework\n- **Mocha** — test framework for writing and executing tests\n- **Axios** — HTTP client for API testing\n- **Node.js** — JavaScript runtime environment\n- **Selenium Grid 4 (via Docker)** — browser execution in isolated containers\n- **Allure** — advanced reporting (screenshots and console logs)\n- **Pixelmatch + pngjs** — image diffing stack used for visual regression\n- **GitHub Actions** — continuous integration and automated test runs\n- **dotenv** — local environment variable management\n- **GitHub Secrets** — secure storage for CI credentials\n- **faker.js** — random but reproducible test data generation\n- **Dependabot** — automated dependency update PRs (weekly)\n- **Trivy** — SCA for filesystem/dependencies and Docker images\n- **Semgrep** — SAST for JS/TS with OWASP Top 10 rules\n\n### Developer Tooling\n\n- **ESLint** — linting\n- **Prettier** — formatting\n- **asdf** — runtime version manager (pins Node \u0026 pnpm versions per project)\n\n---\n\n## Runtime Versions (Node \u0026 pnpm)\n\nThis repository pins tool versions via **asdf** in `.tool-versions`:\n\n```txt\nnodejs 24.7.0\npnpm 10.15.1\n```\n\n**Setup**\n\n```bash\nasdf install\nasdf current\nnode -v \u0026\u0026 pnpm -v\n```\n\n**Change versions locally**\n\n```bash\nasdf install nodejs \u003cnew\u003e \u0026\u0026 asdf local nodejs \u003cnew\u003e\nasdf install pnpm \u003cnew\u003e   \u0026\u0026 asdf local pnpm \u003cnew\u003e\nasdf reshim\n```\n\n**CI note:** GitHub Actions uses **asdf** and reads **`.tool-versions`** for both **Node** and **pnpm**. Keep **`.tool-versions`** in sync with\n`package.json`’s `\"packageManager\"` (e.g., `pnpm@10.15.1`). Corepack isn’t used in CI.\n\n**Version sync:** `package.json` sets `\"packageManager\": \"pnpm@10.15.1\"`. Keep this in sync with **`.tool-versions`** and the\nversions listed above.\n\n---\n\n## Environment \u0026 Secrets\n\n### Local (.env)\n\nCreate a `.env` at the repository root (do **not** commit it). Example:\n\n```ini\nTEST_USER_EMAIL_1=\nTEST_USER_PASSWORD_1=\n```\n\n### CI (GitHub Actions)\n\nCreate repository **Secrets** with the same names used locally:\n\n- `TEST_USER_EMAIL_1`, `TEST_USER_PASSWORD_1`\n\n### Additional credential sets\n\nThe codebase supports extra sets (`_2`, `_3`, …) via `getCredentials(setNumber)`. To add more:\n\n1. Add the new variables to `.env` (e.g., `TEST_USER_EMAIL_2`, `TEST_USER_PASSWORD_2`).\n2. Create matching **GitHub Secrets**.\n3. Update the relevant workflow(s) to pass those secrets into the job environment.\n\n### Site-Specific Note (display name)\n\nThe suite targets **Automation Exercise**, which shows a display name after\nlogin.\n\n\u003e Sign-up flow detail: Automation Exercise first prompts for **Name** and\n\u003e **Email Address** before creating an account.\n\n### Faker-based test data\n\nFor specs that create **throwaway accounts or inputs** the suite uses **[faker.js](https://fakerjs.dev/)**.  \nThis ensures:\n\n- Each run generates unique, realistic values (emails, names, addresses, passwords).\n- CI runs remain deterministic when seeded via `FAKER_SEED`.\n\nExample seeding:\n\n```bash\nexport FAKER_SEED=12345\npnpm test:e2e\n```\n\nThis guarantees the same fake data across reruns, useful for debugging failures.\n\n### Security\n\n- Never commit `.env` or print raw secrets in logs.\n- Rotate real credentials if leaked or shared beyond CI.\n\n---\n\n## Installation and Setup\n\n### Prerequisites\n\n- **asdf** (version manager)\n- **Docker Desktop** (with Compose)\n\n\u003e This repository pins tool versions in **`.tool-versions`** (Node **24.7.0**,\n\u003e pnpm **10.15.1**).\n\n### Install toolchain \u0026 dependencies (recommended)\n\n```bash\nasdf install                # installs node \u0026 pnpm from .tool-versions\nnode -v \u0026\u0026 pnpm -v          # verify\npnpm install                # project deps\n```\n\n### Without asdf\n\nInstall matching versions manually:\n\n- **Node.js 24.x** (any installer)\n- **pnpm 10.15.x**\n  ```bash\n  npm install -g pnpm@10.15.1\n  pnpm -v\n  ```\n\n---\n\n## Running Tests\n\n### Run test infrastructure (Docker)\n\nStart Selenium Grid + nodes:\n\n```bash\n# Chrome-only (default; fastest)\npnpm infra:up\n\n# Cross-browser nodes (Firefox + Edge + Chrome)\npnpm infra:cross:up    # equivalent to: COMPOSE_PROFILES=smoke pnpm infra:up\n```\n\nGrid UI: \u003chttp://localhost:4444/ui\u003e\n\nLive logs (optional):\n\n```bash\npnpm infra:logs\n```\n\nStop infrastructure:\n\n```bash\npnpm infra:down         # or: pnpm infra:cross:down\n```\n\nInfrastructure status (hub ready?):\n\n```bash\npnpm infra:status\n```\n\n\u003e **Compose profiles**\n\u003e\n\u003e - The `chrome` node is always available.\n\u003e - `firefox` and `edge` nodes start only when the **`smoke`** profile is\n\u003e   enabled (via `infra:cross:up`) or when `COMPOSE_PROFILES` is provided.\n\n---\n\n### Run tests locally\n\n**E2E (Chrome-only):**\n\n```bash\npnpm test:e2e\n```\n\n**Smoke (cross-browser):**\n\n```bash\n# Run all browsers in one invocation (default: chrome,firefox,edge)\npnpm infra:cross:up\npnpm test:smoke\n```\n\n**API Tests (Axios + Mocha):**\n\nAPI specs live under `test-api/specs/` and target the public  \n[Automation Exercise APIs](https://automationexercise.com/api).\n\nRun locally:\n\n```bash\npnpm test:api\n```\n\nJUnit results are written to:\n\n```\nreports/junit/api/api-junit.xml\n```\n\n---\n\n### Run tests in CI (GitHub Actions)\n\n- **E2E Test**: Chrome-only, parallelized across specs for speed on pull requests.\n- **API Test**: Axios-based API tests on pull requests.\n- **Cross-browser Smoke Test**: One job brings up Grid with the `smoke` profile\n  and runs the smoke suite **sequentially across browsers in a single\n  invocation** (to keep artifacts and reporting consolidated).\n\nManual dispatch:\n\n- Open **Actions**.\n- Select **E2E Test**, **API Test**, or **Cross-browser Smoke Test**.\n- Choose a branch and click **Run workflow**.\n\n---\n\n## Reports\n\n### Allure (local, UI only)\n\nLocal test runs write raw results to:\n\n- `reports/allure/allure-results/` (local)\n- In CI, results are at repo root: `allure-results/` (so the runner can upload\n  them).\n\nGenerate and open locally:\n\n```bash\npnpm report:allure:open:local\n```\n\nThis generates HTML in `reports/allure/allure-report/` and opens it.\n\n### Allure (CI, UI only)\n\nAfter a CI run, download the **`allure`** artifact. When unzipped to\n`~/Downloads/allure/`, it contains:\n\n- `allure-report/` → generated HTML report (standalone)\n\nOpen the report locally:\n\n```bash\npnpm report:allure:open:ci\n```\n\nDefault path is `~/Downloads/allure/allure-report`. Override with `ALLURE_PATH`\nif needed:\n\n```bash\nALLURE_PATH=\"/custom/path/allure-report\" pnpm report:allure:open:ci\n```\n\n### JUnit\n\n- **UI Tests (E2E/Smoke)**  \n  JUnit XML stored under `reports/junit/e2e/` or `reports/junit/smoke/`.\n\n- **API Tests**  \n  JUnit XML stored under `reports/junit/api/api-junit.xml`.\n\n---\n\n## Visual Regression (UI only)\n\n- The suite captures visual snapshots and compares them to committed baselines.\n- On differences, the test fails and Allure shows baseline / actual / diff.\n- Locally, missing baselines are auto-seeded; in CI, baselines must already\n  exist.\n\n---\n\n## Integration Steps\n\nRegnat can be used as a starting point for test automation in any project.  \nTo integrate into an existing repository:\n\n1. **Separate application and test logic**\n   - Place application code under `your_repo/src/` (or equivalent).\n   - Create a dedicated test directory `your_repo/test/`.\n\n2. **Copy framework directories**  \n   Move the following from Regnat into `your_repo/test/`:\n   - `test-api/`\n   - `test-support/`\n   - `test-ui/`\n\n3. **Delete Automation Exercise–specific components**\n   - Remove all example **page-object files** (UI).\n   - Delete provided **spec files** (UI and API).\n   - Clean out **utils** tied to the demo app such as:\n     - `accountHelpers.js`\n     - `testConstants.js` (UI)\n     - `test-api/testConstants.js` (API)\n   - Remove provided **Axios API specs** in `test-api/specs/`.\n\n   This creates a clean slate for building page objects and specs specific to the target application.\n\n4. **Align dependencies and scripts**\n   - Copy relevant `devDependencies` and `scripts` from Regnat’s `package.json` into the repository’s `package.json`.\n   - Ensure Node.js and pnpm versions are aligned.  \n     Regnat uses `.tool-versions` (asdf) together with `packageManager` in `package.json` to enforce this, but any equivalent mechanism can be used (e.g., `engines`, nvm, Volta, or Corepack).\n   - Adjust version pinning to match the conventions of the host repository.\n\n5. **Tailor configurations**\n   - Update paths if the test directory differs from `Regnat/`.\n   - Adjust workflow YAML files under `.github/workflows/` to match branch names and CI requirements.\n   - Rename environment variables as needed (see `.env` / `envCredentials.js`).\n\n6. **Validate infrastructure**\n   - Run `pnpm infra:up` to confirm Selenium Grid is operational.\n   - Execute `pnpm test:e2e` to verify specs run end-to-end.\n\nOnce integrated, the suite can be expanded with:\n\n- **App-specific page objects and specs**\n- **Custom utilities** in `support/utils/`\n- **New workflows** calling the reusable runner\n\n---\n\n## License\n\nThis project is licensed under the ISC License — see the\n[LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregoryandrikopoulos%2Fregnat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregoryandrikopoulos%2Fregnat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregoryandrikopoulos%2Fregnat/lists"}