thunder-client-support icon indicating copy to clipboard operation
thunder-client-support copied to clipboard

Stop collection on fail

Open andresatierf opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Sometimes it would be nice to stop a collection from running if a request fails

Describe the solution you'd like

I would like an option in the Run Collection advanced menu to stop running the collection if a request fails. Something like a checkbox:

  • [ ] Stop running on request fail

Describe alternatives you've considered

Also, maybe it would be nice to specify this for a single request in the folder For example, a new column, Stop if failed, of checkboxes

Implementation:

andresatierf avatar Sep 15 '22 18:09 andresatierf

Thanks @andresatierf for the feedback, will add to roadmap

rangav avatar Sep 17 '22 03:09 rangav

This feature is now implemented and published to marketplace, please update to v2.4.2

See all features released https://github.com/rangav/thunder-client-support/releases/tag/v2.4.2

Please let me know your feedback.

rangav avatar Feb 17 '23 17:02 rangav

This is amazing, exactly what I wanted @rangav. Great job!

Just have a couple follow up questions.

  1. could we get a setting to make Stop on fail enabled by default?
  2. regarding the initial feature request:

Also, maybe it would be nice to specify this for a single request in the folder For example, a new column of checkboxes, Stop collection if failed

Is this something that could come in the future or are there no plans to add it to tc?

Also went and read the blog post linked in the release. Had no idea there was a new cli. Already installed it!

andresatierf avatar Feb 17 '23 20:02 andresatierf

Glad you like it.

At the request level may be overkill. But will see if anyone else might want this feature. So will review again in the future.

CLI is launched last week, you should have got release notes window opened. May be you might have missed it.

there are lot of new ways you can interact with APIs from CLI, that is not possible with UI.

Please try and let me know your feedback.

rangav avatar Feb 17 '23 20:02 rangav

I tried it for a little bit and had some trouble given my setup. I have several collection for different projects which contain same name folders, eg. login.

I tried to run tc --col="colname" --fol="folname" but that just ran the whole collection.

Also with a structure like this:

- Collection: test
  - Folder: login
    - Folder: dev
    - Folder: staging
  - Folder: logout
    - Folder: dev
    - Folder: staging

would be nice to be able to run the command tc --fol="login/dev" or something similar to differentiate same name folders

andresatierf avatar Feb 17 '23 20:02 andresatierf

Thanks for feedback, will look into it.

Alternatively you can also use folder id

to run folder

  • tc —fol 'FolderNameOrId'

to run collection

  • tc —col 'ColNameOrId'

rangav avatar Feb 17 '23 20:02 rangav

you can use list command to see all folder ids in collection - tc list 'colNameOrId'

Screenshot 2023-02-17 at 21 33 37

rangav avatar Feb 17 '23 21:02 rangav

Thanks, apparently I wasn't updated to most recent release, my output didn't have ids on folders, fixed now image

andresatierf avatar Feb 18 '23 17:02 andresatierf

Please update CLI to v1.0.6, to check current version tc -v

To Update

  • npm i -g @thunderclient/cli

rangav avatar Feb 18 '23 17:02 rangav