{"id":20295410,"url":"https://github.com/prabaprakash/selenium_tips","last_synced_at":"2026-04-11T00:54:45.771Z","repository":{"id":79843530,"uuid":"116920042","full_name":"prabaprakash/Selenium_Tips","owner":"prabaprakash","description":"Nighwatch \u0026 Selenium Grid Docker","archived":false,"fork":false,"pushed_at":"2018-01-31T05:59:15.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-14T09:54:37.164Z","etag":null,"topics":["cucumber","javascript","nightwatch","nodejs","selenium"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/prabaprakash.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,"publiccode":null,"codemeta":null}},"created_at":"2018-01-10T06:54:22.000Z","updated_at":"2024-05-18T08:18:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"58a710b3-32df-4caa-9e59-001479162978","html_url":"https://github.com/prabaprakash/Selenium_Tips","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/prabaprakash%2FSelenium_Tips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prabaprakash%2FSelenium_Tips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prabaprakash%2FSelenium_Tips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prabaprakash%2FSelenium_Tips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prabaprakash","download_url":"https://codeload.github.com/prabaprakash/Selenium_Tips/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241790726,"owners_count":20020722,"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":["cucumber","javascript","nightwatch","nodejs","selenium"],"created_at":"2024-11-14T15:34:33.484Z","updated_at":"2025-12-02T06:03:37.780Z","avatar_url":"https://github.com/prabaprakash.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selenium Tips for Nightwatch Cucumber\n\n# Docker\n\nHub\n```\ndocker run -d -v /etc/localtime:/etc/localtime:ro --env GRID_BROWSER_TIMEOUT=30 -p 4445:4444 --env GRID_MAX_SESSION=5 --env GRID_CLEAN_UP_CYCLE=5000   --name selenium-hub selenium/hub:3.6.0\n```\nNode Chrome\n```\ndocker run -d -v /etc/localtime:/etc/localtime:ro --env NODE_MAX_SESSION=1 --env NODE_CLEAN_UP_CYCLE=5000    --link selenium-hub:hub selenium/node-chrome:3.6.0\n```\n# Nightwatch Cucumber Retry Failed Feature Test:\nNightwatch Cucumber does support rerun failed feature test. bcoz some feature test will be flaky, failed when running parallel threads, could be passed by running single threaded.\n\nNote: It's good to avoid flaky test. fix the falky test\n\nRerun Process:\n1. Inital Nightwatch-Cucmber Config\n```\n  \"cucumberArgs\": [\n    \"--require\",\n    \"./test/features/step_definitions\",\n    \"--require\",\n    \"./test/timeout.js\",\n    \"--format\",\n    \"pretty\",\n    \"--format\",\n    \"json:./reports/cucumber.json\",\n    \"./test/features\"\n  ]\n```\n2. npm run nightwatch // with parallell threads\n3. After completion of feature test, It will geneate a reports in ``reports\\cucmber.json`` folder. reports hold failed and passed test\n4. run extractFailedFeatureTest.js , it will genearte a failed test to file ``/test/rerun/@rerun.feature``\n5. @rerun.feature\n```\n/project-dir/test/features/login.feature:72\n/project-dir/test/features/search.feature:26\n```\n6. Nightwatch Cucmber rerun config, please run as single thread\n```\nnightwatch_config.cucumberArgs = [\n\t\"--require\",\n\t\"./test/features/step_definitions\",\n\t\"--require\",\n\t\"./test/timeout.js\",\n\t\"--format\",\n\t\"pretty\",\n\t\"--format\",\n\t\"json:./reports/cucumber.json\",\n\t\"./test/rerun\"\n];\n```\n7. If you want to retry 2 times, again go with steps 4,5,6.\n\n# Infrastruture Tips:\n\n1. 2 Core Processor - Go with 2 Parallel Threads - 4 Docker Chrome Node - 1 Hub\n```\nNote: Even if you have 16 GB doesn't matter. please go with 2 Parallel Threads\n```\nFormula\n```\nif 2 Core/ 4 GB then Go with Go with 2 Parallel Threads - 4 Docker Chrome Node - 1 Hub\n\nif 4 Core/ 6 GB then Go with Go with 4 Parallel Threads - 6 Docker Chrome Node - 1 Hub\n\nif 6 Core/ 8 GB then Go with Go with 6 Parallel Threads - 8 Docker Chrome Node - 1 Hub\n\nif 8 Core/ 10 GB then Go with Go with 8 Parallel Threads - 10 Docker Chrome Node - 1 Hub\n```\n\n# Cucumber Tips\n\n1.  Should have 10 Scenarios per Feature File\n```\nNote:\nNightwatch Cucumber Parallel Threads go by Feature Files not by Scenarios\n```\n\n```\n30 Scenarios per Feature File - having 30 Feature File\n\n1 Feature File taken 2 min\n\n4 Threads = 30 Feature Files / 4 = 7.5 = 7.5 * 2 min = 15 min\n6 Threads = 30 Feature Files / 6 = 5 = 5 * 2 min = 10 min\n8 Threads = 30 Feature Files / 8 = 3.7 = 3.7 * 2 min = 7.4 min\n```\nOptimized\n```\n10 Scenarios per Feature File - having 90 Feature File\n\n1 Feature File taken 0.66 min\n\n4 Threads = 90 Feature Files / 4 = 22.5 = (4 threads) 0.66 min + 18.25 = 12.70 min\n6 Threads = 90 Feature Files / 6 = 15 =  (6 threads) 0.66m + 9 * 0.66 min = 6.6 min\n8 Threads = 90 Feature Files / 8 = 11.25 = (8 threds) 0.66m + 3.25 * 0.66 min = 2.805 min\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprabaprakash%2Fselenium_tips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprabaprakash%2Fselenium_tips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprabaprakash%2Fselenium_tips/lists"}