bruno
bruno copied to clipboard
[Feature Request] Flag a request to be exclude from test runner
It would be good to have a way to mark each request to be exclude from the test runner. This could be by adding a meta flag or in a blacklist format.
Yes, we will support this.
I am thinking of supporting a more generic feature called tags
Here is how I am envisioning it
- A tag is essential a string. Ex:
regression
,sanity
- Each request can have multiple tags
- When running the collection, we should be able to run tests where only requests with a certain set of tags get included
Here is how it would look in the bru file.
meta {
name: Get Users
type: http
seq: 1,
tags: [
sanity,
regression
]
}
The GUI Collection runner will support options to only run requests which match a certain set of tags.
In the CLI, we can have something like
bru run --tags=sanity,regression
Let me know if you have feedback or suggestions
cc @dcoomber @jeff-edmondson-pci @rabestro @mj-h @Its-treason @martinsefcik
@helloanoop The concept of tags is handy, and it is supported by many testing frameworks. I suggest considering the option not only to run tests that contain a specific tag but also to exclude tests with a particular tag. For example, in the Karate framework, there is no special annotation, but you can add a tag named "ignore" and then run tests while excluding the ones with the "ignore" tag.
@helloanoop The concept of tags is handy, and it is supported by many testing frameworks. I suggest considering the option not only to run tests that contain a specific tag but also to exclude tests with a particular tag. For example, in the Karate framework, there is no special annotation, but you can add a tag named "ignore" and then run tests while excluding the ones with the "ignore" tag.
Maybe something like this then?
bru run --tags=sanity,regression --exclude-tags=ignore
That way it's not specific to a hard-coded tag name like ignore
, and the collection that is run is the aggregate of all tests that match at least one of the tags in the --tags
argument, minus any tests that match at least one of the tags in the --exclude-tags
list.
@helloanoop do we have any estimate when this feature will be available as we integrate our collection with CICD and would like to exclude few POST request for PRODUCTION environment to avoid adding data.
Is there a workaround which I can explore via script to move to next/skip request in the runner.?
@helloanoop your suggested solution is perfect. Any idea when are you going to deliver it?
Seems to be related to or possibly even implemented (different solution than suggested) with #2397