[GH-ISSUE #644] Test script is not run after failing request #227

Closed
opened 2026-03-16 14:08:41 +03:00 by kerem · 1 comment
Owner

Originally created by @Bettelstab on GitHub (Mar 4, 2020).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/644

Originally assigned to: @liyasthomas on GitHub.

I run an unauthenticated request against an endpoint requiring authentication, so I get a 401 response. In the test script, I want to test for that response:

pw.expect(pw.response.status).toBe(401);

But the test script is not executed, as it seems.

Edit:

Steps to reproduce:

  1. Put https://api-staging.fashiontale.de/protected/address as URL
  2. Click 'Add test script' and uncomment the example code
  3. Click 'Send'.
  4. 401 response is shown, but nothing happens in regards of the test.

Expected behaviour: Show that the test failed. (As 'variable' !== 'value')

System: Chome 80 installed PWA with browser extension.

Originally created by @Bettelstab on GitHub (Mar 4, 2020). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/644 Originally assigned to: @liyasthomas on GitHub. I run an unauthenticated request against an endpoint requiring authentication, so I get a 401 response. In the test script, I want to test for that response: ``` pw.expect(pw.response.status).toBe(401); ``` But the test script is not executed, as it seems. Edit: Steps to reproduce: 1. Put `https://api-staging.fashiontale.de/protected/address` as URL 2. Click 'Add test script' and uncomment the example code 3. Click 'Send'. 4. 401 response is shown, but nothing happens in regards of the test. Expected behaviour: Show that the test failed. (As 'variable' !== 'value') System: Chome 80 installed PWA with browser extension.
kerem 2026-03-16 14:08:41 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@liyasthomas commented on GitHub (Mar 4, 2020):

Please explain steps to reproduce the issue

<!-- gh-comment-id:594514649 --> @liyasthomas commented on GitHub (Mar 4, 2020): Please explain steps to reproduce the issue
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#227
No description provided.