{"id":21169714,"url":"https://github.com/sadabnepal/webdriverio-ts-mocha","last_synced_at":"2025-06-17T05:02:51.828Z","repository":{"id":44117437,"uuid":"347587122","full_name":"sadabnepal/webdriverio-ts-mocha","owner":"sadabnepal","description":"Mocha framework using WebdriverO, TypeScript, Allure Report, Report Portal, Github Actions to test Automation Practice application","archived":false,"fork":false,"pushed_at":"2024-04-21T08:15:19.000Z","size":694,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-22T05:30:11.618Z","etag":null,"topics":["mocha-framework","mochawesome","page-object-pattern","report-portal","test-automation-framework","typescript","wdio","webdriverio","webdriverio-boilerplate-framework"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sadabnepal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-03-14T08:52:46.000Z","updated_at":"2024-04-23T12:43:51.420Z","dependencies_parsed_at":"2024-04-23T12:43:45.004Z","dependency_job_id":"dc28ca65-c391-4595-8cc5-484eacc51dd8","html_url":"https://github.com/sadabnepal/webdriverio-ts-mocha","commit_stats":null,"previous_names":["sadabnepal/webdriverio-ts-mocha"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sadabnepal/webdriverio-ts-mocha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sadabnepal%2Fwebdriverio-ts-mocha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sadabnepal%2Fwebdriverio-ts-mocha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sadabnepal%2Fwebdriverio-ts-mocha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sadabnepal%2Fwebdriverio-ts-mocha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sadabnepal","download_url":"https://codeload.github.com/sadabnepal/webdriverio-ts-mocha/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sadabnepal%2Fwebdriverio-ts-mocha/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260294442,"owners_count":22987620,"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":["mocha-framework","mochawesome","page-object-pattern","report-portal","test-automation-framework","typescript","wdio","webdriverio","webdriverio-boilerplate-framework"],"created_at":"2024-11-20T15:53:21.654Z","updated_at":"2025-06-17T05:02:51.808Z","avatar_url":"https://github.com/sadabnepal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebdriverIO TypeScript Mocha Framework\n\nThis is a sample project that uses WebdriverIO and TypeScript. It includes examples of the PageObject pattern and some practical examples for using WebdriverIO for cross browser and parallel run. testing inside container, report portal integration.\n\n### Requirements\n\n[![NodeJs](https://img.shields.io/badge/-NodeJS-white?logo=node.js)](https://nodejs.org/en/download/)\n[![VSCode](https://img.shields.io/badge/-Visual%20Studio%20Code-%233178C6?logo=visual-studio-code)](https://code.visualstudio.com/download)\n\n### Getting Started\n\nClone Repository\n\n```bash\ngit clone https://github.com/sadabnepal/webdriverio-ts-mocha.git\ncd webdriverio-ts-mocha\n```\n\nInstall packages:\n\n```bash\nnpm install\n```\n\nRun tests:\n\n```bash\nnpm run test            [ test in chrome ]\nnpm run test:edge       [ test in edge ]\nnpm run cross:browser   [ test in chrome and edge ]\n```\n\nDocker Run:\n\n```bash\nnpm run docker:start    [ start the docker container ]\nnpm run docker:stop     [ stop the docker container ]\n\nnpm run test:docker     [ test in docker container ]\n\n# TODO: arm yml not found\nnpm run docker:start:arm    [ start the docker container for mac m1 chip ]\nnpm run docker:stop:arm     [ stop the docker container for mac m1 chip ]\n```\nopen http://localhost:4444/ to check if server is running\n\nGenerate report with historical data:\n```bash\nnpm run move\nnpm run report\n```\n### Sample Report\n![allure_report](./images/allureHome.png)\n\nGenerate offline html report:\n```bash\nnpm run report:html\n```\n\nCleanup Report folder\n\n```bash\nnpm run cleanup\n```\n### Github Action Workflow\n![docker_run](./images/githubRun.png)\n\n### BrowserStack Integration\n- Follow [Browser Stack Integration Getting Started](https://automate.browserstack.com/dashboard/v2/quick-start/get-started) document\n- Note down `BROWSERSTACK_USERNAME` and `BROWSERSTACK_ACCESS_KEY` from profile section\n- Paste value in .env for above copied content. Refer `.env.example` file\n- Run `npm run test:bs` command to execute test in browser stack\n\n![browser_stack](./images/browserStackDashboard.png)\n\n### Report Portal Integration\n- Setup: follow https://reportportal.io/installation\n- Login: Open http://localhost:8080/ and login with time user `superadmin` and password `erebus`\n- Generate API key:\n    - Click on bottom left of logged in user --\u003e click on `Profile`\n    - Click on `API KEYS` --\u003e `Generate API Key` --\u003e copy the generated key\n    - Create `.env` file in root project folder. Refer `.env.example` file\n    - Paste your API key into `.env` file as `REPORT_PORTAL_KEY=\u003cyour api key\u003e`\n- Enter `REPORT_PORTAL_PROJECT=\u003cproject_assignment\u003e` into `.env`. Value can be found on `PROJECT ASSIGNMENT` tab of user profile\n- Other details are updated in `tests/config/wdio.reportPortal.ts` file\n- add `REPORT_PORTAL_SWITCH=ON` to push results to report portal\n\n![docker_run](./images/reportPortal.png)\n\n### Key Features\n- Custom types for web elements\n- Parallel execution and Cross browser testing\n- Docker for testing against/using containerization\n- Github actions CI/CD integration\n- Report portal integration\n- BrowserStack Integration\n- dotenv to store secrets locally\n- eslint linting tools integrated\n- husky git hooks for pre-commit checks (eslint)\n\n### Folder Structure\n\n```ini\n├───.github\n├───.husky\n├───.vscode\n├───images\n├───tests\n|    ├───config\n|    ├───docker\n|    ├───pages\n|    ├───resources\n|    ├───specs\n|    ├───static\n|    └───types\n├───.env\n├───.env.example\n├───.eslintrc.js\n├───.gitignore\n├───docker-compose.yml\n├───package-lock.json\n├───package.json\n├───README.md\n└───tsconfig.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsadabnepal%2Fwebdriverio-ts-mocha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsadabnepal%2Fwebdriverio-ts-mocha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsadabnepal%2Fwebdriverio-ts-mocha/lists"}