{"id":21173902,"url":"https://github.com/simple-automation-testing/webdriverio-parallel-retrier","last_synced_at":"2025-07-30T06:11:38.465Z","repository":{"id":143844663,"uuid":"293558482","full_name":"Simple-Automation-Testing/webdriverio-parallel-retrier","owner":"Simple-Automation-Testing","description":"protractor-prallel-retrier","archived":false,"fork":false,"pushed_at":"2020-09-08T10:39:45.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-24T14:54:20.745Z","etag":null,"topics":["protractor-flaky","protractor-helper","protractor-parallel","protractor-rerun"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Simple-Automation-Testing.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":"2020-09-07T14:59:52.000Z","updated_at":"2020-09-09T08:36:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"c8686a9d-1f36-442e-887a-e870d84f537a","html_url":"https://github.com/Simple-Automation-Testing/webdriverio-parallel-retrier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Simple-Automation-Testing/webdriverio-parallel-retrier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simple-Automation-Testing%2Fwebdriverio-parallel-retrier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simple-Automation-Testing%2Fwebdriverio-parallel-retrier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simple-Automation-Testing%2Fwebdriverio-parallel-retrier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simple-Automation-Testing%2Fwebdriverio-parallel-retrier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Simple-Automation-Testing","download_url":"https://codeload.github.com/Simple-Automation-Testing/webdriverio-parallel-retrier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simple-Automation-Testing%2Fwebdriverio-parallel-retrier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267820880,"owners_count":24149294,"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-07-30T02:00:09.044Z","response_time":70,"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":["protractor-flaky","protractor-helper","protractor-parallel","protractor-rerun"],"created_at":"2024-11-20T16:52:37.848Z","updated_at":"2025-07-30T06:11:38.428Z","avatar_url":"https://github.com/Simple-Automation-Testing.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webdriverio-parallel-retrier\n\n🛠 Development in progress, beta version\n\n![npm downloads](https://img.shields.io/npm/dm/webdriverio-parallel-retrier.svg?style=flat-square)\n\n## This library is a wrapper around ```process-rerun```\n\n### The purpose of this library is - build simple and flexible interface for wdio framework parallel execution with rerun (on fail) possibility\n\n[Usage and Example](#usage)\n\n\u003cbr\u003e\n\n[Documentation](#documentation)\n* [buildExecutor](#buildexecutor)\n* [byIt](#byit)\n* [byFile](#byit)\n* [asQueue](#asqueue)\n* [executor](#executor)\n* [execute](#execute)\n\n### usage\n\n```js\nconst {buildExecutor} = require('webdriverio-parallel-retrier');\n\nexecuteAsQueue();\nasync function executeAsQueue() {\n\n  const testCaseRegPattern = /(?\u003c=it\\(').+(?=')/ig;\n  const cwd = process.cwd();\n\n  const result = await buildExecutor(resolve(cwd, './wdio.conf.js'), resolve(cwd, './built/specs'))\n    .asQueue(testCaseRegPattern, ['test case it name 1', 'test case it name 2', 'test case it name 3'])\n    .command({'--process-argument': 'process-argument-value'}, {ENV_VARIABLE: 'en-varialbe-value'})\n    .executor({attemptsCount: 2, maxThreads: 1, logLevel: 'VERBOSE', longestProcessTime: 60 * 1000, pollTime: 100})\n    .execute();\n\n  console.log(result);\n  if(result.retriable.length || result.notRetriable.length) {\n    process.exit(1);\n  }\n}\n\nexecuteOnlyRequiredCases();\nasync function executeAsQueue() {\n\n  const testCaseRegPattern = /(?\u003c=it\\(').+(?=')/ig;\n  const cwd = process.cwd();\n\n  const result = await buildExecutor(resolve(cwd, './wdio.conf.js'), resolve(cwd, './built/specs'))\n    .asQueue(testCaseRegPattern, ['test case it name 1', 'test case it name 2', 'test case it name 3'])\n    .command({'--process-argument': 'process-argument-value'}, {ENV_VARIABLE: 'en-varialbe-value'})\n    .executor({attemptsCount: 2, maxThreads: 10, logLevel: 'VERBOSE', longestProcessTime: 60 * 1000, pollTime: 100})\n    .execute();\n\n  console.log(result);\n  if(result.retriable.length || result.notRetriable.length) {\n    process.exit(1);\n  }\n}\n\nexecuteByFile();\nasync function executeByFile() {\n  const cwd = process.cwd();\n  const result = await buildExecutor(resolve(cwd, './wdio.conf.js'), resolve(cwd, './built/specs'))\n    .byFile()\n    .command({'--process-argument': 'process-argument-value'}, {ENV_VARIABLE: 'en-varialbe-value'})\n    .executor({attemptsCount: 2, maxThreads: 5, logLevel: 'VERBOSE', longestProcessTime: 60 * 1000, pollTime: 100})\n    .execute();\n\n  console.log(result);\n  if(result.retriable.length || result.notRetriable.length) {\n    process.exit(1);\n  }\n}\n\n\nexecuteByIt();\nasync function executeByIt() {\n  const cwd = process.cwd();\n  const testCaseRegPattern = /(?\u003c=it\\(').+(?=')/ig;\n  const result = await buildExecutor(resolve(cwd, './wdio.conf.js'), resolve(cwd, './built/specs'))\n    .byIt(testCaseRegPattern)\n    .command({'--process-argument': 'process-argument-value'}, {ENV_VARIABLE: 'en-varialbe-value'})\n    .executor({attemptsCount: 2, maxThreads: 2, logLevel: 'VERBOSE', longestProcessTime: 60 * 1000, pollTime: 100})\n    .execute();\n\n  console.log(result);\n  if(result.retriable.length || result.notRetriable.length) {\n    process.exit(1);\n  }\n}\n```\n\n## Documentation\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## buildExecutor\n\n**`buildExecutor('./path/to/wdio.conf.js', './path/to/specs/folder')`**\n\narguments | description\n--- | ---\n**`pathTowdioConfigFile`** | Type: `string` \u003cbr\u003e Path to wdio config file\n**`pathToSpecFolderOrSpecsFilesList`** | Type: `string` or `string[]` \u003cbr\u003e Path to specs folder, or list (array) with specs files path;\n\n**`returns {byIt: function; byFile: function; asQueue: function}`**\n\n## byIt\n\n**`buildExecutor(...args).byIt(/(?\u003c=it\\(').+(?=')/ig) or .byIt()`**\n\narguments | description\n--- | ---\n**`itPattern`** | Type: OPTIONAL `RegEx` \u003cbr\u003e RegEx for it title. example it('test item'); -\u003e itRegEx = /(?\u003c=it\\(').+(?=')/ig; \u003cbr\u003e in case of undefined library will define ***itPattern*** based on first symbol in it title;\n**`pathToSpecFolderOrSpecsFilesList`** | Type: `string` or `string[]` \u003cbr\u003e Path to specs folder, or list (array) with specs files path;\n\n**`returns {command: function}`**\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## byFile\n\n**`buildExecutor(...args).byFile()`**\n\n#### no arguments here\n\n**`returns {command: function}`**\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## asQueue\n\n**`buildExecutor(...args).asQueue(/(?\u003c=it\\(').+(?=')/ig, ['test1', 'test2', 'test 10']) or buildExecutor(...args).asQueue(['test1', 'test2', 'test 10'])`**\n\narguments | description\n--- | ---\n**`itPattern`** | Type: OPTIONAL `RegEx` \u003cbr\u003e RegEx for it title. example it('test item'); -\u003e itRegEx = /(?\u003c=it\\(').+(?=')/ig; \u003cbr\u003e in case of undefined library will define ***itPattern*** based on first symbol in it title;\n**`casesList`** | Type: `string[]` \u003cbr\u003e List with tests what should be executed one by on `can be first argument, because itPattern is an optional`\n\n**`returns {command: function}`**\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## command\n\n**`buildExecutor(...args).asQueue(...args1).command({'--test': 'test'}, {ENV: 'test'}) or buildExecutor(...args).asQueue(...args1).command()`**\n\narguments | description\n--- | ---\n**`processArgs`** | Type: `undefined` | `null` | `{[prop: string]: string}` \u003cbr\u003e Object with required process argumentss, use format prop name with - or --, example '--prop' or '-p'\n**`processEnvVars`** | Type: `undefined` | `null` | `{[prop: string]: string}` \u003cbr\u003e Object with required process env variables, use format prop name upper snake_case, LOG_LEVEL\n\n**`returns {executor: function}`**\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## executor\n\n**`buildExecutor(...args).asQueue(...args1).command().executor({maxThreads: 1, attemptsCount: 2, logLevel: 'ERROR'})`**\n\narguments | description\n--- | ---\n**`buildOpts`** | Type: `object` \u003cbr\u003e Options for executor\n**`buildOpts.maxThreads`** | Type: `number`,  \u003cbr\u003e How many threads can be executed in same time \u003cbr\u003e **Default threads count is 5**\n**`buildOpts.attemptsCount`** | Type: `number`,  \u003cbr\u003e How many times can we try to execute command for success result **in next cycle will be executed only faild command, success commands will not be reexecuted** \u003cbr\u003e **Default attempts count is 2**\n**`buildOpts.pollTime`** | Type: `number` ,  \u003cbr\u003e Period for recheck about free thread \u003cbr\u003e **Default is 1 second**\n**`buildOpts.logLevel`** | Type: `string`, one of 'ERROR', 'WARN', 'INFO', 'VERBOSE', \u003cbr\u003e ERROR - only errors, WARN -  errors and warnings, INFO - errors, warnings and information, VERBOSE - full logging \u003cbr\u003e **Default is 'ERROR'**\n**`buildOpts.currentExecutionVariable`** | Type: `string`, will be execution variable with execution index for every cycle will be ++ \u003cbr\u003e\n**`buildOpts.everyCycleCallback`** | Type: `function`,  \u003cbr\u003e Optional. everyCycleCallback will be executed after cycle, before next execution cycle.\u003cbr\u003e **Default is false**\n**`buildOpts.processResultAnalyzer`** | Type: `function`,  \u003cbr\u003e Optional. processResultAnalyzer is a function where arguments are original command, execution stack trace and notRetriable array processResultAnalyzer should return a new command what will be executed in next cycle or **null** - if satisfactory result \u003cbr\u003e\n**`buildOpts.longestProcessTime`** | Type: `number`,  \u003cbr\u003e In case if command execution time is longer than longest Process Time - executor will kill it automatically and will try to execute this command again. \u003cbr\u003e **Default time is 45 seconds**\n\n**`returns {execute: async function}`**\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## execute\n\n**`buildExecutor(...args).asQueue(...args1).command().executor(...args2).execute()`**\n\n#### no arguments here\n\n**`returns {retriable: string[]; notRetriable: string[]}`**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimple-automation-testing%2Fwebdriverio-parallel-retrier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimple-automation-testing%2Fwebdriverio-parallel-retrier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimple-automation-testing%2Fwebdriverio-parallel-retrier/lists"}