My FeedDiscussionsHashnode Enterprise
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Eleonora Belova

10 likes

·

512 reads

4 comments

Eugene Gronski
Eugene Gronski
Feb 11, 2024

Great Article! Allow me light degression - if the context is about testing different users I would prefer fixtures though. It would increase the number of tests in the project, but will keep the config file clean with simply one project.

But, maybe if you are lazy and just want to maintain only one test, the concept itself has the right to exist :)

1
·
·2 replies
Eleonora Belova
Eleonora Belova
Author
·Feb 12, 2024

Eugene, thank you for your feedback! Your points are indeed valid, in this case we simply can use fixtures and keep one project. However, parameterization with different users by project might be reasonable when you'd like to run slightly different set of test cases against each user for example. Then it might be easier to configure them in a project scope. Also, this approach allows us to see report (built-in or Allure report) divided by project (by target user), if that's what we'd like to see at the end. The way we handle parameterization depends on what we would like to solve and possible constraints present.

·
Eugene Gronski
Eugene Gronski
Feb 12, 2024

Good point. I would agree, that the approach or high-level decision of a framework is context-dependent.

My approach to differentiate test cases in reports using different test data would be to add test group annotations in the test description. Thus all tests would be grouped by the assigned group.

Test groups could be stored in the enum.Eleonora Belova

·
Rosemarie Vickers
Rosemarie Vickers
Feb 16, 2024

Good post

·