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
I have a use case where I would like to have multiple world classes and set the world-class I want to use for my tests based on the tags passed in. An example of how I would like to use it is shown below
The BeforeAll hook does not have access to the command line or tag data so it would be great to have the option of passing in the tags or command line options so that we can perform some action before entering any tests. Another option is to allow some type of setting of cucumber global variables that can be accessed from anywhere. Protract has an onPrepare function in their config file which is run before entering protractor tests and this functionality would be great to have too.
The text was updated successfully, but these errors were encountered:
You could use profiles to load in different support files and thus have separate world / configs
Another approach would be to use a single world instance and use world parameters to switch the internals of the world instance.
Yep, good call out @charlierudolph I thought about both of those solutions. Having two separate support folders is an option but not ideal. As for the world parameters, I'd rather separate out the world classes rather than change them based on parameters. It's a case of wanting to separate out world class based on the testing type undertaking. Thank you for your suggestions.
I have a use case where I would like to have multiple world classes and set the world-class I want to use for my tests based on the tags passed in. An example of how I would like to use it is shown below
BeforeAll({ tags: "@api" }, async function() { setWorldConstructor(APIWorld); setDefaultTimeout(25000); TestConfig.setup(); });
and
BeforeAll({ tags: "@ui" }, async function() { setWorldConstructor(UiWorld); setDefaultTimeout(25000); TestConfig.setup(); });
The BeforeAll hook does not have access to the command line or tag data so it would be great to have the option of passing in the tags or command line options so that we can perform some action before entering any tests. Another option is to allow some type of setting of cucumber global variables that can be accessed from anywhere. Protract has an onPrepare function in their config file which is run before entering protractor tests and this functionality would be great to have too.
The text was updated successfully, but these errors were encountered: