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

Junit sample - broken link in report and inability to add more narrative #3126

Open
huima opened this issue May 3, 2023 · 3 comments
Open

Comments

@huima
Copy link

huima commented May 3, 2023

Problem:

Based on documentation and examples, it is unclear how in JUnit based scenario developers could add narrative documentation to be used in the reports.

After reading BDD in action and Serenity BDD documentation about the living documentation features, I had assumption and expectation that same features and functionalities would be available also when using just JUnit tests.

I tested this with current serenity-junit-starter, using Serenity BDD 3.6.12 and the template on Ubuntu Linux, openjdk 19.

I tried adding @Narrative annotation to the WhenSearchingForTerms test class.

I tried to add package-info.java to the starter.wikipedia package with @Narrative annotation.

Neither of those was processed into the content anywhere.

Additionally in the example case report while listing Automated Tests the link on Feature column item "When searching for terms" is to a non existent page.

Expectation:

Product documentation and or test cases would show and describe all the available features and capabilities that are available in different configurations.

Additional discussion:

I started to look at the source code of the product, but the codebase is huge and has layers of also old features - so it is not quite easy to understand how everything works.

I've tried to look around serenity-model, serenity-junit5 and serenity-core but it is hard to understand how things work together and where to actually start to read things. And build better understanding.

Any help and insight would be appreciated, and I could based on that contribute something to documentation and / or tests, so that other new people would not make the same mistakes.

I already also asked in the discussion group:

https://matrix.to/#/!QxFcPAtRfsRjFzyfCj:gitter.im/$mdgCqmcO4AGKTU79acZBtrEFclr3B0JR4tcj0tvhz5w?via=gitter.im&via=matrix.org

@wakaleo
Copy link
Member

wakaleo commented May 3, 2023

Thanks for proposing to help Huima. Features like the @Narrative annotation are related to the JUnit 4 Serenity integration - the JUnit 5 integration is a completely different implementation, and doesn't have those features yet (it's still evolving feature-wise). @cliviu might have some ideas on this too.

@globalworming
Copy link
Collaborator

it works good for me. admittedly, you don't have the whole markdown support and images etc, only text
see package.info https://github.com/globalworming/serenity-junit-screenplay-starter/blob/main/src/test/java/com/example/e2e/browser/package-info.java

image

and class https://github.com/globalworming/serenity-junit-screenplay-starter/blob/main/src/test/java/com/example/e2e/browser/ReportNavigatorIT.java#L19

image

and it's junit5

@huima
Copy link
Author

huima commented May 4, 2023

Thanks @globalworming - I can try to see if that works on my machine, and then what are the differences.

In any case I would like to understand the information processing pipeline better and contribute to the documentation / information then more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants