allure-framework / allure-teamcity

Teamcity CI plugin allowing to generate Allure Report as build artifact
https://qameta.io/allure-report
Apache License 2.0
37 stars 29 forks source link

Possibility to add issues tracker pattern to report #66

Closed cakeinpanic closed 1 year ago

cakeinpanic commented 6 years ago

Hello! We are using the 2.4.1 version of allure plugin in our temacity (allure version is 2.6)

I found a solution how to add link to bugtracker to report: https://github.com/allure-framework/allure-js-commons/issues/13#issuecomment-350418753

I've created allure.properties file at the same folder with allure results with this content:

allure.issues.tracker.pattern=http://my-bugtracker.com/issue/%s
allure.tests.management.pattern=http://my-testmanagement.com/testcase/%s

But it works only locally, teamcity plugin ignores this properties.

How can i pass them to plugin?

cakeinpanic commented 6 years ago

I have made some investigation and found out that there is a scheenshot of plugin in your doc: https://allure-framework.github.io/allure-docs/2.0/#_configuration_5 screen

And there is actual screenshot of our installed plugin:

screenshot 2017-12-13 18 21 21

As you see, options for issue tracker pattern и test management pattern are absent

So if i am NOT using maven, is there any way to provide them?

cakeinpanic commented 6 years ago

@eroshenkoam @baev please take a look

vbragin commented 6 years ago

@cakeinpanic I tried to reproduce this problem but failed. Everything work fine (allure teamcity plugin: 2.6; allure-commandline: 2.4.1).

steps:

In the report links exist:

1
choojoykin commented 6 years ago

@vbragin The problem is that these two parameters have been removed from the teamcity plugin. They were convenient when more than one space was used for tms. Yes, you can throw in the test itself in the annotation the full link to the case. But it was more convenient when the settings in the plug-in had these parameters. and @cakeinpanic no need create allure.properties file or update tms link in all tests @cakeinpanic am i right?

baev commented 6 years ago

The problem is that these two parameters have been removed

These parameters were removed because since Allure 2 such config files are moved to adaptor side. So such configuration doesn't make sense for most Allure users. You can still use Allure TeamCity with Allure 1 adaptors but now you need to copy allure.properties file to your results directory by yourself.

choojoykin commented 6 years ago

@baev ok, I understood. So it's easier to specify the full path to the case in the test itself in tmslink in my case. thank you

cakeinpanic commented 6 years ago

@baev as i have mentioned in the start, i have created such file, but it hadn't helped

eroshenkoam commented 6 years ago

@cakeinpanic I will fix it soon, sry for such delay

nazarpryymak commented 5 years ago

@cakeinpanic I will fix it soon, sry for such delay

Do you have some estimate when mention issue will be fixed ?

eroshenkoam commented 5 years ago

@nazarpryymak sry about such delay. I will fix it on next week

nazarpryymak commented 5 years ago

@eroshenkoam Do you have some progress on this task ?

nazarpryymak commented 5 years ago

@nazarpryymak sry about such delay. I will fix it on next week Do you have some stoppers ?

nazarpryymak commented 5 years ago

@eroshenkoam Do you have some progress on this task ?

eroshenkoam commented 5 years ago

@nazarpryymak which version of allure adapter you are using?

nazarpryymak commented 5 years ago

'pytest==3.5.0', 'allure-pytest==2.5.2', 'pytest-allure-adaptor==1.7.9'

================= Python 2.7.12

sseliverstov commented 5 years ago

@nazarpryymak you can provide pattern directly via allure plugin option --allure-link-pattern

nazarpryymak commented 5 years ago

@sseliverstov same problem is visible when I am starting test via command: pytest tests/some_test.py --alluredir $ALLURE_DIR --allure-link-pattern "https://jira.some_domen.net/browse/%s"

sseliverstov commented 5 years ago

@nazarpryymak

@sseliverstov same problem is visible when I am starting test via command: pytest tests/some_test.py --alluredir $ALLURE_DIR --allure-link-pattern "https://jira.some_domen.net/browse/%s"

You need to define what kind of link pattern you want set, for example, for issues: ISSUE:https://jira.some_domen.net/browse/%s

Also some examples in tests: https://github.com/allure-framework/allure-python/blob/master/allure-pytest/test/links/links_pattern_test.py

choojoykin commented 5 years ago

But allure teamcity plugin didnt provide this

nazarpryymak commented 5 years ago

@sseliverstov Thanks for detailed information. My last test result pytest tests/some_test.py --alluredir $ALLURE_DIR --allure-link-pattern "issue:https://jira.some_domen.net/browse/{}"

Test: CUSTOM_LINK_TYPE = 'docs' CUSTOM_LINK = 'pytest' @allure.issue("LB-12345") @allure.link(CUSTOM_LINK, link_type=CUSTOM_LINK_TYPE) def test_some_test(self)

Allure report: image

Question: 1) Why bug is not clickable ? 2) Why text LB-12345 is missing in html page ? 3) Is it possible to specify --allure-link-pattern in allure.properties file ?

nazarlviv07 commented 5 years ago

When I used in my test: @allure.issue('XXXX-1946') def test(): pass and started test via command: pytest tests/some_test.py --alluredir $ALLURE_DIR --allure-link-pattern "issue:https://jira.some_domen.net/browse/{}"

Then it works. Thanks @sseliverstov