Please, read the General Contribution Guidelines before contributing.
The tests micro-service's architecture is based on the Hexagonal Architecture in order to make it easier to maintain and extend.
The project structure is as follows:
-
domain: Contains the business logic of the tests micro-service.definitions: Contains the interfaces (contracts) of the tests micro-service.entities: Contains the entities of the tests micro-service.dtos: Contains the data transfer objects of the tests micro-service.
-
application: Contains the application logic (use cases) of the tests micro-service. -
infrastructure: Contains the implementation of the tests micro-service's interfaces (contracts) and the external dependencies of the tests micro-service.implementations: Contains the implementations of thedomaininterfaces (contracts).rabbitmq: Contains the RabbitMQ related code.static_files: Contains the static files micro-service related code.
-
utils: Contains the utility functions of the tests micro-service.
Note that, as the application layer cannot depend on the infrastructure layer, the application layer only uses the interfaces (contracts) defined in the domain layer, so, any implementation in the infrastructure layer can injected and used by the application layer without any problem.
The above allows us, for instance, to use multiple LanguageTestsRunner implementations (JavaTestsRunner, TypescriptTestsRunner, etc.) without having to change the application layer.
The following dependencies are required to run the tests micro-service locally:
Please, note that Podman is a drop-in replacement for Docker, so you can use Docker instead if you prefer.
Additionally, you may want to install the following dependencies to make your life easier:
- Air (for live reloading)
As the role of the tests micro-service is to listen for messages in the submissions queue and run the tests for the submissions, you will need to run the gateway project first in order to initialize the queue, database and the other micro-services and send submissions by using the REST API.
After you have the gateway running, you can start the tests micro-service by running the following command:
air This will start the tests micro-service and will watch for changes in the source code and restart the service automatically.
Additionally, you may want to generate a .air.toml file and add the tests-execution-directory/ directory to the exclude_dir list in order to avoid restarting the service when the tests are executed, to do this, run the following command or refer to the Air documentation
air init