I used to use postman but that seems to becoming more and more a paid product?
Is there any proper opensource/free alternatives out there people can vouch for?
I used to use postman but that seems to becoming more and more a paid product?
Is there any proper opensource/free alternatives out there people can vouch for?
From what I understood, Hoppscotch was kind of trying to be an open source postman option.
GitHub: GitHub - hoppscotch/hoppscotch: đź‘˝ Open source API development ecosystem - https://hoppscotch.io
What do you mean “not cURL” ?!
For quick and dirty testing I’ve used that, or HTTPie which allows for a richer CLI experience.
I was recently impressed to see SoapUI still kicking too. Hadn’t used it in anger for years but I got right back into the groove and did some complex API discovery and state manipulation.
Hoppscotch looks nice. I’ll try to keep in mind next time I need to mess around with an API that doesn’t provide something like Swagger.
In terms of creating a test suite for doing a range of tests against an API, using Python with pytest and httpx might be worth a look. I was recently trying to re-implement an API that wasn’t well documented and used them to code up a bunch test cases to document the behaviour of the various endpoints (which I could then also use to validate my own implementation). Test cases are pretty simple:
def test_authenticate():
response = httpx.post(
f'{API_BASE}/api/v1/authenticate',
json={
'user': {
'login': 'testuser',
'password': 'sekret',
},
},
)
assert response.status_code == 200
assert response.json() == {
'username': 'testeuser',
'token': 'some_random_token',
}
Using pytest’s parametrize feature you can create a bunch of very similar tests with slight differences without needing to copy and paste a bunch of boilerplate code.
Do you use vscode? I’ve started using the thunder client extension. Seems to be quite good