JetBrains / teamcity-messages

Python Unit Test Reporting to TeamCity
https://pypi.python.org/pypi/teamcity-messages
Apache License 2.0
136 stars 81 forks source link

Each behave step is considered a test in TeamCity #263

Open zadigus opened 2 years ago

zadigus commented 2 years ago

I have set up the TeamcityFormatter as explained here in my project. When I run the behave tests, I get console outputs of the type

##teamcity[testFinished timestamp='2022-06-23T13:26:43.701' duration='95' name='When the Trainer starts a training using this bundle ID']
##teamcity[testStarted timestamp='2022-06-23T13:26:43.702' name='Then the training starts']
##teamcity[testFinished timestamp='2022-06-23T13:26:43.702' duration='0' name='Then the training starts']
##teamcity[testStarted timestamp='2022-06-23T13:26:43.702' name='And the Trainer gets a model ID']

etc.

Of course, this results in a test report that doesn't meet my requirements: every gherkin step is considered a test on its own. I want to setup the TeamcityFormatter in such a way that each scenario is considered as test. How do I achieve that? It's difficult to find documentation on this. The workaround is to configure behave in such a way that it outputs the junit reports and to activate the TeamCity XML Report Processing feature.