Functional Testing – WebDriverIO Integrated Test Runner

Update: This post is now available at a new location:
https://blog.ngeor.com/2016/08/13/functional-testing-webdriverio-integrated-test-runner.html

In the previous series of posts, we had a look at functional testing with WebDriverIO and mocha. We explored the page object pattern and saw the challenges of asynchronous programming with promises. We even saw some ways of mitigating those challenges. However, there is another approach to the same problems. Instead of running our tests with mocha, we can run them using the integrated test runner of WebDriverIO.
Continue reading Functional Testing – WebDriverIO Integrated Test Runner

Advertisements

Functional Testing – Hiding Async

Update: This post is now available at a new location:
https://blog.ngeor.com/2016/08/06/functional-testing-hiding-async.html

In the previous post, we explored the Page Object pattern and rewrote our tests to use this technique. Sometimes, it can be that the tests appear to be a bit verbose due to the usage of promises. Additionally, promises and asynchronous programming in general can be somewhat confusing to developers. Let’s see some ways of making the tests shorter and easier to read.

Continue reading Functional Testing – Hiding Async

Functional Testing – Page Object Pattern

Update: This post is now available at a new location:
https://blog.ngeor.com/2016/07/30/functional-testing-page-object-pattern.html

So far, we’ve seen how to write functional tests using the WebDriverIO API directly. Let’s see what problems we may encounter with that and how the page object pattern comes to rescue.
Continue reading Functional Testing – Page Object Pattern

Functional Testing – Dealing with failed tests

Update: This post is now available at a new location:
https://blog.ngeor.com/2016/07/23/functional-testing-dealing-with-failed-tests.html

In the previous post, we wrote some functional tests and we encountered our first failing test. Let’s see how we can go about investigating these failures, both on a developer machine and during continuous integration. Continue reading Functional Testing – Dealing with failed tests

Functional Testing – Selectors

Update: This post is now available at a new location:
https://blog.ngeor.com/2016/07/16/functional-testing-selectors.html

So far, we have essentially only one test, a test that verifies the title of the browser. Let’s try to make a more interesting test. We’ll need to interact with elements on the page and simulate the user’s journey. Continue reading Functional Testing – Selectors

Functional Testing – First steps towards a framework

Update: This post is now available at a new location:
https://blog.ngeor.com/2016/07/09/functional-testing-first-steps-towards-a-framework.html

Before we go any further, let’s take a break and add a bit of a structure to our functional tests. This will allow us to reduce the code we have to write for each test. We’ll also start thinking about how to organize the tests into folders and files. Continue reading Functional Testing – First steps towards a framework

Functional Testing – Reducing Code Duplication

Update: This post is now available at a new location:
https://blog.ngeor.com/2016/07/02/functional-testing-reducing-code-duplication.html

Let’s continue our functional testing examples by adding a few more tests. This will demonstrate why we need to start thinking about the structure of our tests and why we should be developing a framework that will allow us to write less code.
Continue reading Functional Testing – Reducing Code Duplication