Category Archives: Testing

mountebank for mocking and stubbing http services (rest+graphql+grpc) can be used to stub http(s)/tcp/smtp protocols. And has community plugins for grpc, graphql, websockets. You can configure it with imposters.ejs like below:


HTTP Toolkit — another alternative to Charles Proxy for http calls interception It has a free version which does something similar to Charles Proxy, so you can hack into the middle of any request/response according to the rules specified.

Docker and Kubernetes basics for developers

Docker Docker containers are much more lightweight compared to classic VMs as they leverage host OS instead of starting their own OS. Containers are using 2 features of Linux-based OS: Namespaces and Cgroups (Control Groups). Namespace Lets you allocate resources in an isolated environment (like a sandbox). On a container start, docker daemon generates a …

Read more

Mock sql (sqlx) db on golang

I am using this library — That’s how you can use it for mocking db querying:

Fast and simple mock server app by swagger file

I’ve tried Mockoon for mocking by swagger/OpenAPI spec file, and it works pretty good. It autogenerates the response based on swagger format, and you are able to update any response field the way you want, save your changes and run the mock server with one click on the port you specify. It is a separate …

Read more

Types of load tests

Load test types explained by k6. Smoke tests Verify that your system can handle minimal load, without any problems. Like 1 rps for 1 minute. Load tests Assess system performance in terms of concurrent users or requests per second. If you want to make sure that you can handle 500 rps, you can gradually increase …

Read more

mmock for mocking microservices

It is a very easy to set up though pretty powerful tool with support for delays and handling query params. It also has a console for checking all the requests and corresponding responses matched. Here it is Below I describe a way to use it with docker-compose for local development.

Mocking for unit-tests and e2e-tests in golang

Some patterns to test your golang app. Mocking an interface Mocking SQL database Mocking HTTP server for unit-tests Stubbing HTTP server for e2e-tests Mocking for e2e-tests with dockertest

Integration tests with testcontainers-go

Here is the go library that simplifies integration tests with docker containers — That’s how you can use it to test sql — Project documentation — The idea is to prepare the environment, build your app, then make requests and check the DB state.

Test Push Notifications