Skip to main content

Python Unit Test Reporting to TeamCity (EXTENDED)

Project description

teamcity-messages-extra

license tests Current version on PyPi PyPI - Python Version

teamcity-messages (JetBrains official package) has no activity for over one year.

This package will try to address some of the missing features by extending official one. It's not a fork, teamcity-messages is an actual dependency so that any dependency analysis tools (eg, dependency-check) properly identify it.

Usage

Just import teamcity_extra instead of teamcity. Everything from the official package will be available, plus the extra.

Instead of:

from teamcity.messages import TeamcityServiceMessages

Use:

from teamcity_extra.messages import TeamcityServiceMessages

Extra

TeamcityServiceMessages.testMetadata

testMetadata service message

TeamcityServiceMessages.buildStatisticValue

buildStatisticValue service message

TeamcityServiceMessages.addBuildTag

addBuildTag service message

TeamcityServiceMessages.addBuildTag

removeBuildTag service message

TeamcityServiceMessages.NO_OUTPUT

NO_OUTPUT output will make all service message calls / methods in TeamcityServiceMessages to not print anything.

This allows for simpler code when teamcity output is optional

from teamcity_extra.messages import TeamcityServiceMessages, NO_OUTPUT

# None is the default value (stdout)
tsm = TeamcityServiceMessages(output=None if should_report_to_teamcity() else NO_OUTPUT)

with tsm.test('thisTest'):
    doWhatever()

Supported by

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