Run same tests with different config

Hi,

I have a set of automated UI tests for a web application.
Iโ€™m using Java, Maven and Junit 4.13.2 (would be willing to update Junit or even use something else).

I want to run all my tests, but with different configurations, and combinations of configurations, such as on different browsers, and with different screen resolutions.
At the moment, all of these config values are in different properties files, which I pass in when executing the tests via Maven.

What I want to achieve, is that with one Maven call, all tests in all variations are being executed (all screen resolutions on all browsers).
Also looking for a nice HTML report containing the test results.

I think parameterized Junit tests is not what Iโ€™m looking for.
Would be willing to use a different test execution engine than Junit, if with that the results would be achieved more easily.

Many thanks in advance,
Christian

3 Likes

Iโ€™m not the biggest expert on UI automation from what I remember Junit can take parameters for tests (similar to TestNG), as far as reporting goes Allure Reporting Framework is quite nice and configurable. Another good option is the Report Portal which gives you a dashboard and the ability to generate visually rich reports.

I understand this isnโ€™t quite what you asked howeverโ€ฆ

In Serenity you can define multiple environments in the serenity.config file.

It would still require different invocations of mvn but you could put that in a batch file.

See below for more info.
https://johnfergusonsmart.com/running-tests-different-environments-browsers-serenity-bdd/#:~:text=The%20latest%20version%20of%20Serenity,results%20in%20the%20same%20report.