{"id":20038490,"url":"https://github.com/yahoo/protractor-retry","last_synced_at":"2025-09-01T03:33:58.931Z","repository":{"id":25863233,"uuid":"102538601","full_name":"yahoo/protractor-retry","owner":"yahoo","description":"Use protractor features to automatically re-run failed tests with a specific configurable number of attempts.","archived":false,"fork":false,"pushed_at":"2023-05-26T21:58:19.000Z","size":406,"stargazers_count":27,"open_issues_count":47,"forks_count":32,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-06-17T19:05:57.976Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/yahoo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2017-09-05T23:14:34.000Z","updated_at":"2025-05-17T00:03:54.000Z","dependencies_parsed_at":"2024-06-18T16:40:57.690Z","dependency_job_id":"145578b5-bba1-4d58-89cd-819760ef436a","html_url":"https://github.com/yahoo/protractor-retry","commit_stats":{"total_commits":54,"total_committers":6,"mean_commits":9.0,"dds":0.6296296296296297,"last_synced_commit":"22b6470f02f404ec98a35532b20d8872c17e775e"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/yahoo/protractor-retry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fprotractor-retry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fprotractor-retry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fprotractor-retry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fprotractor-retry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yahoo","download_url":"https://codeload.github.com/yahoo/protractor-retry/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yahoo%2Fprotractor-retry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273069663,"owners_count":25040093,"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-09-01T02:00:09.058Z","response_time":120,"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":[],"created_at":"2024-11-13T10:29:29.480Z","updated_at":"2025-09-01T03:33:58.862Z","avatar_url":"https://github.com/yahoo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://badge.fury.io/js/protractor-retry\"\u003e\u003cimg src=\"https://badge.fury.io/js/protractor-retry.svg\" alt=\"npm version\" height=\"18\"\u003e\u003c/a\u003e\n[![Build Status](https://travis-ci.org/yahoo/protractor-retry.svg?branch=master)](https://travis-ci.org/yahoo/protractor-retry)\n\n## Protractor-retry\n\n * A solution to address the **flakyness** of your Protractor FE automation test suites.  \n * This module used protractor features to automatically re-run failed tests with a specific configurable number of attempts.\n * This module is added in our CICD pipelines  where we have a zero failure policy in order to bless an environment.\n * Mocha \u0026 Jasmine are supported.\n * NEW : WINDOWS Support UPDATE : Windows as an env to launch with version 2.0.1\n\n\n\n\u003cimg src=\"https://user-images.githubusercontent.com/12041605/30343044-cd942a4c-97b0-11e7-850e-a7111996a554.png\" align=\"center\" height=\"75\" width=\"600\" /\u003e\u003cbr/\u003e\u003cbr/\u003e\n\nThis module fully relies on protractor available callbacks and internal functionalities.\n\nIt is build from within protractor itself and not relying on any external dependency. All the changes that you need to add in order to integrate this module is located only in one file, the protractor configuration file, ie to summarize :\n\n * **You don’t need to update a single line of your tests spec.js files.**\n * **Only few lines to add in your protractor conf file needed.**\n\nThe module will create an XML file which contains the failed spec(s) filename(s). and will re-run only them, till either we don't have anymore failures or we reached the retry attempt maximum.\n\nThe process of retrying is not happening on the fly of a test failure but only after the whole testsuite is run. The failed tests are stored and only those ones are going to be rerun afterwards by creating on the fly a new \"failed only\" files testsuite.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/12041605/30344129-ea28261e-97b4-11e7-99fe-4a28ff74b547.jpg\" align=\"center\" height=\"390\" width=\"390\" /\u003e\u003cbr/\u003e\u003cbr/\u003e\n\n### Steps to Integrate\n\n#### Install\n\n```\nnpm i -g  protractor-retry\n```\n\n#### Step 1: Require the Package ( Your Protractor Config )\n```js\nvar retry = require('protractor-retry').retry;\n```\n\n#### Step 2: onPrepare ( Your Protractor Config )\n```js\nonPrepare: function() {\n  retry.onPrepare();\n}\n```\n#### Step 3: onCleanUp ( Your Protractor Config )\n```js\nonCleanUp = function(results) {\n    retry.onCleanUp(results);\n};\n```\nIt is Mandatory to provide the `results` to the retry.onCleanUp function\n\n#### Step 4: afterLaunch ( Your Protractor Config )\n ```js\nafterLaunch = function() {\n    return retry.afterLaunch(NUMBER_OF_RETRIES);\n}\n```\nIt is Mandatory to use `return` here\n\n#### Full Protractor Config snippet with 2 retries\n```js\nexports.config = {\n    // rest of your config\n    onCleanUp: function (results) {\n        retry.onCleanUp(results);\n    },\n    onPrepare: function () {\n        retry.onPrepare();\n    },\n    afterLaunch: function() {\n        return retry.afterLaunch(2);\n    }\n};\n```\n\n### Examples\n\n* Checkout this Mocha (Firefox capability) Example [protractor.mocha.conf.js](test/protractor.mocha.conf.js)\n* Checkout this Jasmine (Chrome cap.) Example [protractor.jasmine.conf.js](test/protractor.jasmine.conf.js)\n* Checkout this TestSuite (IE11 cap.) Example with DEBUG mode activated [protractor.suite.conf.js](test/protractor.suite.conf.js)\n\nThose 3 examples are actually used for the functional tests coverage of this package. Please take a look at the [Travis output](https://travis-ci.org/yahoo/protractor-retry) to check out the flow of the retries.\n\n### Known Caveat\n* If you are NOT Running in Parallel mode, the package will retry the whole testsuite if any failure.\n* **Windows** as an environment to launch \u0026 use this package is unfortunately not yet supported. \n* **WINDOWS SUPPORT UPDATE** Supported from version 2.0.1\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyahoo%2Fprotractor-retry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyahoo%2Fprotractor-retry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyahoo%2Fprotractor-retry/lists"}