Open Marek00Malik opened 2 years ago
➜ httpx --version 0.33.0
Now client.assert
just calls console.assert()
, and code assert following:
assert(condition, message) {
console.assert(condition, message);
}
You mean if assertion failed, and exit httpx and return none zero error code like following:
assert(condition, message) {
if(!condition) {
console.error(message);
process.exit(1);
}
}
if I would assume to get some error code when the assertion is failing. This is working when running with docker.
I can add -W
for this feature, and it means warning. If assertion failed, and httpx will exit with none zero code.
thanks @linux-china i'll try that option, but i am wondering, if this is a testing tool to automate checks, should that not be the default behaviour?
-W
not available now, and I will implement this week.
if this is a testing tool to automate checks, should that not be the default behaviour?
Because this behaviour is different with HTTP Client in IDE. But it's ok to add -W
option for CLI. :)
Hi, any update on this? I would love to see this feature for our CI/CD processes
I'm trying to use this tool to run tests outside of my IDE in CICD. So far the called are executed, but the problem I have is that non of my assertions are being tested at all.
Bellow the simplest test for your HTTP example:
Expected result:
Exactly as in IntelliJ, I would imagine the tool to fail/return non zero error code.