8000 Performance Enhancements - More Configuration Options by adback03 · Pull Request #81 · SpecBind/specbind · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Performance Enhancements - More Configuration Options #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 15, 2016
Merged

Performance Enhancements - More Configuration Options #81

merged 3 commits into from
Jan 15, 2016

Conversation

adback03
Copy link
Contributor

In order to speed up a given test run, I have added two browserFactory options:

Option Values Description
validateWebDriver true or false whether or not to perform web driver validation before a given test run
reuseBrowser true or false whether or not to reuse the same browser across all tests. This greatly improves performance as you don't have to tear down the web driver every time and spin up a new browser. NOTE - As of now, this is a Selenium ONLY feature.

I have also added on behavior for the ensureCleanSession option. Now, when this option is set to true, cookies will be cleared before each scenario (and chrome no longer will need to use incognito mode because of this). This is particularly useful because of the new reuseBrowser option. Now cookies can be cleaned without having to close a browser window and opening a new one.

The other thing that needed to be changed was removing the IDisposable interface from the SeleniumBrowser and CodedUIBrowser. This had to be done because of a bug in the BoDi IoC container (which has since been fixed, but not yet integrated back into SpecFlow). Essentially, any registered instance with BoDi would automatically be disposed if it was implementing IDisposable. This was fine when we were using a new browser every time, but we can't let this happen if we are trying to reuse the same browser. Version 1.2 of BoDi has a fix which states:

  • should not dispose registered instances by default, disposal can be requested by the 'dispose: true' parameter

When viewing the diffs of my changes, add on a "?w=1" to the github url to ignore whitespace. I cleaned up some inconsistent whitespace in some of the files (spaces + tabs being mixed).

Let me know if you have any questions or concerns.

@dpiessens dpiessens merged commit 196e63d into SpecBind:master Jan 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0