summaryrefslogtreecommitdiffstats
path: root/docs/dev_guide
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-07-31 15:41:41 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-08-03 17:54:10 +0200
commit3c99b8a2cb7b784dcb5f23aa63345d60bfe9952d (patch)
treeb1908ebe81dc7c033cdfe8f221413b47ca706b7e /docs/dev_guide
parent9c1a0fb10dda08bebffb490152b5cdde6420e18a (diff)
Create a test widget
Create a test widget in addition of the normal one when you use any build type except of RELEASE. This widget will only provide the test files (configuration + test + fixtures ...). It joins the test framework binding to your binding or app then you only have to access to your defined test API and launch the tests. The entry point is a bash script which is in charge to launch all tests it finds. Change-Id: I8f4a670f17fd4e4319c53a861074fb5e10b63aad Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'docs/dev_guide')
-rw-r--r--docs/dev_guide/1_Quickstart.md14
-rw-r--r--docs/dev_guide/3_advanced_usage.md37
2 files changed, 46 insertions, 5 deletions
diff --git a/docs/dev_guide/1_Quickstart.md b/docs/dev_guide/1_Quickstart.md
index 1df38c1..e910178 100644
--- a/docs/dev_guide/1_Quickstart.md
+++ b/docs/dev_guide/1_Quickstart.md
@@ -59,8 +59,15 @@ Choose between:
*${OUTPUT_NAME}-apidef* of the target that describe the API with OpenAPI
syntax (e.g: *mybinding-apidef*).
Or Alternatively, you can choose the name, without the extension, using macro
- **set_openapi_filename**. If you use C++, you have to set
- **PROJECT_LANGUAGES** with *CXX*.
+ **set_openapi_filename**. If you use C++, you have to set **PROJECT_LANGUAGES**
+ with *CXX*.
+- **BINDINGV3**: Shared library that be loaded by the AGL Application Framework
+ This has to be accompagnied with a JSON file named like the
+ *${OUTPUT_NAME}-apidef* of the target that describe the API with OpenAPI
+ syntax (e.g: *mybinding-apidef*).
+ Or Alternatively, you can choose the name, without the extension, using macro
+ **set_openapi_filename**. If you use C++, you have to set **PROJECT_LANGUAGES**
+ with *CXX*.
- **PLUGIN**: Shared library meant to be used as a binding plugin. Binding
would load it as a plugin to extend its functionnalities. It should be named
with a special extension that you choose with SUFFIX cmake target property or
@@ -73,6 +80,7 @@ Choose between:
Application Framework
- **LIBRARY**: An external 3rd party library bundled with the binding for its
own purpose because platform doesn't provide it.
+- **BINDING-CONFIG**: Any files used as configuration by your binding.
> **TIP** you should use the prefix _afb-_ with your **BINDING* targets which
> stand for **Application Framework Binding**.
@@ -80,7 +88,7 @@ Choose between:
```cmake
SET_TARGET_PROPERTIES(${TARGET_NAME}
PREFIX "afb-"
- LABELS "BINDINGV2"
+ LABELS "BINDINGV3"
OUTPUT_NAME "file_output_name")
```
diff --git a/docs/dev_guide/3_advanced_usage.md b/docs/dev_guide/3_advanced_usage.md
index 2ee78ce..114230f 100644
--- a/docs/dev_guide/3_advanced_usage.md
+++ b/docs/dev_guide/3_advanced_usage.md
@@ -35,8 +35,15 @@ Choose between:
*${OUTPUT_NAME}-apidef* of the target that describe the API with OpenAPI
syntax (e.g: *mybinding-apidef*).
Or Alternatively, you can choose the name, without the extension, using macro
- **set_openapi_filename**. If you use C++, you have to set
- **PROJECT_LANGUAGES** with *CXX*.
+ **set_openapi_filename**. If you use C++, you have to set **PROJECT_LANGUAGES**
+ with *CXX*.
+- **BINDINGV3**: Shared library that be loaded by the AGL Application Framework
+ This has to be accompagnied with a JSON file named like the
+ *${OUTPUT_NAME}-apidef* of the target that describe the API with OpenAPI
+ syntax (e.g: *mybinding-apidef*).
+ Or Alternatively, you can choose the name, without the extension, using macro
+ **set_openapi_filename**. If you use C++, you have to set **PROJECT_LANGUAGES**
+ with *CXX*.
- **PLUGIN**: Shared library meant to be used as a binding plugin. Binding
would load it as a plugin to extend its functionnalities. It should be named
with a special extension that you choose with SUFFIX cmake target property or
@@ -49,6 +56,32 @@ Choose between:
Application Framework
- **LIBRARY**: An external 3rd party library bundled with the binding for its
own purpose because platform doesn't provide it.
+- **BINDING-CONFIG**: Any files used as configuration by your binding.
+
+Two optionnals **LABELS** are available to define which resources are your tests
+materials:
+
+- **TEST-CONFIG**: JSON configuration files that will be used by the afb-test
+ binding to know how to execute tests.
+- **TEST-DATA**: Resources used to test your binding. It is at least your test
+ plan and also could be fixtures and any needed files by your tests. These files
+ will appear in a separate test widget.
+
+Here is a mapping between LABELS and directories where files will be puted in
+the widget:
+
+- **EXECUTABLE** : \<wgtrootdir\>/bin
+- **BINDING-CONFIG** : \<wgtrootdir\>/etc
+- **BINDING** | **BINDINGV2** | **BINDINGV3** | **LIBRARY** : \<wgtrootdir\>/lib
+- **PLUGIN** : \<wgtrootdir\>/lib/plugins
+- **HTDOCS** : \<wgtrootdir\>/htdocs
+- **BINDING-DATA** : \<wgtrootdir\>/var
+- **DATA** : \<wgtrootdir\>/var
+
+And about test dedicated **LABELS**:
+
+- **TEST-CONFIG** : \<TESTwgtrootdir\>/etc
+- **TEST-DATA** : \<TESTwgtrootdir\>/var
> **TIP** you should use the prefix _afb-_ with your **BINDING* targets which
> stand for **Application Framework Binding**.