You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The slides and task hints for "Test your profiles" suggest to use @EnabledIf to test the configuration depending on the active profiles. With this approach, we would have to run the test once with the affected profile activated and once without the affected profile activated, either manually or via the build system.
From my point of view @EnabledIf should be used for conditions we have no influence on in our tests, for example the used operating system.
For this specific task and in day-to-day projects, I would be using @ActiveProfiles instead and testing the different cases that way. In my last workshop I came up with this sample solution:
I agree that @ActiveProfiles generally is the better solution for this particular use case. The goal here is to show how @EnabledIf works, though.
Can you maybe suggest a better condition to check for other than the active profile? Testing for the operating system probably doesn't make much sense in terms of this task either, because the attendees will only be running the tests on their own machines.
The slides and task hints for "Test your profiles" suggest to use
@EnabledIf
to test the configuration depending on the active profiles. With this approach, we would have to run the test once with the affected profile activated and once without the affected profile activated, either manually or via the build system.From my point of view
@EnabledIf
should be used for conditions we have no influence on in our tests, for example the used operating system.For this specific task and in day-to-day projects, I would be using
@ActiveProfiles
instead and testing the different cases that way. In my last workshop I came up with this sample solution:Regarding the slides, I suggest to delete the slide with
@EnabledIf
and move the slide containing@ActiveProfiles
to that position.The text was updated successfully, but these errors were encountered: