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

New Feature: Post Pesponse for both "before request" and "after request" #2680

Open
1 task done
tho-gru-38 opened this issue Jul 22, 2024 · 2 comments
Open
1 task done
Labels
enhancement New feature or request mid-term-goal Mid Term Goal module-workflows

Comments

@tho-gru-38
Copy link

tho-gru-38 commented Jul 22, 2024

I have checked the following:

  • I've searched existing issues and found nothing related to my issue.

Describe the feature you want to add

Hi,

I have read #2597 which clarified the situation of execution sequence of scripts at different levels: collection folder, request.

Unfortunately the current sandwich flow almost make it impossible to import a Postman collection without massive changes. All tests at collection or folder level must be duplicated to the requests. Doing so will result in a working but unmaintainable collection.

So I want to get a separation of "Post Response" and "Tests" in to different sections: before request and after request

Following my idea will meet all requirements:

  1. Easier import collections from Postman
  2. Fulfill the wishes of the users who voted for the sandwich flow

------------ insertion on 20240723 start
The reason for having both "before request" and "after request" is that i plan:

  1. providing function definitions for all requests used in der prost response and tests section
  2. Based on the result of the response I can implement a conditional workflow easier when scripts are also executed after the response (as described in Proposal: Conditional Workflow #1100)
    ------------ insertion on 20240723 end

The following diagram illustrates the execution sequence:

Execution-Sequence-01 drawio

Kind regards
Thomas

Mockups or Images of the feature

For Folder an Collections the dialog can look like these:
Folder-Scripts
Folder-Tests

@tho-gru-38 tho-gru-38 added the enhancement New feature or request label Jul 22, 2024
@Its-treason
Copy link
Member

Its-treason commented Jul 22, 2024

I feel like this would overcomplicate things. The better (and already planned) solution was to have a toggle Sandwich & natural flow on collection level: #2639

@tho-gru-38
Copy link
Author

Hi @Its-treason,

thanks for your reply.

I rethink my feature request and edited it.

The advantage of having both also is that at collection/folder level I can define generally used functions on one hand and on the other the after having the response at collection/folder level I can decide how to continue with the conditional workflow.

Kind Regards
Thomas

Its-treason added a commit to Its-treason/bruno that referenced this issue Jul 25, 2024
- Adds a new key in the `bruno.json` under `scripts.flow`
- When concating post and tests scripts the flow will now be used
  to determine to correct order

Fixes: usebruno#2648 usebruno#2680 usebruno#2597 usebruno#2639
lohxt1 pushed a commit that referenced this issue Jul 26, 2024
- Adds a new key in the `bruno.json` under `scripts.flow`
- When concating post and tests scripts the flow will now be used
  to determine to correct order

Fixes: #2648 #2680 #2597 #2639
jwetzell pushed a commit to jwetzell/bruno that referenced this issue Aug 2, 2024
- Adds a new key in the `bruno.json` under `scripts.flow`
- When concating post and tests scripts the flow will now be used
  to determine to correct order

Fixes: usebruno#2648 usebruno#2680 usebruno#2597 usebruno#2639
@anusree-bruno anusree-bruno added the mid-term-goal Mid Term Goal label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mid-term-goal Mid Term Goal module-workflows
Projects
None yet
Development

No branches or pull requests

4 participants