StackExchange / httpunit

httpUnit tests compliance of web and net servers with desired output.
https://godoc.org/github.com/StackExchange/httpunit
MIT License
164 stars 13 forks source link

Support Negative String/Text Match #1

Open kylebrandt opened 9 years ago

kylebrandt commented 9 years ago

There are instances where instead of looking for a string, it is better to look for the absence of the string. For example at Stack we have an http ping route which returns a bunch of "true" values in the JSON. the Text/String field could just make sure that false is not anywhere in the document as text (Other routes are like this but not json structured, this is just an off hand example).

Bug part: I'm calling this "String/Text" because the ReadMe says the field is called "String", but from what I can tell it seems like that is a mistake and it should be Text, in the TOML section:

Each [[plan]] lists:

kylebrandt commented 9 years ago

If it isn't already, it would also be useful to support multiple string / regex declarations, and have them all AND'd together.