insomnia
insomnia copied to clipboard
[FEATURE REQUEST] Edit requests programmatically in Unit Tests (e.g. query variables, request body, headers, ...) #4482
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?
See open PR for this functionality https://github.com/Kong/insomnia/pull/2994
See open PR for this functionality https://github.com/Kong/insomnia/pull/2994
Thanks, looks like PRs are not handled timely.
Thanks, looks like PRs are not handled timely.
It is what it is, from what I've read the team is working on a major release at the moment, it should be in the next few releases so it's okay
re: timelines just want to say I appreciate the feedback and we're doing the best we possibly can at the moment especially with so many releases recently. I, along with others from the core team, have been trying quite hard recently to get caught up with many of the issues/PRs that are open right now - but it's a long process.
Thanks again
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any update on this thread ? 🤔
I can see the PR being staling for like 11+ months
Could be such a nice feature !
Hi @sebastianbuechler, we are cataloguing this feedback to try and come up with a feasible plan to improve the test feature completely.
@MrStanDu33 regarding the stalled PR #2994, we will probably not look at it anytime soon, but we'll update you and the other folks if we do end up kicking off the improving test feature work after we finish other big chunks of work we have in progress (WebSockets support, better login, ...). Sorry for the stall, the team is aware the Test feature hasn't really been a priority in a while, so it's a bit of a such is life situation right now 😅 🤷
Feel free to report any issues or ideas for improvements you come across in the meantime! Also I'd encourage any of you to drop by and join us on our weekly Insomnia Stream (see details on #stream
channel over at https://chat.insomnia.rest/, happens every Tuesday at 14:30 UTC), and share more ideas you'd like to see in Insomnia
any updates on this?
@mugi-luffy there's a good chance this will get done this year. In terms of roadmap it won't get done this quarter, but we have this change and a lot of other Test feature related changes planned for this year.
cc @wongstein
This is currently a big drawback of using the test part of Insomnia (cli) as we cannot use this within our pipelines currently.
Any chance this can get high(er) priority? If it helps, the functionality we're looking for is to change the routing which are currently supplied by either the environment or a prompt with a default value.
Is there currently an open draft PR?
any updates on this? pre-requests and query enviroment variables are very important . any update on this ?
Also following up as this is a critical ability for testing with Insomnia.
Any updates for this? Changing requests seems like a critical ability for automating the testing of our api's... ever since closing of https://github.com/Kong/insomnia/pull/2994 we heard nothing anymore...
Also an update on the documentation would help aswell since there's still a mention of a debug tab.... which isn't there anymore on the latest version