|
|
|
|
|
by mittsh
3605 days ago
|
|
As ing33k mentioned, Paw isn't an automated testing tool (at least not yet), but rather an app where you can experiment with your or others APIs to check if things are working, and have a visual feedback/confirmation of what you're doing. But that's actually a great question. We are asking ourselves the same here at Paw: should our app offer a testing/assertions feature? Our own server backend is in Django using the Django REST Framework (it's an amazing tool btw) and clearly unit testing done inside the web framework is the right thing to do. Good frameworks have mocking libraries, and unit tests allows you to exercice all parts of the code (not only API facing). So why testing in an app like Paw? And should we encourage "bad practices" with a new feature that encourages users to have request/response assertions in our app instead proper unit tests? First, everyone isn't writing tests ;) And sometimes maybe for good reasons (quickly putting together an MVP…). Assertions can be a quick alternative before writing proper unit tests. But mostly, we were thinking about assertions in Paw as a great way to do quick integration testing. For example, we've released Paw 3 recently, pushed server updates on an hourly basis, and we had no way to verify after a deploy that all the website's pages were up and that API endpoints were behaving as expected. Sure, the CI was saying that tests are passing, but who knows if someone has changed settings on AWS or on 3rd party tools (Stripe, Algolia…)? We would have loved to have assertions ourselves… |
|