Imported Upstream version 1.8.0
[platform/core/ml/nnfw.git] / tests / nnfw_api / README.md
1 # nnfw_api_gtest
2
3 A test framework for *nnfw_api* that is built with *gtest*.
4
5 This test framework consists of 3 kinds of tests:
6
7 - Validation Tests (fixture format `ValidationTest???`)
8     - Basic positive/negative tests with simple nnpackages
9 - Generated Model Tests (fixture format `GenModelTest`)
10     - One-time inference test with variety of generated models
11 - Regression Tests (fixture format `RegressionTest`, test format `GitHub###`)
12     - When you see bugs/crashes while using those API
13     - Must refer a github issue
14 - Misc Tests (fixture format `Test???`)
15     - When you want to introduce any API use scenarios with any nnpackages
16
17 ## nnpackages for testing
18
19 To test *nnfw_api*, we almost always need some nnpackages. Those are stored in a web server so there is no nnpackage files in the repo.
20
21 ### How to add nnpackages for test
22
23 If there is no nnpackage that is sufficient for your need, you may need to create one. However it is not allowed to store nnpackage files in the repo.
24 If you want to add some, please leave an issue of asking for adding new nnpackages to the server. Then add `config.sh` for each nnpackage in `tests/scripts/nnfw_api_gtest_models`.
25
26 Once you have done the above steps, please register it in the test source code to make use of it. You may take a look at `NNPackages` class for details.
27
28 ### Installation
29
30 You must install the test nnpackages before running the tests. They must be in the same directory with the test executable, under `nnfw_api_gtest_models/`. There is an installation script `tests/scripts/nnfw_api_gtest/install_nnfw_api_gtest_nnpackages.sh`, however the nnpackage file server is not public so it will fail.