allure-java icon indicating copy to clipboard operation
allure-java copied to clipboard

Link annotation doesn't work correctly without parameter `allure.link.custom.pattern`

Open simple-elf opened this issue 5 years ago • 1 comments

I'm submitting a ...

  • [x] bug report

What is the current behavior?

Allure Docs describe us how to use @Link annotation by this example:

@Link("https://example.org")

And later in the docs there is an example of using link patterns with allure.properties file:

allure.link.mylink.pattern=https://example.org/mylink/{}
allure.link.issue.pattern=https://example.org/issue/{}
allure.link.tms.pattern=https://example.org/tms/{}

But these examples only for @Issues and @TmsLink annotations. So this annotation generates results *.json file like this: "links":[{"name":"https://docs.qameta.io","type":"custom"}] This link has no URL in Allure Report (see demo report)

But then we set allure.link.custom.pattern property in allure.properties file - Link works!

allure.link.custom.pattern={}

This pattern looks useless, but without it, links don't work

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

The demo project is in allure-examples, and also there is demo report

What is the expected behavior?

@Link("https://example.org") annotation with one parameter should work without system property, like link("http://ya.ru") lambda method. This should generate a link with the same name and URL. Results *.json file should contains

"links":[{"name":"https://example.org","url":"https://example.org","type":"custom"}

Please tell us about your environment:

Allure version 2.13.6
Test framework [email protected]
Allure integration [email protected]

Other information

simple-elf avatar Oct 07 '20 15:10 simple-elf

@Issue and @TmsLink annotations have the same issue. Links don't work without a system property allure.link.issue.pattern or allure.link.tms.pattern

simple-elf avatar Oct 09 '20 04:10 simple-elf