There will also be precious little here that plays to node's conventional strengths, such as http control and asynchronous program flow. Asynchronous is fine when you are responding to events and unknown amounts of traffic, but for testing where you want to control the flow of events and reach predictable results, it is a PITA. With that in mind, I'm using a synchronous version of the webdriver client, plus synchronous versions of base methods, to avoid the pain of dealing with nested callbacks and promises.
I had developed a workable interface from TestComplete to webdriver using the JSON protocol but TestComplete's version of Jscript (from IE5, would you believe?) and clunky editor left me wanting something more flexible. It took a bit of setting up but using Sublime Text to write scripts, executing them cross-browser and cross-OS with modern js in node and debugging them remotely with node-inspector suits me fine.
I don't use frameworks.
They all seem too wordy when I may need to be generating 50 tests a day. All of our tasks and bugs are documented and tracked in JIRA, so all of my tests refer back to JIRA issues. Why do the same work twice?
We'll start with setting up webdriver-sync, running tests on multiple OSes and mobile devices, then developing a DSL to produce readable, modular tests.
After that, it's handling uploads and downloads, having a look at the browser logs, an introduction to webpagetest, and finally running everything from Jenkins.
- Set up webdriver-sync
- Using multiple OSes and devices
- Readable test scripts
- Modular test scripts
- Uploads and Downloads
- Accessing browser logs
- Webpagetest for performance testing
- Continuous integration with Jenkins
Some node.js tips and tricks that come in handy for testing