Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Flag a request to be exclude from test runner #1039

Open
stgonzales opened this issue Nov 23, 2023 · 5 comments
Open

[Feature Request] Flag a request to be exclude from test runner #1039

stgonzales opened this issue Nov 23, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@stgonzales
Copy link

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.

@helloanoop
Copy link
Contributor

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

@rabestro
Copy link

@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.

@KirkMunroSagent
Copy link

@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.

@brvaland
Copy link

@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.?

@sanjai0py sanjai0py added the enhancement New feature or request label Jul 2, 2024
@irharrier2
Copy link

@helloanoop your suggested solution is perfect. Any idea when are you going to deliver it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants