{"action":"created","issue":{"url":"https://api.github.com/repos/webdriverio/webdriverio/issues/2556","repository_url":"https://api.github.com/repos/webdriverio/webdriverio","labels_url":"https://api.github.com/repos/webdriverio/webdriverio/issues/2556/labels{/name}","comments_url":"https://api.github.com/repos/webdriverio/webdriverio/issues/2556/comments","events_url":"https://api.github.com/repos/webdriverio/webdriverio/issues/2556/events","html_url":"https://github.com/webdriverio/webdriverio/pull/2556","id":289638896,"number":2556,"title":"Add retries on a per-specfile basis","user":{"login":"bennieswart","id":5946937,"avatar_url":"https://avatars1.githubusercontent.com/u/5946937?v=4","gravatar_id":"","url":"https://api.github.com/users/bennieswart","html_url":"https://github.com/bennieswart","followers_url":"https://api.github.com/users/bennieswart/followers","following_url":"https://api.github.com/users/bennieswart/following{/other_user}","gists_url":"https://api.github.com/users/bennieswart/gists{/gist_id}","starred_url":"https://api.github.com/users/bennieswart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bennieswart/subscriptions","organizations_url":"https://api.github.com/users/bennieswart/orgs","repos_url":"https://api.github.com/users/bennieswart/repos","events_url":"https://api.github.com/users/bennieswart/events{/privacy}","received_events_url":"https://api.github.com/users/bennieswart/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-01-18T14:01:45Z","updated_at":"2018-02-28T12:10:00Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/webdriverio/webdriverio/pulls/2556","html_url":"https://github.com/webdriverio/webdriverio/pull/2556","diff_url":"https://github.com/webdriverio/webdriverio/pull/2556.diff","patch_url":"https://github.com/webdriverio/webdriverio/pull/2556.patch"},"body":"## Proposed changes\r\n\r\n[//]: # (Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.)\r\n\r\nAdd retries on a per-specfile basis, as discussed in https://github.com/webdriverio/webdriverio/issues/2484.\r\n\r\nPreviously only test-level and suite-level retries were available, which\r\nare fine in most cases. In any test which involves state, such as on a\r\nserver or in a db, the state may be left invalid once the test fails the\r\nfirst time. Any subsequent retries may have no chance of passing due to\r\nthe invalid state they would have to start with.\r\n\r\nA new browser instance is created for each specfile, which makes this an\r\nideal place to hook and setup any other states (server, db). Retries on\r\nthis level would mean that the whole setup process could simply be\r\nrepeated as if it were for a new specfile, with the results of the\r\nfailing specfile (that is to be retried) being discarded.\r\n\r\n## Types of changes\r\n\r\n[//]: # (What types of changes does your code introduce to WebdriverIO?)\r\n[//]: # (_Put an `x` in the boxes that apply_)\r\n\r\n- [ ] Bugfix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)\r\n\r\n## Checklist\r\n\r\n[//]: # (_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._)\r\n\r\n- [x] I have read the [CONTRIBUTING](https://github.com/webdriverio/webdriverio/blob/master/CONTRIBUTING.md) doc\r\n- [x] I have added tests that prove my fix is effective or that my feature works\r\n- [x] I have added necessary documentation (if appropriate)\r\n\r\n## Further comments\r\n\r\n[//]: # (If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...)\r\n\r\nDocumentation kindly provided by @pdirt and pending in #2614.\r\nWill integrate docs with this PR if so requested. Otherwise, just merge both.\r\n\r\n### Reviewers: @christian-bromann\r\n"},"comment":{"url":"https://api.github.com/repos/webdriverio/webdriverio/issues/comments/369220477","html_url":"https://github.com/webdriverio/webdriverio/pull/2556#issuecomment-369220477","issue_url":"https://api.github.com/repos/webdriverio/webdriverio/issues/2556","id":369220477,"user":{"login":"bennieswart","id":5946937,"avatar_url":"https://avatars1.githubusercontent.com/u/5946937?v=4","gravatar_id":"","url":"https://api.github.com/users/bennieswart","html_url":"https://github.com/bennieswart","followers_url":"https://api.github.com/users/bennieswart/followers","following_url":"https://api.github.com/users/bennieswart/following{/other_user}","gists_url":"https://api.github.com/users/bennieswart/gists{/gist_id}","starred_url":"https://api.github.com/users/bennieswart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bennieswart/subscriptions","organizations_url":"https://api.github.com/users/bennieswart/orgs","repos_url":"https://api.github.com/users/bennieswart/repos","events_url":"https://api.github.com/users/bennieswart/events{/privacy}","received_events_url":"https://api.github.com/users/bennieswart/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T12:10:00Z","updated_at":"2018-02-28T12:10:00Z","author_association":"NONE","body":"@christian-bromann I have added tests as requested.\r\nIt was somewhat tricky to determine whether or not the specfile-level retries are working, since each retry is a new process and hence state cannot be preserved. You're welcome to suggest a better approach than the current one if required."}}
{"actor":{"display_login":"bennieswart"}}