Automated UI Testing with Taiko

Previously, I’ve explored automated UI testing with LeapWork, which is a super powerful tool that can empower non-technical QA team members to automate complex scenarios.

Today, I’m evaluating another tool called Taiko which is, in some ways, even more productive than LeapWork but — as we will see — is ultimately geared more towards test engineers and developers rather than non-technical QA staff.

What I find more impressive about Taiko are the selectors and strategies used for selecting elements in a UI.  In fact, as you’ll see in the video, it’s possible to fully automate UI testing scenarios without knowing any of the DOM structure or CSS selectors; it can be used to create a truly “black box” test suite.  The upside is that it is super productive, but with that productivity comes risk as it means that in some cases, breaking changes may actually pass your test cases because of the ambiguity of some of the abstract selectors.  In general, I think for most technical folks, Taiko will be significantly more productive than Selenium or Cypress with the trade off being a bit of risk due to the ambiguous nature of its selectors (“flaky” tests are not necessarily bad as using precise selectors can insulate against unexpected structural changes).

Unlike Cypress, Taiko does support manipulating multiple windows and tabs, which I think can be extremely useful when testing real-time interactive scenarios.

Where I think Taiko breaks down is once your test cases reach a certain level of complexity, it requires you to not only know JavaScript, but also be comfortable with relatively high level JavaScript given the asynchronous nature of the API.  In fact, that threshold is pretty low; even simple actions like connecting CSV input files and iterating test steps based on those rows are non-trivial with Taiko and require understanding how to synchronize asynchronous code in JavaScript (some of this is addressed by using Gauge on top of Taiko).

Of course, there are other limitations as well.  Namely, it isn’t a good choice if you also want your tests to be used for browser compatibility testing as it has limited browser support.

If you have npm on your machine, it’s super easy to get started with Taiko.  I recommend taking it for a spin to see if it’s the right tool for you!

You may also like...

1 Response

  1. November 13, 2020

    […] Automated UI Testing with Taiko […]