Category Archives: Coding

Testing visual appearance with Cucumber + Watir

One of the great things about Cucumber and Watir is that it allows you to write functional tests that are decoupled of the UI.  By using page objects, the definition of how the UI works is decoupled from the tests … Continue reading

Posted in CSS, Cucumber, Testing, Watir-Webdriver, Web | Tagged , , | Leave a comment

setImmediate, MessageChannel, postMessage broken on Internet Explorer 10

The JavaScript setImmedate function has been proposed and promoted as a faster alternative to setTimeout(fn, 0) (and cleaner than postMessage). While the HTML spec clamps setTimeout(fn, 0) to a minimum delay of 4 ms, setImmediate(fn) is defined to run the … Continue reading

Posted in Bugs, IE, JavaScript | Tagged , , , | 2 Comments

Testing time-dependent features in JavaScript

Many applications use the current time in their functionality.  For example, they can show data for a certain period of time or show the current date within the application.  Writing functional tests for such applications can be tedious.  How do … Continue reading

Posted in Coding, Cucumber, JavaScript, Testing | Tagged , , , | 1 Comment

CoffeeScript vs. TypeScript vs. Dart

Software often requires two or three iterations before you get it right.  In our case this led to starting a rewrite of our hybrid mobile application.  It had been developed over several years by a diverse group of people with … Continue reading

Posted in Coding, CoffeeScript, JavaScript, Web | Tagged , , , | 29 Comments

No-nonsense ASCII chart

There are a lot of ASCII charts floating around the Internet.  However all of them seem to have a few fundamental problems:  They include the whole ASCII set in the chart and cram too much information of each char, making … Continue reading

Posted in Coding | Tagged | Leave a comment

Documenting Cucumber steps

One of the great things in Cucumber testing is that as you go along, you start to accumulate ready step definitions, which makes writing new tests even faster.  Several times I’ve actually been surprised that a definition for a step … Continue reading

Posted in Cucumber, Testing | Tagged , , | Leave a comment

Dump World on failure

One of the most important aspects of test reports is that when something fails, you can easily debug what went wrong.  Splitting tests into logical, small tests that exercise a single functionality in the system goes a long way toward … Continue reading

Posted in Coding, Cucumber, Testing | Tagged , , , | 1 Comment

API testing with Cucumber

In our project we have a REST API using JSON that is used both internally by our mobile clients and offered externally to third parties.  Since we were consolidating all functional testing to Cucumber, it was natural to experiment what … Continue reading

Posted in Coding, Cucumber | Tagged , , | 3 Comments