Talking testing, agility and automation... and anything else.

Jan 18 Review

If you’ve seen my github account, you’d likely note that I like trying all the automation tools, and see the value in most. And why would you not try ’em all? Case-in-point: today I played around with an interesting–SPOILER: if not tragically flawed–automation tool called Cypress.

Yeah, I don’t mean to be a downer; I say this hoping to save others the time I spent today… if you need to switch/handle multiple tabs/windows/iframes in a browser for your tests, Cypress will NEVER allow you to do this. They state as much on their website, in the Trade-Offs section. Given its massive ramifications, perhaps it should be stated more upfront?

Cypress is an interesting bit of tech; especially since it doesn’t require Selenium/Webdriver; has built-in implicit waits, and other goodies. The long and the short of it is, I don’t see how this tool could ever take the place of any webdriver-based tool, given its current limitations, but if those don’t bother you, take a look!

Plusone Linkedin Facebook Twitter Digg Email

Sep 17

It Never Fails…

The weather is always most beautiful… the last week of a sprint. I need a waterproof laptop, with wireless broadband, available everywhere on the planet (though I’d settle for just all of Wisconsin). Is that too much to ask?

Plusone Linkedin Facebook Twitter Digg Email

Mar 17

Accidental Load Testing

In my example test automation code, I generally setup the tests to run against my own server. I feel that it would be downright rude to have random folks running these tests against my digital neighbors. I’m happy to have them run against my server… I mean, it’s kind of the point of the thing.

The downside is when folks start tinkering with the code… and maybe change a locator within a loop to see what happens. Like my friend in India @ likely did this morning (well… my morning, anyway), and started PEGGING MY SERVER :)

It’s fine… I do appreciate the accidental load testing

Plusone Linkedin Facebook Twitter Digg Email

Feb 17

On The Move (Digitally)

My–now former–web host decided to triple my annual rate, come renewal time, which was the impetus for me to finally move my sites to my own server. So over this past long weekend, I finalized the move over to my favorite cloud server co., DigitalOcean ($10 promo code link!).

It ended up being pretty fun… in a nerdy kinda way. I decided to go with LEMP, over LAMP, and I gotta say, NGINX is pretty fantastic. I’m also making use of CloudFlare, a CDN, DNS, security, performance w√ľnderkind! And it’s FREE.

Anywho, if you notice anything not working on the site, please ping me using one of the contacts in the sidebar. TANKS!

Plusone Linkedin Facebook Twitter Digg Email

Dec 16

Re-Run Flakey Tests with Protractor-Flake

If you’ve worked with E2E tests for any amount of time, you will have experienced tests that, for whatever reason, randomly fail; aka flakey tests. Such failures can be caused by any number of things: a network glitch, browser barf, app hiccup, act of God, etc….

Test flake can seriously undermine the trust in automation, and drive your automation engineer to drink (or perhaps just drink more). A wise test engineer will embrace that flake happens, and account for it in their automation strategy.

One popular strategy is to re-run failed tests. This way, if a test fails, it gets re-run ‘n‘ number of times, and if it passes, life is good. Enter Protractor-Flake.

Protractor-Flake parses your Protractor test output, looking for failures, and re-runs any failing tests (note: at the spec file level) at the end of your test run. It works really well and is simple to setup. Here’s how…

First install it as a dependency:

Then you can run it directly by using it in place of Protractor (note: the ‘–‘ denotes the end of args passed to protractor-flake, and the beginning of args passed to Protractor):

Or you can use it programmatically. I like to create a simple node script, which allows me to add logging and reporting (future blog post). Here’s an example:

Saving the above script as a file, 'flake', you could then run your tests thusly:

Now obviously, you should be killing off flakey tests to the best of your ability, but Protractor-Flake can save you from non-test-related flakiness, and keep your tests green! You can see a working example in my protractor-example repo on GitHub.

Plusone Linkedin Facebook Twitter Digg Email