Category Archives: Testing

Golang: testing http and grpc servers

HTTP server is quite easy to test — here is a nice video about it:

E2E tests in go

I tried it via ginkgo and gomega. It has Agouti with WebDriver support out of the box, but I didn’t use it as we have grpc API. That’s the example (table tests):

Mocking for testing go code

If you’re testing go code and have a huge API you have to mock, you have two options: make your dummy struct with embedded interface and implement only methods you need, or use your own interface that has only methods you need (and change your code to use that). For instance, I had amazon’s s3 …

Read more

BDD Framework For Golang

There is a good one: It prefers to use as a matcher.

Testing react’s dom with jest and enzyme

Install it like this:

Regression testing of react app with jest

Example is here — The main idea is this:

Javascript mocking frameworks

Classical one — TestDouble — There is a good video on using TestDouble from it’s creator:

HTTP stress testing tools

Старый добрый ab, из минусов — только http 1.0, задействует только одно ядро. JMeter wrk hey (бывший boom) — написан на go. Yandex.Tank Siege

Настройка IntelliJ IDEA для запуска py.test

Установить plugin для python IntelliJ Idea → Preferences → Plugins → Browse Repositories → Python

Pytest: параметры запуска из командной строки

Можно запускать так (для запуска тестов по регулярке совпадающих с test_brands_page_desktop и лежащих внутри tests/goblin/):

Можно так (только в модуле):

Можно так (все тесты внутри класса):

Можно так (только указанный тест внутри класса):