-
-
Notifications
You must be signed in to change notification settings - Fork 442
Description
In my team we use ZeroCode to support our component tests - where we validate the integration of our components against the services it interact with (some are real others mocks).
Given our use case, not knowing if more peoples have similar needs, I would propose the following.
We use the same scenario files in different use cases and some of those require specific actions to be done prior to each test. Currently we do have a way to incorporate this in scenario files because including those actions break some use cases.
The way I see this is to have additional step properties that determine if the step is or not evaluated. Something like:
(...)
{
"name": "adjust setup to local execution",
"url": "com.example.my_component_component_testing.helpers.db.SQLExecutor",
"method": "sqlFileExecutorNoWait",
"request": "/setup/update_db_for_local.sql",
"assertions": {},
"apply": "${config.is_component_running_locally}"
},
(...)
where we implement a new optional parameter (apply in the example above) that by default is resolved to TRUE but if defined its interpretation would determine if the step would actually be executed.
In proposed example the step refers to a variable defined in the config_hosts.properties (config.is_component_running_locally) that would have to be interpreted to a bool value but it's execution could also be determined by a variable coming from previous steps.
For simplicity sake I am proposing that the variable value would be restricted to directly boolean values convertible strings but a discussion on more complex expressions might be worth.
Thanks for your attention.