• Testing errors in async functions with Chai

    Testing errors in async code which uses promises with Chai can be a bit of a hassle, but it becomes very easy with a plugin called chai-as-promised. See the example below.

    January 16, 2018 - 2 minute read - testautomation chai javascript
  • Model based test automation - test cases

    The test cases define the test scenarios. They should be written in the domain language of the target application. The way of writing test cases can be anything between using a gherkin language (like cucumber) to use plain programmatic functions. Using a custom DSL language is an option as well (see for example MPS). Even if one uses plain functions it is important to pay attention to the code readability. See the following example from the Selenium Getting Started in Java.

    January 10, 2016 - 5 minute read - testautomation pageobject
  • Model based test automation - principles

    The topic of test automation frameworks is huge. All of its aspects are worth many pages of conversation. Below I tried to collect the general principles I find useful and desired to almost any (model based) test automation framework regardless of the specific details of them.

    One source of the historical overview of test automation frameworks is this paper from John Kent. It does worth reading to see how we’ve got to the model-based automation.

    January 9, 2016 - 2 minute read - testautomation pageobject