flawiddsouza/Restfox

Making a request now triggers plugin/post-scripts of all requests

Closed this issue · 10 comments

I imported a postman collection, some requests have post scripts, some don't. However when I call a request without postscript, looking into console logs, all post scripts are now triggered.

for instance this request has only one test, but it calls 100+ tests from other requests.

Screenshot 2024-10-11 at 09 51 13

Screenshot 2024-10-11 at 09 47 50

I have been suspecting that there might be a bug in the import code. Related to postman.

Check your plugins in the navbar just in case. I have seen some stray global plugins appear.

Also, this seems like there are multiple scripts attached to the same collection id. Can you send your postman collection here (removing all sensitive data) so I can debug and fix this?

not sure if that's related but when I have script on top folder, importing into restfox, shall we convert it as plugins?
Screenshot 2024-10-11 at 11 16 49

Attached collection: Debug.postman_collection.json

I have been suspecting that there might be a bug in the import code. Related to postman.

Check your plugins in the navbar just in case. I have seen some stray global plugins appear.

Also, this seems like there are multiple scripts attached to the same collection id. Can you send your postman collection here (removing all sensitive data) so I can debug and fix this?

here you go
Too many tests.postman_collection.json

Thanks that really helped. Issue is that imported scripts have workspaceId filled for plugins data:
image

This shouldn't happen as anything with workspaceId is considered a workspace level plugin. I've pushed a fix.

The issue becomes obvious when you open the plugins for the workspace from the navbar:
image
You see lots of empty workspace plugins.

not sure if that's related but when I have script on top folder, importing into restfox, shall we convert it as plugins? Screenshot 2024-10-11 at 11 16 49

Attached collection: Debug.postman_collection.json

Yes that should be good.

By the way, I'm really glad you caught this bug. I've noticed the random empty plugins once in a while in the workspace plugins list and it had been bothering me. Didn't know what was causing it. Had it in my todo list to check it out.

By the way, I'm really glad you caught this bug. I've noticed the random empty plugins once in a while in the workspace plugins list and it had been bothering me. Didn't know what was causing it. Had it in my todo list to check it out.

nice to hear that issue has been resolved.

Screenshot 2024-10-11 at 17 39 50

hey @flawiddsouza just found one thing, I set post script at grandchild 1 folder, but it was lost when importing into restfox.

Send your PR. I'll look into it.