Performance Enhancements - More Configuration Options #81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to speed up a given test run, I have added two browserFactory options:
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:
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.