Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞: Inherited test methods don't support their annotations. #1032

Open
1 task done
ingvard opened this issue Apr 12, 2024 · 0 comments · May be fixed by #1033
Open
1 task done

🐞: Inherited test methods don't support their annotations. #1032

ingvard opened this issue Apr 12, 2024 · 0 comments · May be fixed by #1033
Labels
triage type:bug Something isn't working

Comments

@ingvard
Copy link

ingvard commented Apr 12, 2024

What happened?

The getTestMethod method in the io.qameta.allure.junitplatform.AllureJunitPlatformUtils class doesn't function as expected for tests that are inherited. This is because it uses aClass.getDeclaredMethods(), which only operates on the current instance and does not include methods that are inherited. This can cause issues with annotations related to methods, such as descriptions and others.

What Allure Integration are you using?

allure-junit-platform

Steps to Reproduce

  1. Create two test classes:
abstract class AbstractTest {
    @Test
    @Description("Test description")
    fun test() {
    }
}

class ImplTest: AbstractTest() {
}
  1. Run ImplTest.
  2. Check the description in the Allure UI.

Expected Behaviour

The test should contain the "Test description" text in the description section.

Screenshots or Additional Context

The description is absent.

What Language are you using?

Java, Kotlin

What version of Allure Integration you are using?

2.27.0

What version of Allure Report you are using?

2.11.2

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant