Fix testid flow POSTs in documentation
[anna.git] / example / diameter / launcher / resources / HELP.md
index fec3b72..c7a15a7 100644 (file)
@@ -539,7 +539,7 @@ Implemented status codes: *200* (ok), *400* (bad request) and *405* (method not
 
 > curl -v --request GET localhost:8000<uri>
 
-You could also expose the service as HTTP2 server through *nginx* working as reverse proxy (*adml-http* image is built in this way although internally provides HTTP operations script only for 1.1). Then you could use HTTP2 clients like *nghttp*:
+You could also expose the service as HTTP2 server through *nginx* working as reverse proxy (*anna-adml-http* image is built in this way although internally provides HTTP operations script only for 1.1). Then you could use HTTP2 clients like *nghttp*:
 
 > nghttp -v -H ":method: GET" "<uri>"
 
@@ -579,7 +579,7 @@ Retrieve statistics xml report (will be *base64-encoded* at response).
 
 > curl -v --request POST -H "Content-Type: application/json" localhost:8000<uri> -d@test.json
 
-You could also expose the service as HTTP2 server through *nginx* working as reverse proxy (*adml-http* image is built in this way although internally provides HTTP operations script only for 1.1). Then you could use HTTP2 clients like *nghttp*:
+You could also expose the service as HTTP2 server through *nginx* working as reverse proxy (*anna-adml-http* image is built in this way although internally provides HTTP operations script only for 1.1). Then you could use HTTP2 clients like *nghttp*:
 
 > nghttp -v -H ":method: POST" -d test.json "<uri>"
 
@@ -840,7 +840,7 @@ Selects a context working node by mean a registered name (origin-host). If empty
 }
 ```
 
-**Response body**: 
+**Response body**:
 
 ```
 {
@@ -960,7 +960,7 @@ Updates diameter server sessions to be accepted.
 
 ```
 {
-    "sessions":<integer value>
+    "sessions":<sessions (integer)>
 }
 ```
 
@@ -1004,7 +1004,7 @@ Updates ADML working directory.
 {
     "action":"<hide|show|hidden|shown>"
     [, "addressPort":"<address:port>"]
-    [, "socket":<socket>]
+    [, "socket":<socket id (integer)>]
 }
 ```
 
@@ -1036,13 +1036,13 @@ Reset statistics and counters.
 
 #### POST /context
 
-Dump ADML context at file path provided. If empty, default path is selected. Context information is not retrieved in the response, so, file is related to ADML execution context.
+Dump ADML context at file path provided. If empty (or field missing), default path is selected. Context information is not retrieved in the response, so, file is related to ADML execution context.
 
 **Request body**:
 
 ```
 {
-    "targetFile":"[file path]"
+    ["targetFile":"[file path]"]
 }
 ```
 
@@ -1078,7 +1078,7 @@ Set the statistics concepts to be logged. To know the concept indentifiers regis
 
 ```
 {
-    "list":"<comma-separated list|all|none>"
+    ["list":"<comma-separated list|[all]|none>"]
 }
 ```
 
@@ -1153,7 +1153,7 @@ or
 
 ```
 {
-    "action":"<action: list|dump|clear|exhaust|rotate>"
+    "action":"[action: <[list]|dump|clear|exhaust|rotate>]"
 }
 ```
 
@@ -1184,7 +1184,7 @@ or
 
 ```
 {
-    "action":"<action: list|dump|clear|exhaust|rotate>"
+    "action":"[action: <[list]|dump|clear|exhaust|rotate>]"
 }
 ```
 
@@ -1243,21 +1243,686 @@ Sends diameter expressed in hexadecimal string (no spaces, no colons, i.e.: `010
 
 ADML implements a bulting *Finite State Machine* to plan testing flows with a great flexibility.
 
-#### POST /xxxxxxxx
+#### POST /testid-description/{id}
 
-Referred files (*dictionaries, cer, cea, etc.*) shall be accesible for ADML and are not provided in this operation.
+**Request body**:
+
+```
+{
+    "description":"<description (string)>"
+}
+```
 
-**Request body**: { "servicesJson":<services json object>}
+**Response body**:
 
-**Response body**: { "result":"<true or false>", "response":"<response>"}
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
 
-#### POST /xxxxxxxx
+#### POST /testid-ip-limit/{id}
 
-Referred files (*dictionaries, cer, cea, etc.*) shall be accesible for ADML and are not provided in this operation.
+In-Progress limit is the maximum number of tests which can be executed in parallel.
+This operation allows a specific test to set this global pool behaviour.
+
+Zero-value is equivalent to stop the clock (no tests will be executed).
+
+Value '-1' means 'no limit' (full parallel). Be careful with resources consumption.
+
+**Request body**:
+
+```
+{
+    "amount":[amount (integer, 1 by default: execution in sequence)]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /testid-timeout/{id}
+
+**Request body**:
+
+```
+{
+    "msecs":<milliseconds (integer)>
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /testid-sendmsg2e/{id}
+
+**Request body**:
+
+```
+{
+    "diameterJson":<diameter message json object>
+    [,"stepNumber":[amount (integer, -1 no step associated)]]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /testid-sendmsg2c/{id}
+
+**Request body**:
+
+```
+{
+    "diameterJson":<diameter message json object>
+    [,"stepNumber":[amount (integer, -1 no step associated)]]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /testid-delay/{id}
+
+**Request body**:
+
+```
+{
+    "msecs":<milliseconds (integer)>
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /testid-sh-command/{id}
+
+**Request body**:
+
+```
+{
+    "script":"<script>"
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /testid-waitfe-hex/{id}
+
+**Request body**:
+
+```
+{
+    "hex":"<hex string>"
+    [,"strict":"[<true|[false]>]"]]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /testid-waitfc-hex/{id}
+
+**Request body**:
+
+```
+{
+    "hex":"<hex string>"
+    [,"strict":"[<true|[false]>]"]]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /testid-waitfe-msg/{id}
+
+**Request body**:
+
+```
+{
+    "diameterJson":<diameter message json object>
+    [,"strict":"[<true|[false]>]"]]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /testid-waitfc-msg/{id}
+
+**Request body**:
+
+```
+{
+    "diameterJson":<diameter message json object>
+    [,"strict":"[<true|[false]>]"]]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /testid-waitfe/{id}
 
-**Request body**: { "servicesJson":<services json object>}
+**Request body**:
+
+```
+{
+    "condition": {
+      "code":"[(integer)]",
+      "bitR":"[(1|0)]",
+      "hopByHop":"[(integer)]",
+      "applicationId":"[(integer)]",
+      "sessionId":"[session id]",
+      "resultCode":"[(integer)]",
+      "msisdn":"[msisdn]",
+      "imsi":"[imsi]",
+      "serviceContextId":"[service context id]"
+    }
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /testid-waitfc/{id}
+
+**Request body**:
+
+```
+{
+    "condition": {
+      "code":"[(integer)]",
+      "bitR":"[(1|0)]",
+      "hopByHop":"[(integer)]",
+      "applicationId":"[(integer)]",
+      "sessionId":"[session id]",
+      "resultCode":"[(integer)]",
+      "msisdn":"[msisdn]",
+      "imsi":"[imsi]",
+      "serviceContextId":"[service context id]"
+    }
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
 
-**Response body**: { "result":"<true or false>", "response":"<response>"}
+### FSM TESTING EXECUTION ACTIONS
 
+#### POST /test-ttps
 
+**Request body**:
+
+```
+{
+    "amount":<amount (integer)>
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-next
+
+**Request body**:
+
+```
+{
+    ["syncAmount":[amount (integer: 1 by default)]]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-ip-limit
+
+Global operation (also at test identifier level is accessible).
+
+Zero-value is equivalent to stop the clock (no tests will be executed).
+
+Value '-1' means 'no limit' (full parallel). Be careful with resources consumption.
+
+Defaults to '-2' (no '-1' which is default for *testid-ip-limit* version), which wil show the current pool *ip-limit* and also the number of test cases which are *in progress*.
+
+**Request body**:
+
+```
+{
+    ["amount":[amount (integer, shows current ip-limit and in-progress test cases amount, by default (-2))]]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-goto
+
+**Request body**:
+
+```
+{
+    "id":<test identifier>
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-run
+
+**Request body**:
+
+```
+{
+    "id":<test identifier>
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-look
+
+**Request body**:
+
+```
+{
+     ["id":[test identifier (integer: current by default (-1))]]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<base64-encoded output>"
+}
+```
+
+#### POST /test-state
+
+**Request body**:
+
+```
+{
+     ["id":[test identifier (integer: current by default (-1))]]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true: if state is 'Success' or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-interact
+
+Makes interactive a specific test case id. The amount of 0, implies no execution steps margin, which could be useful to 'freeze' a test in the middle of its execution. Value -1 makes it non-interactive resuming it from the current step.
+
+**Request body**:
+
+```
+{
+     "amount":<amount (integer)>
+     [,"id":[test identifier (integer: current by default (-1))]]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-reset
+
+**Request body**:
+
+```
+{
+     ["type":"<[soft]|hard>"]
+     [,"id":[test identifier (integer: apply to all the tests (-1))]]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-repeats
+
+**Request body**:
+
+```
+{
+     "amount":<amount (integer)>
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-auto-reset
+
+**Request body**:
+
+```
+{
+     "type":"<soft|hard>"
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-initialized
+
+**Request body**: none
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-finished
+
+**Request body**: none
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-clear
+
+**Request body**: none
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-junit
+
+As it could be very large, it will be dumped on provided target directory, '*/tmp/junit.xml*' by default.
+
+**Request body**:
+
+```
+{
+    ["targetFile":"<file path>"]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-summary-counts
+
+**Request body**: none
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<base64-encoded output>"
+}
+```
+
+#### POST /test-summary-states
+
+**Request body**: none
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<base64-encoded output>"
+}
+```
+
+#### POST /test-summary
+
+**Request body**: none
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<base64-encoded output>"
+}
+```
+
+#### POST /test-report
+
+**Request body**:
+
+```
+{
+    ["state":"[<initialized|in-progress|failed|success|[all]|none>]"]
+    [,"action":"[<[enable]|disable>]"]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-report-hex
+
+**Request body**:
+
+```
+{
+    ["action":"[<[enable]|disable>]"]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+#### POST /test-dump_stdout
+
+**Request body**:
+
+```
+{
+    ["action":"[<[enable]|disable>]"]
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```
+
+### DYNAMIC PROCEDURE
+
+Used for system test. Arguments are determined by the way in a specific dynamic library is designed/documented.
+
+#### POST /dynamic
+
+**Request body**:
+
+```
+{
+    "arguments": <diameter arguments json object>
+}
+```
+
+**Response body**:
+
+```
+{
+    "result":"<true or false>",
+    "response":"<response>"
+}
+```