Unicity / Gauntlet

A test runner for comparing outputs of HTTP endpoints (Team: US-Backend PM: Mike W.)
Apache License 2.0
1 stars 0 forks source link

Check status code #24

Closed bluetechy closed 8 years ago

bluetechy commented 8 years ago

@powerc9000 Can we add a parameter in the config file to specific what the expected status code should be upon the response and then test against that value instead of only testing against a status code of 200?

Essentially, we can override a status code of 200 for whatever value we want. In the case that I am wanting to test right now, I would like to expect a status code of 500 and its response text and currently there is no way to do that since it requires that a good response is always a 200.

bluetechy commented 8 years ago

Here is an example of what I was thinking the config might look like:

{
"name": "t3",
"files": {
    "inputs": "input.json",
    "output": "output.txt"
},
"status": 500,
"ms": 60
}
powerc9000 commented 8 years ago

This is now available

bluetechy commented 8 years ago

@powerc9000 Great!!!! I will test it out and then close if it works good. Thanks!

bluetechy commented 8 years ago

@powerc9000 It looks like the 500 status code is now being compared, but the output message is not being compared.

powerc9000 commented 8 years ago

@bluetechy should the test be failing and isn't? From the standpoint of the code, everything should be working the same.

bluetechy commented 8 years ago

@powerc9000 It is as though the test is not reported at all. t1 and t2 are written to the screen, but t3 is not.