Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: a Postman but to simulate bad network conditions?
5 points by andrewjm on May 13, 2021 | hide | past | favorite | 2 comments
Hi HNers,

I'm building a web app to simulate HTTP failures, such as incomplete requests and timeout because of idle socket. It's similar to a very basic Postman, but instead of to test API functionality, it tests how the backend handles bad requests.

Here is the current prototype https://networkbusted.web.app/ - it's not working at all, but wanted to share the idea here to get some opinions. Would you find such an app useful? How would you use it? Feedback would be really appreciated. Thanks!



I'm using Ruby on Rails for most of my web applications. It's very rare that you don't rely on the core wrapper classes that detect all of these network and system errors for you.

So when you receive an invalid request, most of the time the client gets back the appropriate HTTP status code (e.g. bad request when the bytes do not match the size of the request).

When you send an HTTP request e.g. to a payment provider, you need to take care of possible exceptions. This is a bit tricky, since it's hard to know all possible exceptions in advance and need to decide:

* You want to be noticed about the exception

* You want to ignore the exception

* You want to run additional code e.g. a re-try

With this background the workflow is as following:

* Watch for unhandled exceptions in production / staging

* Stub the exception, write a test and handle the error

Returning back to your application: When I understand it correctly, this would only help developers, that e.g. build their own web server or web framework. So I see the number of users for such a service very limited. And nit: I like the approach to have such a service running locally in a docker container like it is possible for https://github.com/chromium/badssl.com, so you can use it for automated testing without network access.


Thank you so much! +1 that badssl.com is a great example to enable common testing cases




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: