-[Unit tests for the new micro-service](#unit-tests-for-the-new-micro-service)
-[System tests for the new micro-service](#system-tests-for-the-new-micro-service)
-[Integration tests for the new micro-service](#integration-tests-for-the-new-micro-service)
-[Executing a test campaign](#executing-a-test-campaign)
-[Adding Documentation for an API/Service](#adding-documentation-for-an-apiservice)
@@ -334,7 +335,8 @@ meep-<mec-identifier>
## Unit tests for the new micro-service
Unit tests should be written for a MEC micro-service for its validation. The steps to achieve this are described below:
Unit tests should be written for a MEC micro-service for its validation. The purpose of the Unit tests is to provide one or more testing function for each of the exposed API functions.
The steps to achieve this are described below:
1.**Create a testing file**
@@ -466,6 +468,38 @@ cd test
./stop-ut-env.sh
```
## System tests for the new micro-service
System tests should be written for a MEC micro-service for its validation. The purpose of System tests is to test the micro service logic (functional tests).
The steps to achieve this are described below:
1.**Create a testing files**
In the folder ~/AdvantEDGE/test/system, create two files;
- The source code file, named `<mec-identifier>_test.go` (e.g. vis_test.go),
- The network scenario file, named `<mec-identifier>-system-test.yaml` (e.g. vis-system-test.yaml).
The network scenario is used by the MEC micro-service testing functions.
2.**Implement System tests**
At least, the following functions shall be implemented into `<mec-identifier>_test.go` file:
- The initialization functions: `func init()` and `func initialiseRnisTest()`
After a new service is created, its documentation need to be added in the *AdvantEDGE/docs* folder. This documentation can be generated from the OpenAPI Specifications of the service/API: