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

RFC: Workflows in Bruno #87

Open
helloanoop opened this issue Feb 9, 2023 · 3 comments
Open

RFC: Workflows in Bruno #87

helloanoop opened this issue Feb 9, 2023 · 3 comments

Comments

@helloanoop
Copy link
Contributor

It is a pretty common use case for a user to have a set of common requests to be executed before running a request.
Examples includes: registration and login, setting up the state of the cart etc.

Here is what I am thinking.
In Bruno, every folder has a index.bru file which contains the common things to be run across all the requests under it like auth, headers etc. To indicate that a folder is a workflow, we add a property called workflow: true inside the meta tag

meta {
  name: Login Workflow
  workflow: true
}

And other requests that need to run a workflow before or after a request can do like below

meta {
  name: Create Order
}

workflows {
  preRequest: login
  postResponse: cleanup
}

A request can execute multiple workflows by specifying the workflows as a comma separated list.

@tibeer
Copy link

tibeer commented Sep 29, 2023

This sounds very interesting. I bet a lot of users have a more complex use case, but mine is simply getting a bearer token for my >400 requests. Currently, I manually run the request from time to time to get the bearer token and save it to an env variable. But it would be quite comfortable to have an option to define an environment variable, that is "just a link" to another request with some filters on the response. I guess Insomnia can do stuff like this. On the other hand: This creates some clutter and it might harm the very clean structure bruno has currently. Keep up the good work :)

@mikaoelitiana
Copy link
Contributor

This is one of the feature I am really hoping to see soon in Bruno ❤️

@mj-h
Copy link
Contributor

mj-h commented Nov 30, 2023

Interesting idea! If we find a way to incorporate "check-status-until-OK-then-continue" kind of workflows, then we would not need .setNextRequest() (#534):

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

No branches or pull requests

4 participants