Skip to main content

Helper package to facilitate reporting for webdriver-based tests on Tauk

Project description

Tauk Python Package for WebDriver-based Tests

The Tauk Python Package allows you to easily report and monitor your Appium automation tests on the Tauk platform.

Installation

$ pip install tauk

Usage

Import the Tauk package in your test suite.

from tauk import Tauk

Initialize Tauk with your driver, API TOKEN, and PROJECT ID.

You can retrieve your API TOKEN and PROJECT ID from the Tauk Web UI. Your tokens can be generated and retrieved from the User Settings > API Access section. Each of your project cards will have their associated project id's in the # section.

Tauk.initialize(api_token="API-TOKEN", project_id="PROJECT-ID", driver=self.driver)

If you want to exclude a test case from analysis you can pass in the argument excluded=True. For example:

Tauk.initialize(api_token="API-TOKEN", project_id="PROJECT-ID", driver=self.driver, excluded=True)

Decorate your individual test case methods with @Tauk.observe.

Add the @Tauk.observe decorator above the test case methods you want Tauk to watch. For example:

@Tauk.observe
def test_Contacts_AddNewContact(self):
	print("Clicking on the [Add] Button")
	self.wait.until(expected_conditions.presence_of_element_located(
		(MobileBy.ID, "com.android.contacts:id/floating_action_button"))
	).click()

Call Tauk.upload() before ending your driver session.

Tauk.upload()

Recommendations for use in test frameworks

When using the Tauk package in test frameworks, such as unittest and pytest, here are some recommendations:

  • Call Tauk.initialize(...) within the your set up method or fixture.
  • Call Tauk.upload() in your teardown method or fixture.

For sample code, please take a look at the android_contacts_tests.py test case in the tests directory of the repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tauk-0.0.4.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

tauk-0.0.4-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page