ConfIt: A library tool for the testing of API

My personal experience led to the writing of ConfIt, a library tool designed to improve the maintenance of unit tests. This software allows you to write API tests in YAML (or JSON if you prefer), where it manages the roles, setting up the mock, checking responses and exchange variables between the tests.
A test thus seems to present itself as follows:
CreateUser:
tags: [ smoke ]
api:
request:
method: POST
path: /api/users
body:
name: Alice
email: alice@example.com
response:
statusCode: 201
matcher:
id: isUuid
Next, ConfIt transforms this YAML file into a unit test structure that works on two levels. In a component test, the service is launched into the local environment and dependencies are mocking via WireMock. For the integrated tests, everything is in real format - I no longer keep two test suites.
Besides avoiding the creation of configuration scripts for each test-suite, ConfIt also has the merit of being able to manage integration with a database. The file suite.config.yaml contains all the necessary configurations for starting component and integration tests.
The maintenance of these unit tests becomes much simpler thanks to ConfIt, as they can be kept in a single YAML file and change the configuration of the fixture into a single operation.
Source: DEV Community. IA-assisted editorial summary — TechnoExpress.

