EdgeX testing is focused on ensuring that the functional aspects of EdgeX work correctly. This level of testing includes a number of automated test suites for unit, integration, black-box, API testing and validation. Also, EdgeX has been tested on TAF, which stands for Test Automation Framework. To monitor the stability and efficiency of Edgex, a Jenkins pipeline has been built to automatically trigger daily and weekly jobs. The testing processes are listed below and sorted by order.
PR merge validation
When developers make changes to EdgeX and open PR, they have to go through a different validation process depending on the type of repository.
- Go modules
- Unit test
Where is go module?
- Service
- Unit test
- Image build validation: snap image/ docker image
Where is service?
https://github.com/edgexfoundry/edgex-go
EdgeX repository contains the Go implementation of EdgeX Foundry microservices, such as core-data, support-notifications, etc.
Once developers open PRs in edgex-go, it will trigger unit test to check if it's fit to use and build images on nexus3.edgexfoundry.org to validate its usage.
- edgex-compose
- smoke test by TAF
Functional-test
- Purpose: Test each feature of EdgeX by providing the appropriate input and validating the output against the requirements.
- Frequency: Daily scheduled run on edgex-taf-pipeline
How to run functional-test on local?
Integration-test
- Purpose: Check data communication among different software modules.
- Frequency: Daily scheduled run on edgex-taf-pipelines
How to run integration-test on local?
Performance-test
- Purpose: Monitor memory usage/ startup time/ CPU usage/ response time/ event exported time of EdgeX
- Frequency: Weekly scheduled run on edgex-taf-pipelines
- Note: When a new version of EdgeX is released, we will run performance tests manually on x86_64 and arm64 machines to update the reports in here.
How to run performance-test on local?
Smoke-test
- Purpose: Developers will select tests that validate key EdgeX features to run smoke-test.
- Frequency: Only when edgex-compose PR is opened will smoke-test start running.
How to run smoke-test on local?
First, where is smoke-test?
Example: https://github.com/edgexfoundry/edgex-taf/blob/f7c5ac7bf88c2cca21e5cb485ee655b14a2023d7/TAF/testScenarios/functionalTest/V2-API/core-metadata/deviceprofile/GET-Positive.robot#L15
In this example, only does ProfileGET001 - Query all device profiles have SmokeTest tag so smoke-test will run on this testcase only.
Second, how to run tests on local?
When running tests locally with the docker command, remember to specify --include SmokeTest to point to those tests with the SmokeTest tag.