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

Execution sequence of 'Script' and 'Tests' blocks at the collection level and request level - inconsistent between UI app and CLI #2617

Open
2 tasks done
anubhavhazarika opened this issue Jul 10, 2024 · 2 comments · May be fixed by #3049
Labels
bug Something isn't working

Comments

@anubhavhazarika
Copy link

anubhavhazarika commented Jul 10, 2024

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

With reference to an earlier reported issue #2597, we (@hbrahi1) understand that the new execution sequence is now the "Sandwich Flow" (Thank you @Its-treason for clarification).

However, we further notice that this execution sequence is inconsistent between the UI app and CLI. The app seems to be using the (new) "Sandwich Flow' while the CLI uses the (previous) "Normal Flow". We believe both should be consistent with each other.

.bru file to reproduce the bug

Test collection 'Bruno Execution Sequence' to reproduce the above-reported bug (by running in the app vs CLI):

Bruno Execution Sequence.zip

Screenshots/Live demo link

Bruno Execution Sequence in UI app v1.20.4:
image

Bruno Execution Sequence in CLI v1.20.4:
image

@anubhavhazarika anubhavhazarika added the bug Something isn't working label Jul 10, 2024
@Its-treason
Copy link
Member

Folder level scripts, variables, etc are not implemented in CLI. The inital PR also does no real changes to the CLI: #2529

@zdelcoco
Copy link

zdelcoco commented Sep 6, 2024

I just ran into this today. I defined a variable (that holds the schema definition for a response) in each request. The variable is referenced in the folder script and validated via Ajv -- this works since the request script is run first, its a way of "passing" the schema to the folder level validation. It works great in the UI, but sadly does not run the validation logic via CLI (since it's folder level script). Hoping the CLI gets updated to parity with the UI!

Edit: here is a PR that addresses this issue: #3049

@zdelcoco zdelcoco linked a pull request Sep 6, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants