Skip to content

Add in-browser/webdriver hybrid test runner #76

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

Closed
wants to merge 1 commit into from
Closed

Add in-browser/webdriver hybrid test runner #76

wants to merge 1 commit into from

Conversation

DrMarcII
Copy link
Contributor

@DrMarcII DrMarcII commented May 5, 2015

No description provided.

@DrMarcII DrMarcII changed the title Add webdriver based test runner. Add in-browser/webdriver hybrid test runner May 7, 2015
@DrMarcII
Copy link
Contributor Author

DrMarcII commented May 7, 2015

@kevmoo @nex3

FYI: This pull request implements hybrid testing: tests that are run in a browser started via webdriver and have access to the webdriver that started them. They are useful because in-browser tests are great until you need to start working with input (mouse/keyboard) events, at which point webdriver has the advantage.

The main takeaway here is that this provides an example of the sort of extension/customization that at least one user (me) would like to see supported in test:

  • add new handlers to the web server used for browser-based testing (used to expose a webdriver api to the test that can be called via xhr)
  • swap out the browser launching implementation (switch to webdriver for launching browser rather than calling executables directly)

Currently to do this, I had to copy src/executable.dart (changed to use my version of src/runner/loader.dart), src/runner/loader.dart (changes to use my version of server.dart), and src/runner/browser/server.dart (added new handler and switched the browser launching implementation).

@nex3
Copy link

nex3 commented May 7, 2015

Thanks for looking into this! It's really valuable to know what extension points people need.

add new handlers to the web server used for browser-based testing (used to expose a webdriver api to the test that can be called via xhr)

This isn't a use-case we'd considered; I've filed dart-lang/test#109 to track it.

swap out the browser launching implementation (switch to webdriver for launching browser rather than calling executables directly)

We've already got dart-lang/test#99 tracking this 😺.

Currently to do this, I had to copy src/executable.dart (changed to use my version of src/runner/loader.dart), src/runner/loader.dart (changes to use my version of server.dart), and src/runner/browser/server.dart (added new handler and switched the browser launching implementation).

This is fine for pre-release stuff, but are you planning on releasing a stable version of this code before the test infrastructure is in place to support it?

@DrMarcII
Copy link
Contributor Author

DrMarcII commented May 7, 2015

Thanks for the feedback @nex3

Currently to do this, I had to copy src/executable.dart (changed to use my
version of src/runner/loader.dart), src/runner/loader.dart (changes to use
my version of server.dart), and src/runner/browser/server.dart (added new
handler and switched the browser launching implementation).

This is fine for pre-release stuff, but are you planning on releasing a
stable version of this code before the test infrastructure is in place to
support it?

Not really. Mostly I wanted to provide a concrete example of the sort of
extension that I am considering to help guide the development of the test
package :-)

Reply to this email directly or view it on GitHub
#76 (comment).

@nex3
Copy link

nex3 commented May 7, 2015

Not really. Mostly I wanted to provide a concrete example of the sort of
extension that I am considering to help guide the development of the test
package :-)

Awesome, much appreciated.

@DrMarcII DrMarcII closed this Dec 13, 2016
@DrMarcII DrMarcII deleted the test branch January 10, 2017 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants