Pull to refresh
4
0
Dmitrii Anisimov @daymock

SDET

Send message

Helpful service for microservice JSON-RPC based test automation

Reading time2 min
Views989

Test automation, with product built in microservice architecture could be very situational in context of testing goals and ways to achieve them. You got an easy life if you testing a service, that is an isolated entity, which is receiving some data and providing a result of it's work in a response, by callback or through additional endpoint. In this case all you need to do is cover all the endpoints of the service, and probably learn to catch it's callbacks. However, it's not the only case. Sometimes you need to test service which isn't totally isolated, but a part of a chain of interactions. This service could send some data to other services within your infrastructure or even to third parties. This time you got plenty of additional things to bother of:

Read more
Rating0
Comments0

Библиотека для тестирования JSON-RPC API

Reading time4 min
Views4.8K
Когда я впервые столкнулся с написанием тестов для микросервиса, API которого был реализован согласно протоколу JSON-RPC, я осознал что построение качественных проверок для json элементов куда требовательнее, чем я считал ранее.

Ниже приведён простой пример.

От сервиса получен ответ:

{
  "result": 12,
  "id": 46929734,
  "jsonrpc": "2.0"
}

Что требуется проверить:

  1. Ответ содержит элемент «jsonrpc» и его значение равняется «2.0»
  2. Ответ содержит элемент «id» и его значение равняется аналогичному элементу переданному в запросе, в данный момент допустим это — 46929734

Ответ содержит элемент «result» и его значение равняется 12

Читать дальше →
Total votes 4: ↑4 and ↓0+4
Comments3

Information

Rating
Does not participate
Date of birth
Registered
Activity