Chrome extension that allows to develop and run automation tests right in browser
MIT License
Autotester is Chrome extension that allows to develop and run automation tests right in browser. Tests are written in Javascript and can be executed over another tab of the same Chrome or any remote browser.
Tested in:
Zero setup The setup is just drag-n-drop extension in chrome. No other stuff like Selenium, Node.js or Chromedriver is needed.
Convenient development Developing tests right in browser has some advantages. You can edit tests in first tab and check results in second. You can easily run particular test to debug. You can keep tab open after tests to inspect with devtools.
Selenium compatible syntax Tests syntax is compatible with Selenium Javascript API so it can be executed ether in nodejs and visa-versa (except custom commands).
Custom commands Because tests are executed via extension all of rich chrome extensions API are available. You can define custom commands to work with cookies, downloads, tabs, history etc and use it in your tests.
Capture network requests Capturing network requests is working out of box. You can capture page loads, resources (img, script, etc), xhr/fetch requests and new tabs. No proxy needed. Please see example.
Load tests from anywhere Tests can be stored right in browser, local directory or loaded from any local/remote http server (for example GitHub).
Run tests on remote servers Besides running tests in the same chrome instance it is possible to route commands to any selenium server. It can be localhost, Sauce Labs, BrowserStack, etc.
Test other chrome extensions With Autotester it is possible to attach to other extensions background pages for testing. Please see example.
Autotester is under active development now. Not all webdriver commands are supported. Yet. And there can be bugs. But feel free to try it and share your feedback or ideas in issues - help us to make it better!
chrome://extensions
pageClick extension button A
in browser panel to open Autotester app.
Select google_search
in dropdown and press Run to execute test. Look at the report.
Next, you can change test code or create new file and re-run again.
Autotester supports Selenium Javascript API for writing tests. Have a look on Autotester self tests. Also there are some pre-defined globals available in tests for conveniency:
Driver
By
until
Key
webdriver
console
require
More detailed tutorial is coming..
When executing tests in the another tab of the same browser Autotester is utilizing Chrome Debugging Protocol available via chrome.debugger.* extensions API. It intercepts http requests going from Selenium Javascript package to W3C Webdriver endpoints and loops them back to browser. When executing tests over remote browser Autotester does not intercept http requests letting them reach remote Selenium Server and waits for the results.
There are many directions to grow. The current plan is following:
If you have an idea how to fix bug or implement new feature - you are welcome to contribute. Please see CONTRIBUTING.md. Thanks for your support!
driver.executeScript(() => document.title);
Also please search issues for the same unsupported route and vote or create new one to let us know which commands you need most of all.
/tests
directory of unpacked extension.MIT @ Vitaliy Potapov