aboutsummaryrefslogtreecommitdiffstats
path: root/docs/WriteYourTests/Reference/0_BindingTestFunctions.md
diff options
context:
space:
mode:
authorCorentin Le Gall <corentinlgs@gmail.com>2018-07-19 15:57:30 +0200
committerCorentin Le Gall <corentinlgs@gmail.com>2018-07-24 14:42:12 +0200
commitc96df58a88b60c7501b3c8a758c0277c17088371 (patch)
tree1e982c565a4fd0ba65a382cc1cba97efe891c34b /docs/WriteYourTests/Reference/0_BindingTestFunctions.md
parent55673d50338f041763e6e38f38ea3fc311f2bdc1 (diff)
Changed doc to GitBook format + added doc
-Changed README.md to a complet GitBook doc. -Added explanations about EvtGrpReceived functions. -Corrected mistakes + reduced lines length. Change-Id: I1a077ddf6acb520a9158de658d3c09b12a2029d4 Signed-off-by: Corentin Le Gall <corentinlgs@gmail.com>
Diffstat (limited to 'docs/WriteYourTests/Reference/0_BindingTestFunctions.md')
-rw-r--r--docs/WriteYourTests/Reference/0_BindingTestFunctions.md102
1 files changed, 102 insertions, 0 deletions
diff --git a/docs/WriteYourTests/Reference/0_BindingTestFunctions.md b/docs/WriteYourTests/Reference/0_BindingTestFunctions.md
new file mode 100644
index 0000000..da8f014
--- /dev/null
+++ b/docs/WriteYourTests/Reference/0_BindingTestFunctions.md
@@ -0,0 +1,102 @@
+# Binding Test functions
+
+* **_AFT.testVerbStatusSuccess(testName, api, verb, args, setUp, tearDown)**
+
+ Simply test that the call of a verb successfully returns.
+
+ *setUp* and *tearDown* are functions that can be added to your context,
+ it works just like **_AFT.beforeEach()** and **_AFT.afterEach()**,
+ *setUp* will be ran before your *testFunction* and **_AFT.beforeEach()**
+ (if set) functions, *tearDown* will be ran after your *testFunction* and
+ **_AFT.afterEach()** (if set) functions.
+
+* **_AFT.testVerbStatusError(testName, api, verb, args, setUp, tearDown)**
+
+ The inverse than above.
+
+ *setUp* and *tearDown* are functions that can be added to your context,
+ it works just like **_AFT.beforeEach()** and **_AFT.afterEach()**,
+ *setUp* will be ran before your *testFunction* and **_AFT.beforeEach()**
+ (if set) functions, *tearDown* will be ran after your *testFunction* and
+ **_AFT.afterEach()** (if set) functions.
+
+* **_AFT.testVerbResponseEquals(testName, api, verb, args, expectedResponse, setUp, tearDown)**
+
+ Test that the call of a verb successfully returns and that verb's response
+ is equals to the *expectedResponse*.
+
+ *setUp* and *tearDown* are functions that can be added to your context,
+ it works just like **_AFT.beforeEach()** and **_AFT.afterEach()**, *setUp*
+ will be ran before your *testFunction* and **_AFT.beforeEach()** (if set)
+ functions, *tearDown* will be ran after your *testFunction* and
+ **_AFT.afterEach()** (if set) functions.
+
+* **_AFT.testVerbResponseEqualsError(testName, api, verb, args, expectedResponse, setUp, tearDown)**
+
+ The inverse than above.
+
+ *setUp* and *tearDown* are functions that can be added to your context, it works
+ just like **_AFT.beforeEach()** and **_AFT.afterEach()**, *setUp* will be ran
+ before your *testFunction* and **_AFT.beforeEach()** (if set) functions,
+ *tearDown* will be ran after your *testFunction* and **_AFT.afterEach()** (if
+ set) functions.
+
+* **_AFT.testVerbCb(testName, api, verb, args, expectedResponse, callback, setUp, tearDown)**
+
+ Test the call of a verb with a custom callback. From this callback you
+ will need to make some assertions on what you need (verb JSON return object
+ content mainly).
+
+ If you don't need to test the response simply specify an empty LUA table.
+
+ *setUp* and *tearDown* are functions that can be added to your context, it works
+ just like **_AFT.beforeEach()** and **_AFT.afterEach()**, *setUp* will be ran
+ before your *testFunction* and **_AFT.beforeEach()** (if set) functions,
+ *tearDown* will be ran after your *testFunction* and **_AFT.afterEach()** (if
+ set) functions.
+
+* **_AFT.testVerbCbError(testName, api, verb, args, expectedResponse, callback, setUp, tearDown)**
+
+ Should return success on failure.
+
+ *setUp* and *tearDown* are functions that can be added to your context, it works
+ just like **_AFT.beforeEach()** and **_AFT.afterEach()**, *setUp* will be ran
+ before your *testFunction* and **_AFT.beforeEach()** (if set) functions,
+ *tearDown* will be ran after your *testFunction* and **_AFT.afterEach()** (if
+ set) functions.
+
+* **_AFT.testEvtReceived(testName, eventName, timeout, setUp, tearDown)**
+
+ Prior to be able to check that an event has been received, you have to
+ register the event with the test framework using **_AFT.addEventToMonitor**
+ function.
+
+ Check if an event has been correctly received in time (timeout in µs). An event
+ name use the application framework naming scheme: **api/event_name**.
+
+* **_AFT.testEvtNotReceived(testName, eventName, timeout, setUp, tearDown)**
+
+ Prior to be able to check that an event has not been received, you have to
+ register the event with the test framework using **_AFT.addEventToMonitor**
+ function.
+
+ Check if an event has not been correctly received in time (timeout in µs). An
+ event name use the application framework naming scheme: **api/event_name**.
+
+* **_AFT.testGrpEvtReceived(testName, eventGrp, timeout, setUp, tearDown)**
+
+ Prior to be able to check that a group of event (a table of event) has been
+ received, you have to register the event with the test framework using
+ **_AFT.addEventToMonitor** function.
+
+ Check if events has been correctly received in time (timeout in µs). An
+ event name use the application framework naming scheme: **api/event_name**.
+
+* **_AFT.testGrpEvtNotReceived(testName, eventGrp, timeout, setUp, tearDown)**
+
+ Prior to be able to check that a group of event (a table of event) has not
+ been received, you have to register the event with the test framework using
+ **_AFT.addEventToMonitor** function.
+
+ Check if event has not been correctly received in time (timeout in µs). An
+ event name use the application framework naming scheme: **api/event_name**. \ No newline at end of file