Skip to content
This repository has been archived by the owner on Jul 26, 2021. It is now read-only.

Remove Global Wdio Refresh #136

Closed
emilyrohrbough opened this issue Jan 25, 2019 · 1 comment
Closed

Remove Global Wdio Refresh #136

emilyrohrbough opened this issue Jan 25, 2019 · 1 comment

Comments

@emilyrohrbough
Copy link
Contributor

emilyrohrbough commented Jan 25, 2019

Feature Request

Description

Webdriver tests are slower 🐌than they should be because our global before hook performs a browser.refresh() which

  1. slows down tests significantly
  2. increased test flakiness as the selenium grid session is terminated and a new request is made for each test describe block.

This global hook also enabled tests to be written poorly because the refresh will automatically clean up the current page's state, when tests should be working through a workflow, not a single page's state. IF a refresh is needed (which should be infrequent) it should be manually triggered by the test itself.

Here is a video showing the a test run using the current configuration and then a test run that has removed this configuration: https://cl.ly/7a7d955aaa8e.

Removing this is non-passive and would break tests....An option could be to add a process.env hook for now to toggle this global hook. This be used by people if they would like to start writing smarter, faster tests!

  beforeHook() {
    if(!process.env.DISABLE_DEFAULT_REFRESH) {
      global.browser.refresh();
    }
  },
@yuderekyu
Copy link
Contributor

woah

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants