Integrating Tauk in your Automation Test Suite (WebdriverIO)

Ranvir Chhina
Tauk Blog
Published in
6 min readFeb 17, 2022

The Tauk platform consists of two parts: the Web UI and the Tauk language packages. The platform, with its intuitive interface, allows engineers easily track, monitor, and resolve issues with their app automation tests to instill confidence before releasing to production. The Web UI offers a unified dashboard which allows you to track the health of your test suite and debug your test failures efficiently. Not only does it allow you to see the bigger picture with your test cases, but also collaborate and work alongside your team members to timely resolve and debug the failures that have occurred.

In this short guide, we will go over the basics of integrating Tauk into your Typescript WebdriverIO automation project and understand how to utilize the feature-rich Web UI efficiently.

Requirements

To integrate your test executions with the Tauk Platform, you need

  • Tauk Project ID
  • Tauk API Token
  • Download the Tauk package for your test framework
  • Add the tauk.observe() hook to your test case

Downloading the Tauk package

As mentioned earlier, the Tauk platform has two parts: the Web UI and the Tauk language packages for various test project environments. The Tauk Web UI is where you observe the test reports, manage team access, and get your Tauk Project ID and API Token. The Tauk language packages, on the other hand, allows you to integrate the Tauk observer within your automation tests.

In this quick start guide, I will focus on how to integrate Tauk in a TypeScript WebdriverIO project. Tauk also supports Appium & Selenium tests written in Python and Espresso testing in Android.

First, you will need to install the Tauk package from NPM. The package works easily in conjunction with BDD-style test suites, such as Mocha and Jasmine. To install the package you will need to execute:

The --save-dev flag ensures that the package is installed in your current directory (opposed to installing the package globally) and that the package is listed under devDependencies in your project's package.json.

Tauk API Token

You can generate an API Token on the Tauk Web UI on the User Settings page. You can either generate a new token or click on the Show button to reveal the existing token.

Tauk Project ID

The Tauk Project ID is a unique string that identifies your test execution with a Project on the Tauk Dashboard. The Project ID is visible on the footer section of each Project card in dashboard and is prefixed with a ‘#’.

Adding tauk.observe() to your test case

A test case structured using Mocha or Jasmine frameworks will look similar to this:

The simplest way to add the tauk.observe() function would be to

  • Instantiate Tauk within the describe() hook.
  • Set the driver object in the before() hook.
  • Use tauk.observe() in each of your it() hooks.
  • Call tauk.upload() before ending your driver session in your after() hook.

After adding the above recommendation to the test case, it should look like this

If you are unsure about how to write test cases in TypeScript, you should check out this Medium post explaining the process in detail.

The Tauk Web UI

The Tauk Web UI allows you to view your test results on a unified dashboard with intuitive reporting. Each test execution gets added into a Tauk Project. Each associated project card displays:

  • Name and Description of the Project
  • Health Score of the Test Executions observed using its Project ID
  • Project ID

Project Page

You can dig further into the Project by clicking on one of the project cards. When you click on the project card, it takes you to page listing all the test execution and results breakdown for that project.

In this Project page, you can

  • View a pie chart illustrating the distribution of passed, failed, resolved and excluded test executions.
  • Access to workflow actions like reassigning a failed test case to another team member (sends an email notification to the new assignee).
  • Mark a failed test case as resolved after reviewing it.

Test Report

Each test execution can be analyzed in depth by clicking on the test case name. Clicking on the test case name opens the Report page, which show the details about the test execution extracted with the help of the Tauk Package.

The Report page allows you to:

  • View helpful properties regarding the test execution, such as version name, model of the device and the platform version of the device.
  • If the test execution was a failure, a screenshot shows the contents of the device screen when the exception occurred.
  • A comparison screenshot shows where the test should have ended if the failure did not occur. (Note: This only works if the Tauk platform has access to passed results for a test case).
  • Access to a launch inspector to understand view hierarchy. This can be especially useful when used in tandem with the screenshot to analyze what elements could have been responsible for the failure.
  • Error message and stack trace showing the line numbers where the error got triggered.
  • A section showing the entirety of the logs during the test run. This section can help you sift the logs by typing a keyword into the search box on top.

All Issues assigned to you

Using the sidebar in the Tauk Web UI, you have access to the Issues page as well. This page allows you to:

  • Observe all issues assigned to you.
  • Perform bulk workflow actions such as resolving all issues or assigning them to another team member.

Team Settings

On the bottom left of the Tauk Web UI, you can click the Team Settings icon to access the Team Settings page. This page has an intuitive design which helps you to:

  • Invite a new team member.
  • Revoke usage access of an existing member.
  • Administer access permissions for each member.

Exporting User Data

Within the Settings page, users can conveniently export test data. This can be done by clicking the “Legal & Compliance” Tab and accessing the User Data Export section.

Integrations

Since Tauk is a unified platform, it supports integrations with Github and Slack. There is an integration for JIRA currently under development. On the roadmap, Tauk has integrations for Discord, Trello and GitLab planned.

Integrations for Github and Slack

Conclusion

As you can see, integrating your automation suite with the Tauk platform is simple and straightforward. It is also possible to integrate Tauk with Python Appium or Selenium tests using the official PyPi package available here. Tauk also has an Android package for Espresso. The team is currently working on packages for other test frameworks and new features, and I will follow-up with new blog post content in the future!

--

--