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

Can I add Reporting ability of Serenity into an existing project which has its own dependencies already? #2961

Closed
cbaquero-ar opened this issue Nov 2, 2022 · 7 comments
Labels

Comments

@cbaquero-ar
Copy link

I'm working with an existinng framework that already has it base page objects and test base classes, and I want to use Serenity for reporting. Is this possible? The project is using TestNG but I plan to move to Cucumber.
Thanks

@wakaleo
Copy link
Member

wakaleo commented Nov 2, 2022

If you are migrating from TestNG already it would probably be easier simply to rewrite the tests using Serenity - Serenity has it's own way of managing the WebDriver lifecycle events that won't work if you try to use your own page objects. You also lose the option of using a more modern pattern such as Screenplay.

@cbaquero-ar
Copy link
Author

cbaquero-ar commented Nov 2, 2022

[updated] I see, it will probably be just re-writting the base page objects and test classes... but, is there any official documentation to follow on using Serenity with Page Objects pattern? I'm not sure we can migrate also to Screenplay pattern right now...

@wakaleo
Copy link
Member

wakaleo commented Nov 2, 2022

The official documentation is on https://serenity-bdd.github.io/.

@cbaquero-ar
Copy link
Author

Sorry, I already read the documentation for Page Objects, I have to revisit. I was looking for a way to avoid migrating all my tests, but I will definitely reconsider. Thanks!

@cbaquero-ar
Copy link
Author

Is there any way to create and maintain my PageObject extending classes on src/main/java folder? Currently I was only able to extend PageObject class having my child classes under src/test/java

@wakaleo
Copy link
Member

wakaleo commented Nov 11, 2022

Is there any way to create and maintain my PageObject extending classes on src/main/java folder? Currently I was only able to extend PageObject class having my child classes under src/test/java

You can place your page object classes anywhere you want, as long as you have the Maven dependencies in the right scope.

@cbaquero-ar
Copy link
Author

Oh, I see! I was struggling with that witout noticing until an hour ago. Thanks!

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

No branches or pull requests

2 participants