Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
https://insomnia.rest
Apache License 2.0
34.21k stars 1.92k forks source link

Pre-Request Scripts are not executed in Test-Suites #7703

Open 1234Georg opened 1 month ago

1234Georg commented 1 month ago

Expected Behavior

I have implemented a request, that has a pre request script. The pre-request script gets executed when I execute it in the collection tab. When I integrate the request in a test suite the pre request script should be executed when running the tests.

Actual Behavior

In a unittest in Insomnia the pre request script are not executed

Reproduction Steps

No response

Is there an existing issue for this?

Additional Information

This is the step in the test suite: const response1 = await insomnia.send(); expect(response1.status).to.equal(204);

Version: Insomnia 9.3.2 Build date: 4.7.2024 OS: Windows_NT x64 10.0.22631 Electron: 30.0.9 Node: 20.11.1 Node ABI: 123 V8: 12.4.254.20-electron.0 Architecture: x64

Insomnia Version

9.3.2

What operating system are you using?

Windows

Operating System Version

Windows 11 Enterprise, 23H2

Installation method

Downloaded from Insomnia Website

Last Known Working Insomnia version

No response

ihexxa commented 1 month ago

Hello @1234Georg , test suites are based on different mechanism and temporarily not be able to trigger script execution, but we are introducing runner feature to resolve this.

blanche07 commented 1 week ago

Btw, I've noticed that the pre-request scripts and after-response scripts aren't executed through plugins. And I check the docs there's no related hook to the new feature. Shall I open a new issue? Thank you very much.