Kong / Kong/insomnia

[FEATURE REQUEST] Edit requests programmatically in Unit Tests (e.g. query variables, request body, headers, ...) #4482

Open
#3,128 15 comments 3 reactions 0 assignees View on GitHub
C-improvement PA-testing
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

I am testing my login endpoint in Insomnia Designer with the integrated test tool.

A successful login test looks like this with the selected login request:

```
const response = await insomnia.send();
const body = JSON.parse(response.data);

expect(response.status).to.equal(200);
expect(body).to.have.property("token");
```
Now I want to change the test with invalid credentials in order to check for a response.status 401.

How can I change the payload I send in a test programmatically so that I can send invalid credentials?

Contributor guide

Open the contributing guide

Research direction

Start by tracing the integrated test tool from the selected request through insomnia.send() and identify whether tests can access request query variables, body, or headers. Done means a test can modify request data before sending it and verify the resulting response, including an invalid-login case that returns status 401.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.