Yesterday I posted this question on StackOverflow and G+: Is there a url or site like example.org which always produces a 404 error?
Soon after that, I found out three links that produce predictable HTTP status codes:
They also work for https:
- 200: https://www.google.com
- 204: https://www.google.com/generate_204
- 404: https://www.google.com/404
Edit 20241223: these also return a 404: http://www.google.com/undefined and https://www.google.com/undefined
On StackOverflow very few people even noticed the question, probably wondering “why?”.
I’m using these links for positive and negative testing of some http / https handling code that needs to be good at coping with positive and negative responses.
In my testing life, I’ve learned the hard way that both negative and positive tests are core part of your suite, hence the question.
–jeroen
via: Is there a url or site like example.org which always produces a 404 error?. Read the rest of this entry »





