Small intro
Have you ever heard about end-to-end testing? Or maybe about testing automation?
Those of you who had, may now be imaging Selenium. That's right, in most of cases
you will need to run Selenium Server and use Selenium Webdriver in your
tests. Those come handy to run a standalone browser window, with no caches,
filled-in fields or cookies and perform some operations in it.
In this article I will tell you my story of writing E2E tests for Angular webapp.
A brief of history
In my case, we first tried to use Protractor with Chai.js. That time we ended
up with almost unsupportable bunch of code, succeeding in 100% of runs.
Next time we eliminated Chai and reworked all our tests to use Protractor only.
So the code became more clear (I did not like the syntax, but it worked...),
but after upgrading libraries (including Protractor), the ratio of successfull
test runs decreased to just 40%.
We worked for two days, trying to fix those tests. And that's how webdriverio
came to our project.
And here's a short tutorial on how to implement E2E tests with webdriverio in
a sample project.