R doc/flasing_win_macos.md => doc/flashing_win_macos.md +0 -0
A module-services/service-desktop/endpoints/bluetooth/README.md => module-services/service-desktop/endpoints/bluetooth/README.md +65 -0
@@ 0,0 1,65 @@
+# Bluetooth Service endpoints
+
+The following document provides a description of the `ServiceBluetooth` endpoints.
+
+## Overview
+
+
+
+## Calling HTTP methods
+The `Bluetooth` endpoint supports four HTTP-like methods:
+ * `POST - "post"`
+ * `GET - "get"`
+ * `PUT - "put"`
+ * `DELETE - "del"`
+
+### POST
+
+Argument | Value | Expected response| Description
+-------- | ----- | -----------------| -----------
+`"pair"` | `address` | `SimpleResponse` | Requesting pairing with the device with given address.
+`"connect"` | `address` | `SimpleResponse` | Requesting connecting with the device with given address.
+
+### GET
+
+Argument | Value | Expected response | Description
+-------- | ----- | ----------------- | -----------
+`"state"` | `True` | `ResponseStatus` | Requests current state of the `Pure-BT`.
+`"devices"` | `"scanned"` | `ResponseVisibleDevices` | Requests list of currently available `BT`s.
+`"devices"` | `"bonded"` | `ResponseBondedDevices` | Requests list of `BT`-devices that the `Pure-BT` is currently paired with and address of the `BT`-device that `Pure-BT` is connected to.
+### PUT
+
+Argument | Value | Expected response| Description
+-------- | ----- | -----------------| -----------
+`"command"` | `"scanOn"` | `SimpleResponse` | Turing the `Pure-BT`-scan functionality on.
+. | `"scanOff"` | `SimpleResponse` | Turing the `Pure-BT`-scan functionality off.
+. | `"changeVisibility"` | `SimpleResponse` | Changing the `Pure-BT`'s visibility.
+`"state"` | `{"power: "on/off"}` | `SimpleResponse` | Turning the `Pure-BT` on/off.
+. | `{"visibility": "on/off"}` | `SimpleResponse` | Turning the `Pure-BT`'s visibility on/off.
+
+### DELETE
+
+Argument | Value | Expected response| Description
+-------- | ----- | -----------------| -----------
+`"unpair"` | `address` | `SimpleResponse` | Requesting unpairing with the `BT`-device with given address.
+`"command"` | `"disconnect"` | `SimpleResponse` | Requesting disconnecting with the `BT`-device `Pure-BT` is currently connected to.
+
+## Responses
+Each response has to be serialized for consistency with the following structure
+```
+responsePayloadJson:
+{
+ { "endpoint", endpointNumber },
+ { "status", statusCode},
+ { "body", responseBodyJson },
+ { "uuid", uuidString }
+}
+```
+The `Bluetooth` endpoint provides responses according to the following table:
+
+Response | Body
+-------- | ----
+`SimpleResponse` | `{}`
+`ResponseStatus` | `{"state", {"power": "on/off", "visibility" : "on/off" }}`
+`ResponseVisibleDevices`| `{"devices", [{"name": name1, "address" : address1 }, ..., {"name": nameN, "address" : addressN }]}`
+`ResponseBondedDevices` | `{"address" : addressOfConnectedToDevice, "devices", [{"name": name1, "address" : address1 }, ..., {"name": nameN, "address" : addressN }]}`
A module-services/service-desktop/endpoints/bluetooth/doc/bt-endpoints-general-structure.puml => module-services/service-desktop/endpoints/bluetooth/doc/bt-endpoints-general-structure.puml +45 -0
@@ 0,0 1,45 @@
+@startuml
+
+participant "Harness" as harness
+participant "Worker Desktop" as workdsktp
+participant "Bluetooth Endpoint" as endbt
+participant "Service Desktop" as srvdsktp
+participant "Service Bluetooth" as srvbt
+
+[o-> harness : endpoint request
+activate harness
+ harness -> harness : create message
+ harness -> workdsktp : send request
+ deactivate harness
+ activate workdsktp
+ alt BT endpoint request
+ workdsktp -> endbt : send request
+ deactivate workdsktp
+ activate endbt
+ endbt -> endbt : parse request
+ endbt -> endbt : create message
+ endbt -> srvbt : send message
+ activate srvbt
+
+ alt is simple request
+ endbt -> srvdsktp : simple response
+ deactivate endbt
+ activate srvdsktp
+ else requires actual response
+ srvdsktp <-- srvbt : respond
+ activate srvdsktp
+ deactivate srvbt
+ end
+ srvdsktp -> srvdsktp : create http response
+ workdsktp <-- srvdsktp : response
+ deactivate srvdsktp
+ deactivate srvdsktp
+ activate workdsktp
+ end
+ harness <-- workdsktp : reponse
+ deactivate workdsktp
+ activate harness
+[<-- harness : reponse
+ deactivate harness
+
+@enduml
A module-services/service-desktop/endpoints/bluetooth/doc/bt-endpoints-general-structure.svg => module-services/service-desktop/endpoints/bluetooth/doc/bt-endpoints-general-structure.svg +59 -0
@@ 0,0 1,59 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="636px" preserveAspectRatio="none" style="width:838px;height:636px;" version="1.1" viewBox="0 0 838 636" width="838px" zoomAndPan="magnify"><defs><filter height="300%" id="f1342boybziubm" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="71.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="139" y="69.4297"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="139" y="548.9609"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="53.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="267" y="140.6953"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="36.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="267" y="512.8281"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="166.6641" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="418" y="193.9609"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="152.2031" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="569.5" y="360.625"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="108.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="574.5" y="404.5625"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="127.2031" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="732.5" y="307.3594"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="365.1328" style="stroke: #000000; stroke-width: 2.0;" width="630.5" x="197" y="155.6953"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="120.2031" style="stroke: #000000; stroke-width: 2.0;" width="480.5" x="337" y="322.3594"/><rect fill="#FFFFFF" height="73.9375" style="stroke: none; stroke-width: 1.0;" width="480.5" x="337" y="368.625"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="143.5" x2="143.5" y1="38.2969" y2="596.0938"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="272" x2="272" y1="38.2969" y2="596.0938"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="423" x2="423" y1="38.2969" y2="596.0938"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="574" x2="574" y1="38.2969" y2="596.0938"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="737.5" x2="737.5" y1="38.2969" y2="596.0938"/><rect fill="#FEFECE" filter="url(#f1342boybziubm)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="106.5" y="3"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="113.5" y="22.9951">Harness</text><rect fill="#FEFECE" filter="url(#f1342boybziubm)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="106.5" y="595.0938"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="113.5" y="615.0889">Harness</text><rect fill="#FEFECE" filter="url(#f1342boybziubm)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="126" x="207" y="3"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="112" x="214" y="22.9951">Worker Desktop</text><rect fill="#FEFECE" filter="url(#f1342boybziubm)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="126" x="207" y="595.0938"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="112" x="214" y="615.0889">Worker Desktop</text><rect fill="#FEFECE" filter="url(#f1342boybziubm)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="148" x="347" y="3"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="134" x="354" y="22.9951">Bluetooth Endpoint</text><rect fill="#FEFECE" filter="url(#f1342boybziubm)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="148" x="347" y="595.0938"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="134" x="354" y="615.0889">Bluetooth Endpoint</text><rect fill="#FEFECE" filter="url(#f1342boybziubm)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="127" x="509" y="3"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="113" x="516" y="22.9951">Service Desktop</text><rect fill="#FEFECE" filter="url(#f1342boybziubm)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="127" x="509" y="595.0938"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="113" x="516" y="615.0889">Service Desktop</text><rect fill="#FEFECE" filter="url(#f1342boybziubm)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="136" x="667.5" y="3"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="122" x="674.5" y="22.9951">Service Bluetooth</text><rect fill="#FEFECE" filter="url(#f1342boybziubm)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="136" x="667.5" y="595.0938"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="122" x="674.5" y="615.0889">Service Bluetooth</text><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="71.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="139" y="69.4297"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="139" y="548.9609"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="53.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="267" y="140.6953"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="36.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="267" y="512.8281"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="166.6641" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="418" y="193.9609"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="152.2031" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="569.5" y="360.625"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="108.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="574.5" y="404.5625"/><rect fill="#FFFFFF" filter="url(#f1342boybziubm)" height="127.2031" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="732.5" y="307.3594"/><ellipse cx="10.5" cy="68.6797" fill="none" rx="4" ry="4" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#A80036" points="127,65.4297,137,69.4297,127,73.4297,131,69.4297" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="15" x2="133" y1="69.4297" y2="69.4297"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="109" x="18" y="64.3638">endpoint request</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="149" x2="191" y1="98.5625" y2="98.5625"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="191" x2="191" y1="98.5625" y2="111.5625"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="150" x2="191" y1="111.5625" y2="111.5625"/><polygon fill="#A80036" points="160,107.5625,150,111.5625,160,115.5625,156,111.5625" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="156" y="93.4966">create message</text><polygon fill="#A80036" points="255,136.6953,265,140.6953,255,144.6953,259,140.6953" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="144" x2="261" y1="140.6953" y2="140.6953"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="84" x="151" y="135.6294">send request</text><path d="M197,155.6953 L261,155.6953 L261,162.6953 L251,172.6953 L197,172.6953 L197,155.6953 " fill="#EEEEEE" style="stroke: #000000; stroke-width: 1.0;"/><rect fill="none" height="365.1328" style="stroke: #000000; stroke-width: 2.0;" width="630.5" x="197" y="155.6953"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="19" x="212" y="168.7622">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="141" x="276" y="167.9058">[BT endpoint request]</text><polygon fill="#A80036" points="406,189.9609,416,193.9609,406,197.9609,410,193.9609" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="272" x2="412" y1="193.9609" y2="193.9609"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="84" x="279" y="188.895">send request</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="428" x2="470" y1="223.0938" y2="223.0938"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="470" x2="470" y1="223.0938" y2="236.0938"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="429" x2="470" y1="236.0938" y2="236.0938"/><polygon fill="#A80036" points="439,232.0938,429,236.0938,439,240.0938,435,236.0938" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="89" x="435" y="218.0278">parse request</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="428" x2="470" y1="265.2266" y2="265.2266"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="470" x2="470" y1="265.2266" y2="278.2266"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="429" x2="470" y1="278.2266" y2="278.2266"/><polygon fill="#A80036" points="439,274.2266,429,278.2266,439,282.2266,435,278.2266" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="435" y="260.1606">create message</text><polygon fill="#A80036" points="720.5,303.3594,730.5,307.3594,720.5,311.3594,724.5,307.3594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="428" x2="726.5" y1="307.3594" y2="307.3594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="94" x="435" y="302.2935">send message</text><path d="M337,322.3594 L401,322.3594 L401,329.3594 L391,339.3594 L337,339.3594 L337,322.3594 " fill="#EEEEEE" style="stroke: #000000; stroke-width: 1.0;"/><rect fill="none" height="120.2031" style="stroke: #000000; stroke-width: 2.0;" width="480.5" x="337" y="322.3594"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="19" x="352" y="335.4263">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="120" x="416" y="334.5698">[is simple request]</text><polygon fill="#A80036" points="557.5,356.625,567.5,360.625,557.5,364.625,561.5,360.625" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="423" x2="563.5" y1="360.625" y2="360.625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="105" x="430" y="355.5591">simple response</text><line style="stroke: #000000; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="337" x2="817.5" y1="369.625" y2="369.625"/><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="170" x="342" y="379.8354">[requires actual response]</text><polygon fill="#A80036" points="595.5,400.5625,585.5,404.5625,595.5,408.5625,591.5,404.5625" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="589.5" x2="731.5" y1="404.5625" y2="404.5625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="52" x="601.5" y="399.4966">respond</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="584.5" x2="626.5" y1="470.6953" y2="470.6953"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="626.5" x2="626.5" y1="470.6953" y2="483.6953"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="585.5" x2="626.5" y1="483.6953" y2="483.6953"/><polygon fill="#A80036" points="595.5,479.6953,585.5,483.6953,595.5,487.6953,591.5,483.6953" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="134" x="591.5" y="465.6294">create http response</text><polygon fill="#A80036" points="288,508.8281,278,512.8281,288,516.8281,284,512.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="282" x2="573.5" y1="512.8281" y2="512.8281"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="59" x="294" y="507.7622">response</text><polygon fill="#A80036" points="160,544.9609,150,548.9609,160,552.9609,156,548.9609" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="154" x2="271" y1="548.9609" y2="548.9609"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="52" x="166" y="543.895">reponse</text><polygon fill="#A80036" points="14,574.0938,4,578.0938,14,582.0938,10,578.0938" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="8" x2="143" y1="578.0938" y2="578.0938"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="52" x="20" y="573.0278">reponse</text><!--
+@startuml
+
+
+participant "Harness" as harness
+participant "Worker Desktop" as workdsktp
+participant "Bluetooth Endpoint" as endbt
+participant "Service Desktop" as srvdsktp
+participant "Service Bluetooth" as srvbt
+
+[o-> harness : endpoint request
+activate harness
+ harness -> harness : create message
+ harness -> workdsktp : send request
+ deactivate harness
+ activate workdsktp
+ alt BT endpoint request
+ workdsktp -> endbt : send request
+ deactivate workdsktp
+ activate endbt
+ endbt -> endbt : parse request
+ endbt -> endbt : create message
+ endbt -> srvbt : send message
+ activate srvbt
+
+ alt is simple request
+ endbt -> srvdsktp : simple response
+ deactivate endbt
+ activate srvdsktp
+ else requires actual response
+ srvdsktp <- - srvbt : respond
+ activate srvdsktp
+ deactivate srvbt
+ end
+ srvdsktp -> srvdsktp : create http response
+ workdsktp <- - srvdsktp : response
+ deactivate srvdsktp
+ deactivate srvdsktp
+ activate workdsktp
+ end
+ harness <- - workdsktp : reponse
+ deactivate workdsktp
+ activate harness
+[<- - harness : reponse
+ deactivate harness
+
+@enduml
+
+PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018)
+(GPL source distribution)
+Java Runtime: OpenJDK Runtime Environment
+JVM: OpenJDK 64-Bit Server VM
+Java Version: 11.0.10+9-Ubuntu-0ubuntu1.20.04
+Operating System: Linux
+OS Version: 5.8.0-44-generic
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg><
\ No newline at end of file
M test/pytest/service-bluetooth/doc/README.md => test/pytest/service-bluetooth/doc/README.md +41 -7
@@ 2,21 2,26 @@
## Introduction
-The following provides an overview of automatic tests of `ServiceBluetooth` (henceforth referred to as `S-BT`) functionalities form the user perspective (using `HMI` - human control interface).
+The following document provides an overview of automatic tests of `ServiceBluetooth` (henceforth referred to as `S-BT`) functionalities.
Each test may consists of consecutive steps:
* Pre-test device state setup. This includes:
* `DB` data injection
* test arguments read
* proper window navigation
-* Actual device test run
+* Test run on the device
* Post-test device state analysis
+Tests shall be grouped (and named respectively) in categories by one of the following `Test run`-step based perspectives:
+* `hmi_perspective` - test is performed in the user perspective (using `HMI` - human-machine interface), allowing tester to
+observe and verify consecutive event handling
+* `dev_perspective` - test is performed and analysed using appropriate developer's mode endpoints and the internal system request-response system
+
The `HMI` interface shall be accessed by `harness` for automation purposes.
For analyzing content inside displayed windows, the `DOM` functionality shall be used.
-## Pre-test device state setup
+## HMI pre-test device state setup
-Each `S-BT` test shall start in `ApplicationSettings:Bluetooth` main window, with `Bluetooth` in turned off state by default.
+Each `S-BT` `hmi_perspective` test shall start in `ApplicationSettings:Bluetooth` main window, with `Bluetooth` in turned off state by default.
This can be achieved by following logic enforcement:

@@ 24,7 29,36 @@ This can be achieved by following logic enforcement:
## Testing
-### Pairing - happy path
+### TEST basic_control_dev_perspective - turning `BT` on/off
+
+The test's goal is to ensure that the `BT` device power states can be controlled by `PurePhone` via internal request-response system.
+
+
+
+### TEST basic_control_dev_perspective - phone visibility on/off
+
+The test's goal is to ensure that the `BT` device visibility states can be controlled by `PurePhone` via internal request-response system.
+
+
+
+### TEST pairing_dev_perspective - pairing
+
+The test's goal is to ensure that the `BT` device pairing ability work, can be controlled by `PurePhone` via internal request-response system.
+Also once a device is paired with the `Pure`, it should stay paired despite turning the `BT` off and on.
+The test inputs:
+* external `BT` device name (required)
+
+
+
+### TEST pairing_dev_perspective - connectivity
+
+The test's goal is to ensure that the `PurePhone` can establish `Pure` - `BT` device connection via internal request-response system.
+The test inputs:
+* external `BT` device name (required)
+
+
+
+### TEST pairing_hmi_perspective - happy path
The test's goal is to ensure that the user can establish `Pure` - `BT` device pair via `HMI`.
@@ 34,14 68,14 @@ The test inputs:

-### Pairing - no device
+### TEST pairing_hmi_perspective - no device
The test's goal is to ensure that the user will be correctly notified if the device stored in `DB`
(the user has paired with the device in the past successfully) cannot be reached at the moment.

-### Pairing - forgetting pair
+### TEST pairing_hmi_perspective - forgetting pair
The test's goal is to ensure that the user can make `Pure` forget `BT` devices stored in `DB`.
A test/pytest/service-bluetooth/doc/bluetooth-dev-test-connectivity.puml => test/pytest/service-bluetooth/doc/bluetooth-dev-test-connectivity.puml +52 -0
@@ 0,0 1,52 @@
+@startuml
+
+start
+partition Initialization {
+ :enforce pretest conditions:
+ -read test input data:
+ **requires BT device name
+ -pretest machine state:
+ ** bluetooth turned on;
+}
+
+partition test-run {
+ :scanOn;
+
+ repeat
+ if( timeout exceeded )
+ : request available devices;
+ else (true = failure)
+ stop
+ endif
+ repeatwhile (the BT device name in available devices)
+
+ : pair with the device & turn scan off;
+
+ repeat
+ if( timeout exceeded )
+ : request bonded devices;
+ else (true = failure)
+ stop
+ endif
+ repeatwhile (the BT device name in bonded devices)
+
+
+ : connect with the device;
+ repeat
+ if( timeout exceeded )
+ : request bonded devices;
+ else (true = failure)
+ stop
+ endif
+ repeatwhile (the BT device address is connected)
+
+ : disconnect with the device;
+ : unpair the device;
+
+ if (the BT device address is not connected\nthe BT device name is not in bonded devices) then (success)
+ stop
+ else (false=failure)
+ stop
+ endif
+}
+@enduml
A test/pytest/service-bluetooth/doc/bluetooth-dev-test-connectivity.svg => test/pytest/service-bluetooth/doc/bluetooth-dev-test-connectivity.svg +65 -0
@@ 0,0 1,65 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1132px" preserveAspectRatio="none" style="width:464px;height:1132px;" version="1.1" viewBox="0 0 464 1132" width="464px" zoomAndPan="magnify"><defs><filter height="300%" id="f77eb6kq00gbh" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><ellipse cx="207" cy="20" fill="#000000" filter="url(#f77eb6kq00gbh)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FFFFFF" filter="url(#f77eb6kq00gbh)" height="138.1406" style="stroke: #000000; stroke-width: 2.0;" width="216" x="99" y="40.8018"/><path d="M188,41.8018 L188,50.0986 L178,60.0986 L99,60.0986 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="79" x="102" y="54.7969">Initialization</text><rect fill="#FEFECE" filter="url(#f77eb6kq00gbh)" height="89.8438" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="196" x="109" y="77.0986"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="171" x="119" y="98.2373">enforce pretest conditions:</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="135" x="119" y="112.2061">-read test input data:</text><rect fill="#000000" height="3.5" style="stroke: #000000; stroke-width: 0.0;" width="3.5" x="136" y="121.0049"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="154" x="141" y="126.1748">requires BT device name</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="148" x="119" y="140.1436">-pretest machine state:</text><rect fill="#000000" height="3.5" style="stroke: #000000; stroke-width: 0.0;" width="3.5" x="136" y="148.9424"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="127" x="141" y="154.1123">bluetooth turned on</text><rect fill="#FFFFFF" filter="url(#f77eb6kq00gbh)" height="931.6563" style="stroke: #000000; stroke-width: 2.0;" width="443.5" x="10" y="189.7441"/><path d="M75,190.7441 L75,199.041 L65,209.041 L10,209.041 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="55" x="13" y="203.7393">test-run</text><rect fill="#FEFECE" filter="url(#f77eb6kq00gbh)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="67" x="173.5" y="226.041"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="47" x="183.5" y="247.1797">scanOn</text><rect fill="#FEFECE" filter="url(#f77eb6kq00gbh)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="183" x="115.5" y="368.0098"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="159" x="129.5" y="389.1484">request available devices</text><polygon fill="#FEFECE" filter="url(#f77eb6kq00gbh)" points="152.5,324.0098,261.5,324.0098,273.5,336.0098,261.5,348.0098,152.5,348.0098,140.5,336.0098,152.5,324.0098" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="101" x="156.5" y="339.8179">timeout exceeded</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="76" x="273.5" y="333.4155">true = failure</text><ellipse cx="369.5" cy="336.0098" fill="none" filter="url(#f77eb6kq00gbh)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="370" cy="336.5098" fill="#000000" filter="url(#f77eb6kq00gbh)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#f77eb6kq00gbh)" points="207,280.0098,219,292.0098,207,304.0098,195,292.0098,207,280.0098" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#FEFECE" filter="url(#f77eb6kq00gbh)" points="93,421.9785,321,421.9785,333,433.9785,321,445.9785,93,445.9785,81,433.9785,93,421.9785" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="228" x="93" y="437.7866">the BT device name in available devices</text><rect fill="#FEFECE" filter="url(#f77eb6kq00gbh)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="244" x="85" y="465.9785"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="220" x="99" y="487.1172">pair with the device & turn scan off</text><rect fill="#FEFECE" filter="url(#f77eb6kq00gbh)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="176" x="119" y="607.9473"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="152" x="133" y="629.0859">request bonded devices</text><polygon fill="#FEFECE" filter="url(#f77eb6kq00gbh)" points="152.5,563.9473,261.5,563.9473,273.5,575.9473,261.5,587.9473,152.5,587.9473,140.5,575.9473,152.5,563.9473" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="101" x="156.5" y="579.7554">timeout exceeded</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="76" x="273.5" y="573.353">true = failure</text><ellipse cx="369.5" cy="575.9473" fill="none" filter="url(#f77eb6kq00gbh)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="370" cy="576.4473" fill="#000000" filter="url(#f77eb6kq00gbh)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#f77eb6kq00gbh)" points="207,519.9473,219,531.9473,207,543.9473,195,531.9473,207,519.9473" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#FEFECE" filter="url(#f77eb6kq00gbh)" points="97,661.916,317,661.916,329,673.916,317,685.916,97,685.916,85,673.916,97,661.916" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="220" x="97" y="677.7241">the BT device name in bonded devices</text><rect fill="#FEFECE" filter="url(#f77eb6kq00gbh)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="173" x="120.5" y="705.916"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="149" x="134.5" y="727.0547">connect with the device</text><rect fill="#FEFECE" filter="url(#f77eb6kq00gbh)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="176" x="119" y="847.8848"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="152" x="133" y="869.0234">request bonded devices</text><polygon fill="#FEFECE" filter="url(#f77eb6kq00gbh)" points="152.5,803.8848,261.5,803.8848,273.5,815.8848,261.5,827.8848,152.5,827.8848,140.5,815.8848,152.5,803.8848" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="101" x="156.5" y="819.6929">timeout exceeded</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="76" x="273.5" y="813.2905">true = failure</text><ellipse cx="369.5" cy="815.8848" fill="none" filter="url(#f77eb6kq00gbh)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="370" cy="816.3848" fill="#000000" filter="url(#f77eb6kq00gbh)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#f77eb6kq00gbh)" points="207,759.8848,219,771.8848,207,783.8848,195,771.8848,207,759.8848" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#FEFECE" filter="url(#f77eb6kq00gbh)" points="105,901.8535,309,901.8535,321,913.8535,309,925.8535,105,925.8535,93,913.8535,105,901.8535" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="204" x="105" y="917.6616">the BT device address is connected</text><rect fill="#FEFECE" filter="url(#f77eb6kq00gbh)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="191" x="111.5" y="945.8535"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="167" x="125.5" y="966.9922">disconnect with the device</text><rect fill="#FEFECE" filter="url(#f77eb6kq00gbh)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="133" x="140.5" y="999.8223"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="109" x="154.5" y="1020.9609">unpair the device</text><polygon fill="#FEFECE" filter="url(#f77eb6kq00gbh)" points="79,1053.791,335,1053.791,347,1066.5957,335,1079.4004,79,1079.4004,67,1066.5957,79,1053.791" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="226" x="79" y="1064.0015">the BT device address is not connected</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="256" x="79" y="1076.8062">the BT device name is not in bonded devices</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="47" x="20" y="1064.0015">success</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="73" x="347" y="1064.0015">false=failure</text><ellipse cx="57" cy="1099.4004" fill="none" filter="url(#f77eb6kq00gbh)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="57.5" cy="1099.9004" fill="#000000" filter="url(#f77eb6kq00gbh)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><ellipse cx="357" cy="1099.4004" fill="none" filter="url(#f77eb6kq00gbh)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="357.5" cy="1099.9004" fill="#000000" filter="url(#f77eb6kq00gbh)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="30" y2="77.0986"/><polygon fill="#A80036" points="203,67.0986,207,77.0986,211,67.0986,207,71.0986" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="348.0098" y2="368.0098"/><polygon fill="#A80036" points="203,358.0098,207,368.0098,211,358.0098,207,362.0098" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="273.5" x2="359.5" y1="336.0098" y2="336.0098"/><polygon fill="#A80036" points="349.5,332.0098,359.5,336.0098,349.5,340.0098,353.5,336.0098" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="401.9785" y2="421.9785"/><polygon fill="#A80036" points="203,411.9785,207,421.9785,211,411.9785,207,415.9785" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="304.0098" y2="324.0098"/><polygon fill="#A80036" points="203,314.0098,207,324.0098,211,314.0098,207,318.0098" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="333" x2="437.5" y1="433.9785" y2="433.9785"/><polygon fill="#A80036" points="433.5,382.9941,437.5,372.9941,441.5,382.9941,437.5,378.9941" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="437.5" x2="437.5" y1="292.0098" y2="433.9785"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="437.5" x2="219" y1="292.0098" y2="292.0098"/><polygon fill="#A80036" points="229,288.0098,219,292.0098,229,296.0098,225,292.0098" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="260.0098" y2="280.0098"/><polygon fill="#A80036" points="203,270.0098,207,280.0098,211,270.0098,207,274.0098" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="445.9785" y2="465.9785"/><polygon fill="#A80036" points="203,455.9785,207,465.9785,211,455.9785,207,459.9785" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="587.9473" y2="607.9473"/><polygon fill="#A80036" points="203,597.9473,207,607.9473,211,597.9473,207,601.9473" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="273.5" x2="359.5" y1="575.9473" y2="575.9473"/><polygon fill="#A80036" points="349.5,571.9473,359.5,575.9473,349.5,579.9473,353.5,575.9473" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="641.916" y2="661.916"/><polygon fill="#A80036" points="203,651.916,207,661.916,211,651.916,207,655.916" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="543.9473" y2="563.9473"/><polygon fill="#A80036" points="203,553.9473,207,563.9473,211,553.9473,207,557.9473" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="329" x2="434" y1="673.916" y2="673.916"/><polygon fill="#A80036" points="430,622.9316,434,612.9316,438,622.9316,434,618.9316" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="434" x2="434" y1="531.9473" y2="673.916"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="434" x2="219" y1="531.9473" y2="531.9473"/><polygon fill="#A80036" points="229,527.9473,219,531.9473,229,535.9473,225,531.9473" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="499.9473" y2="519.9473"/><polygon fill="#A80036" points="203,509.9473,207,519.9473,211,509.9473,207,513.9473" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="685.916" y2="705.916"/><polygon fill="#A80036" points="203,695.916,207,705.916,211,695.916,207,699.916" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="827.8848" y2="847.8848"/><polygon fill="#A80036" points="203,837.8848,207,847.8848,211,837.8848,207,841.8848" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="273.5" x2="359.5" y1="815.8848" y2="815.8848"/><polygon fill="#A80036" points="349.5,811.8848,359.5,815.8848,349.5,819.8848,353.5,815.8848" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="881.8535" y2="901.8535"/><polygon fill="#A80036" points="203,891.8535,207,901.8535,211,891.8535,207,895.8535" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="783.8848" y2="803.8848"/><polygon fill="#A80036" points="203,793.8848,207,803.8848,211,793.8848,207,797.8848" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="321" x2="434" y1="913.8535" y2="913.8535"/><polygon fill="#A80036" points="430,862.8691,434,852.8691,438,862.8691,434,858.8691" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="434" x2="434" y1="771.8848" y2="913.8535"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="434" x2="219" y1="771.8848" y2="771.8848"/><polygon fill="#A80036" points="229,767.8848,219,771.8848,229,775.8848,225,771.8848" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="739.8848" y2="759.8848"/><polygon fill="#A80036" points="203,749.8848,207,759.8848,211,749.8848,207,753.8848" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="925.8535" y2="945.8535"/><polygon fill="#A80036" points="203,935.8535,207,945.8535,211,935.8535,207,939.8535" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="979.8223" y2="999.8223"/><polygon fill="#A80036" points="203,989.8223,207,999.8223,211,989.8223,207,993.8223" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="67" x2="57" y1="1066.5957" y2="1066.5957"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="57" x2="57" y1="1066.5957" y2="1089.4004"/><polygon fill="#A80036" points="53,1079.4004,57,1089.4004,61,1079.4004,57,1083.4004" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="347" x2="357" y1="1066.5957" y2="1066.5957"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="357" x2="357" y1="1066.5957" y2="1089.4004"/><polygon fill="#A80036" points="353,1079.4004,357,1089.4004,361,1079.4004,357,1083.4004" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="1033.791" y2="1053.791"/><polygon fill="#A80036" points="203,1043.791,207,1053.791,211,1043.791,207,1047.791" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="166.9424" y2="226.041"/><polygon fill="#A80036" points="203,216.041,207,226.041,211,216.041,207,220.041" style="stroke: #A80036; stroke-width: 1.0;"/><!--
+@startuml
+
+start
+partition Initialization {
+ :enforce pretest conditions:
+ -read test input data:
+ **requires BT device name
+ -pretest machine state:
+ ** bluetooth turned on;
+}
+
+partition test-run {
+ :scanOn;
+
+ repeat
+ if( timeout exceeded )
+ : request available devices;
+ else (true = failure)
+ stop
+ endif
+ repeatwhile (the BT device name in available devices)
+
+ : pair with the device & turn scan off;
+
+ repeat
+ if( timeout exceeded )
+ : request bonded devices;
+ else (true = failure)
+ stop
+ endif
+ repeatwhile (the BT device name in bonded devices)
+
+
+ : connect with the device;
+ repeat
+ if( timeout exceeded )
+ : request bonded devices;
+ else (true = failure)
+ stop
+ endif
+ repeatwhile (the BT device address is connected)
+
+ : disconnect with the device;
+ : unpair the device;
+
+ if (the BT device address is not connected\nthe BT device name is not in bonded devices) then (success)
+ stop
+ else (false=failure)
+ stop
+ endif
+}
+@enduml
+
+PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018)
+(GPL source distribution)
+Java Runtime: OpenJDK Runtime Environment
+JVM: OpenJDK 64-Bit Server VM
+Java Version: 11.0.10+9-Ubuntu-0ubuntu1.20.04
+Operating System: Linux
+OS Version: 5.8.0-44-generic
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg><
\ No newline at end of file
A test/pytest/service-bluetooth/doc/bluetooth-dev-test-on-off.puml => test/pytest/service-bluetooth/doc/bluetooth-dev-test-on-off.puml +29 -0
@@ 0,0 1,29 @@
+@startuml
+
+start
+partition Initialization {
+ :enforce pretest machine conditions:
+ ** bluetooth turned off;
+}
+
+partition test-run {
+
+ : set state:
+ -power on;
+ : get device state;
+
+ if (power is on )
+ : set state:
+ -power off;
+ else (no=failure)
+ stop
+ endif
+
+ : get device state;
+ if (power is off ) then (success)
+ stop
+ else (no=failure)
+ stop
+ endif
+}
+@enduml
A test/pytest/service-bluetooth/doc/bluetooth-dev-test-on-off.svg => test/pytest/service-bluetooth/doc/bluetooth-dev-test-on-off.svg +42 -0
@@ 0,0 1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="548px" preserveAspectRatio="none" style="width:303px;height:548px;" version="1.1" viewBox="0 0 303 548" width="303px" zoomAndPan="magnify"><defs><filter height="300%" id="f1t3v11fvi8ij8" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><ellipse cx="144" cy="20" fill="#000000" filter="url(#f1t3v11fvi8ij8)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FFFFFF" filter="url(#f1t3v11fvi8ij8)" height="96.2344" style="stroke: #000000; stroke-width: 2.0;" width="268" x="10" y="40.8018"/><path d="M99,41.8018 L99,50.0986 L89,60.0986 L10,60.0986 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="79" x="13" y="54.7969">Initialization</text><rect fill="#FEFECE" filter="url(#f1t3v11fvi8ij8)" height="47.9375" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="248" x="20" y="77.0986"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="228" x="30" y="98.2373">enforce pretest machine conditions:</text><rect fill="#000000" height="3.5" style="stroke: #000000; stroke-width: 0.0;" width="3.5" x="47" y="107.0361"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="127" x="52" y="112.2061">bluetooth turned off</text><rect fill="#FFFFFF" filter="url(#f1t3v11fvi8ij8)" height="390.1094" style="stroke: #000000; stroke-width: 2.0;" width="253.5" x="39" y="147.8379"/><path d="M104,148.8379 L104,157.1348 L94,167.1348 L39,167.1348 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="55" x="42" y="161.833">test-run</text><rect fill="#FEFECE" filter="url(#f1t3v11fvi8ij8)" height="47.9375" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="86" x="101" y="184.1348"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="61" x="115" y="205.2734">set state:</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="62" x="115" y="219.2422">-power on</text><rect fill="#FEFECE" filter="url(#f1t3v11fvi8ij8)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="126" x="81" y="252.0723"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="95" y="273.2109">get device state</text><rect fill="#FEFECE" filter="url(#f1t3v11fvi8ij8)" height="47.9375" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="85" x="101.5" y="350.041"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="61" x="115.5" y="371.1797">set state:</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="62" x="111.5" y="385.1484">-power off</text><polygon fill="#FEFECE" filter="url(#f1t3v11fvi8ij8)" points="108.5,306.041,179.5,306.041,191.5,318.041,179.5,330.041,108.5,330.041,96.5,318.041,108.5,306.041" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="67" x="108.5" y="321.8491">power is on</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="59" x="191.5" y="315.4468">no=failure</text><ellipse cx="270.5" cy="318.041" fill="none" filter="url(#f1t3v11fvi8ij8)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="271" cy="318.541" fill="#000000" filter="url(#f1t3v11fvi8ij8)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f1t3v11fvi8ij8)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="126" x="81" y="417.9785"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="95" y="439.1172">get device state</text><polygon fill="#FEFECE" filter="url(#f1t3v11fvi8ij8)" points="108,471.9473,180,471.9473,192,483.9473,180,495.9473,108,495.9473,96,483.9473,108,471.9473" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="68" x="108" y="487.7554">power is off</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="47" x="49" y="481.353">success</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="59" x="192" y="481.353">no=failure</text><ellipse cx="86" cy="515.9473" fill="none" filter="url(#f1t3v11fvi8ij8)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="86.5" cy="516.4473" fill="#000000" filter="url(#f1t3v11fvi8ij8)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><ellipse cx="202" cy="515.9473" fill="none" filter="url(#f1t3v11fvi8ij8)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="202.5" cy="516.4473" fill="#000000" filter="url(#f1t3v11fvi8ij8)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="30" y2="77.0986"/><polygon fill="#A80036" points="140,67.0986,144,77.0986,148,67.0986,144,71.0986" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="232.0723" y2="252.0723"/><polygon fill="#A80036" points="140,242.0723,144,252.0723,148,242.0723,144,246.0723" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="330.041" y2="350.041"/><polygon fill="#A80036" points="140,340.041,144,350.041,148,340.041,144,344.041" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="191.5" x2="260.5" y1="318.041" y2="318.041"/><polygon fill="#A80036" points="250.5,314.041,260.5,318.041,250.5,322.041,254.5,318.041" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="397.9785" y2="417.9785"/><polygon fill="#A80036" points="140,407.9785,144,417.9785,148,407.9785,144,411.9785" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="286.041" y2="306.041"/><polygon fill="#A80036" points="140,296.041,144,306.041,148,296.041,144,300.041" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="96" x2="86" y1="483.9473" y2="483.9473"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="86" x2="86" y1="483.9473" y2="505.9473"/><polygon fill="#A80036" points="82,495.9473,86,505.9473,90,495.9473,86,499.9473" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="192" x2="202" y1="483.9473" y2="483.9473"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="202" x2="202" y1="483.9473" y2="505.9473"/><polygon fill="#A80036" points="198,495.9473,202,505.9473,206,495.9473,202,499.9473" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="451.9473" y2="471.9473"/><polygon fill="#A80036" points="140,461.9473,144,471.9473,148,461.9473,144,465.9473" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="125.0361" y2="184.1348"/><polygon fill="#A80036" points="140,174.1348,144,184.1348,148,174.1348,144,178.1348" style="stroke: #A80036; stroke-width: 1.0;"/><!--
+@startuml
+
+start
+partition Initialization {
+ :enforce pretest machine conditions:
+ ** bluetooth turned off;
+}
+
+partition test-run {
+
+ : set state:
+ -power on;
+ : get device state;
+
+ if (power is on )
+ : set state:
+ -power off;
+ else (no=failure)
+ stop
+ endif
+
+ : get device state;
+ if (power is off ) then (success)
+ stop
+ else (no=failure)
+ stop
+ endif
+}
+@enduml
+
+PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018)
+(GPL source distribution)
+Java Runtime: OpenJDK Runtime Environment
+JVM: OpenJDK 64-Bit Server VM
+Java Version: 11.0.10+9-Ubuntu-0ubuntu1.20.04
+Operating System: Linux
+OS Version: 5.8.0-44-generic
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg><
\ No newline at end of file
A test/pytest/service-bluetooth/doc/bluetooth-dev-test-pairing.puml => test/pytest/service-bluetooth/doc/bluetooth-dev-test-pairing.puml +52 -0
@@ 0,0 1,52 @@
+@startuml
+
+start
+partition Initialization {
+ :enforce pretest conditions:
+ -read test input data:
+ **requires BT device name
+ -pretest machine state:
+ ** bluetooth turned on;
+}
+
+partition test-run {
+ :scanOn;
+
+ repeat
+ if( timeout exceeded )
+ : request available devices;
+ else (true = failure)
+ stop
+ endif
+ repeatwhile (the BT device name in available devices)
+
+ : pair with the device & turn scan off;
+
+ repeat
+ if( timeout exceeded )
+ : request bonded devices;
+ else (true = failure)
+ stop
+ endif
+ repeatwhile (the BT device name in bonded devices)
+
+ : turn BT off;
+ : turn BT on;
+
+ repeat
+ if( timeout exceeded )
+ : request bonded devices;
+ else (true = failure)
+ stop
+ endif
+ repeatwhile (the BT device name in bonded devices)
+
+ : unpair the device;
+
+ if (the BT device name is not in bonded devices) then (success)
+ stop
+ else (false=failure)
+ stop
+ endif
+}
+@enduml
A test/pytest/service-bluetooth/doc/bluetooth-dev-test-pairing.svg => test/pytest/service-bluetooth/doc/bluetooth-dev-test-pairing.svg +65 -0
@@ 0,0 1,65 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1130px" preserveAspectRatio="none" style="width:464px;height:1130px;" version="1.1" viewBox="0 0 464 1130" width="464px" zoomAndPan="magnify"><defs><filter height="300%" id="fnbnu0y7yo4w" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><ellipse cx="207" cy="20" fill="#000000" filter="url(#fnbnu0y7yo4w)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FFFFFF" filter="url(#fnbnu0y7yo4w)" height="138.1406" style="stroke: #000000; stroke-width: 2.0;" width="216" x="99" y="40.8018"/><path d="M188,41.8018 L188,50.0986 L178,60.0986 L99,60.0986 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="79" x="102" y="54.7969">Initialization</text><rect fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" height="89.8438" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="196" x="109" y="77.0986"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="171" x="119" y="98.2373">enforce pretest conditions:</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="135" x="119" y="112.2061">-read test input data:</text><rect fill="#000000" height="3.5" style="stroke: #000000; stroke-width: 0.0;" width="3.5" x="136" y="121.0049"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="154" x="141" y="126.1748">requires BT device name</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="148" x="119" y="140.1436">-pretest machine state:</text><rect fill="#000000" height="3.5" style="stroke: #000000; stroke-width: 0.0;" width="3.5" x="136" y="148.9424"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="127" x="141" y="154.1123">bluetooth turned on</text><rect fill="#FFFFFF" filter="url(#fnbnu0y7yo4w)" height="930.0469" style="stroke: #000000; stroke-width: 2.0;" width="443.5" x="10" y="189.7441"/><path d="M75,190.7441 L75,199.041 L65,209.041 L10,209.041 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="55" x="13" y="203.7393">test-run</text><rect fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="67" x="173.5" y="226.041"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="47" x="183.5" y="247.1797">scanOn</text><rect fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="183" x="115.5" y="368.0098"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="159" x="129.5" y="389.1484">request available devices</text><polygon fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" points="152.5,324.0098,261.5,324.0098,273.5,336.0098,261.5,348.0098,152.5,348.0098,140.5,336.0098,152.5,324.0098" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="101" x="156.5" y="339.8179">timeout exceeded</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="76" x="273.5" y="333.4155">true = failure</text><ellipse cx="369.5" cy="336.0098" fill="none" filter="url(#fnbnu0y7yo4w)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="370" cy="336.5098" fill="#000000" filter="url(#fnbnu0y7yo4w)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" points="207,280.0098,219,292.0098,207,304.0098,195,292.0098,207,280.0098" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" points="93,421.9785,321,421.9785,333,433.9785,321,445.9785,93,445.9785,81,433.9785,93,421.9785" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="228" x="93" y="437.7866">the BT device name in available devices</text><rect fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="244" x="85" y="465.9785"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="220" x="99" y="487.1172">pair with the device & turn scan off</text><rect fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="176" x="119" y="607.9473"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="152" x="133" y="629.0859">request bonded devices</text><polygon fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" points="152.5,563.9473,261.5,563.9473,273.5,575.9473,261.5,587.9473,152.5,587.9473,140.5,575.9473,152.5,563.9473" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="101" x="156.5" y="579.7554">timeout exceeded</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="76" x="273.5" y="573.353">true = failure</text><ellipse cx="369.5" cy="575.9473" fill="none" filter="url(#fnbnu0y7yo4w)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="370" cy="576.4473" fill="#000000" filter="url(#fnbnu0y7yo4w)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" points="207,519.9473,219,531.9473,207,543.9473,195,531.9473,207,519.9473" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" points="97,661.916,317,661.916,329,673.916,317,685.916,97,685.916,85,673.916,97,661.916" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="220" x="97" y="677.7241">the BT device name in bonded devices</text><rect fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="89" x="162.5" y="705.916"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="65" x="176.5" y="727.0547">turn BT off</text><rect fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="89" x="162.5" y="759.8848"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="65" x="176.5" y="781.0234">turn BT on</text><rect fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="176" x="119" y="901.8535"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="152" x="133" y="922.9922">request bonded devices</text><polygon fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" points="152.5,857.8535,261.5,857.8535,273.5,869.8535,261.5,881.8535,152.5,881.8535,140.5,869.8535,152.5,857.8535" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="101" x="156.5" y="873.6616">timeout exceeded</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="76" x="273.5" y="867.2593">true = failure</text><ellipse cx="369.5" cy="869.8535" fill="none" filter="url(#fnbnu0y7yo4w)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="370" cy="870.3535" fill="#000000" filter="url(#fnbnu0y7yo4w)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" points="207,813.8535,219,825.8535,207,837.8535,195,825.8535,207,813.8535" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" points="97,955.8223,317,955.8223,329,967.8223,317,979.8223,97,979.8223,85,967.8223,97,955.8223" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="220" x="97" y="971.6304">the BT device name in bonded devices</text><rect fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="133" x="140.5" y="999.8223"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="109" x="154.5" y="1020.9609">unpair the device</text><polygon fill="#FEFECE" filter="url(#fnbnu0y7yo4w)" points="79,1053.791,335,1053.791,347,1065.791,335,1077.791,79,1077.791,67,1065.791,79,1053.791" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="256" x="79" y="1069.5991">the BT device name is not in bonded devices</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="47" x="20" y="1063.1968">success</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="73" x="347" y="1063.1968">false=failure</text><ellipse cx="57" cy="1097.791" fill="none" filter="url(#fnbnu0y7yo4w)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="57.5" cy="1098.291" fill="#000000" filter="url(#fnbnu0y7yo4w)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><ellipse cx="357" cy="1097.791" fill="none" filter="url(#fnbnu0y7yo4w)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="357.5" cy="1098.291" fill="#000000" filter="url(#fnbnu0y7yo4w)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="30" y2="77.0986"/><polygon fill="#A80036" points="203,67.0986,207,77.0986,211,67.0986,207,71.0986" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="348.0098" y2="368.0098"/><polygon fill="#A80036" points="203,358.0098,207,368.0098,211,358.0098,207,362.0098" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="273.5" x2="359.5" y1="336.0098" y2="336.0098"/><polygon fill="#A80036" points="349.5,332.0098,359.5,336.0098,349.5,340.0098,353.5,336.0098" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="401.9785" y2="421.9785"/><polygon fill="#A80036" points="203,411.9785,207,421.9785,211,411.9785,207,415.9785" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="304.0098" y2="324.0098"/><polygon fill="#A80036" points="203,314.0098,207,324.0098,211,314.0098,207,318.0098" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="333" x2="437.5" y1="433.9785" y2="433.9785"/><polygon fill="#A80036" points="433.5,382.9941,437.5,372.9941,441.5,382.9941,437.5,378.9941" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="437.5" x2="437.5" y1="292.0098" y2="433.9785"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="437.5" x2="219" y1="292.0098" y2="292.0098"/><polygon fill="#A80036" points="229,288.0098,219,292.0098,229,296.0098,225,292.0098" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="260.0098" y2="280.0098"/><polygon fill="#A80036" points="203,270.0098,207,280.0098,211,270.0098,207,274.0098" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="445.9785" y2="465.9785"/><polygon fill="#A80036" points="203,455.9785,207,465.9785,211,455.9785,207,459.9785" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="587.9473" y2="607.9473"/><polygon fill="#A80036" points="203,597.9473,207,607.9473,211,597.9473,207,601.9473" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="273.5" x2="359.5" y1="575.9473" y2="575.9473"/><polygon fill="#A80036" points="349.5,571.9473,359.5,575.9473,349.5,579.9473,353.5,575.9473" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="641.916" y2="661.916"/><polygon fill="#A80036" points="203,651.916,207,661.916,211,651.916,207,655.916" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="543.9473" y2="563.9473"/><polygon fill="#A80036" points="203,553.9473,207,563.9473,211,553.9473,207,557.9473" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="329" x2="434" y1="673.916" y2="673.916"/><polygon fill="#A80036" points="430,622.9316,434,612.9316,438,622.9316,434,618.9316" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="434" x2="434" y1="531.9473" y2="673.916"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="434" x2="219" y1="531.9473" y2="531.9473"/><polygon fill="#A80036" points="229,527.9473,219,531.9473,229,535.9473,225,531.9473" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="499.9473" y2="519.9473"/><polygon fill="#A80036" points="203,509.9473,207,519.9473,211,509.9473,207,513.9473" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="685.916" y2="705.916"/><polygon fill="#A80036" points="203,695.916,207,705.916,211,695.916,207,699.916" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="739.8848" y2="759.8848"/><polygon fill="#A80036" points="203,749.8848,207,759.8848,211,749.8848,207,753.8848" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="881.8535" y2="901.8535"/><polygon fill="#A80036" points="203,891.8535,207,901.8535,211,891.8535,207,895.8535" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="273.5" x2="359.5" y1="869.8535" y2="869.8535"/><polygon fill="#A80036" points="349.5,865.8535,359.5,869.8535,349.5,873.8535,353.5,869.8535" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="935.8223" y2="955.8223"/><polygon fill="#A80036" points="203,945.8223,207,955.8223,211,945.8223,207,949.8223" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="837.8535" y2="857.8535"/><polygon fill="#A80036" points="203,847.8535,207,857.8535,211,847.8535,207,851.8535" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="329" x2="434" y1="967.8223" y2="967.8223"/><polygon fill="#A80036" points="430,916.8379,434,906.8379,438,916.8379,434,912.8379" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="434" x2="434" y1="825.8535" y2="967.8223"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="434" x2="219" y1="825.8535" y2="825.8535"/><polygon fill="#A80036" points="229,821.8535,219,825.8535,229,829.8535,225,825.8535" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="793.8535" y2="813.8535"/><polygon fill="#A80036" points="203,803.8535,207,813.8535,211,803.8535,207,807.8535" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="979.8223" y2="999.8223"/><polygon fill="#A80036" points="203,989.8223,207,999.8223,211,989.8223,207,993.8223" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="67" x2="57" y1="1065.791" y2="1065.791"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="57" x2="57" y1="1065.791" y2="1087.791"/><polygon fill="#A80036" points="53,1077.791,57,1087.791,61,1077.791,57,1081.791" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="347" x2="357" y1="1065.791" y2="1065.791"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="357" x2="357" y1="1065.791" y2="1087.791"/><polygon fill="#A80036" points="353,1077.791,357,1087.791,361,1077.791,357,1081.791" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="1033.791" y2="1053.791"/><polygon fill="#A80036" points="203,1043.791,207,1053.791,211,1043.791,207,1047.791" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="207" x2="207" y1="166.9424" y2="226.041"/><polygon fill="#A80036" points="203,216.041,207,226.041,211,216.041,207,220.041" style="stroke: #A80036; stroke-width: 1.0;"/><!--
+@startuml
+
+start
+partition Initialization {
+ :enforce pretest conditions:
+ -read test input data:
+ **requires BT device name
+ -pretest machine state:
+ ** bluetooth turned on;
+}
+
+partition test-run {
+ :scanOn;
+
+ repeat
+ if( timeout exceeded )
+ : request available devices;
+ else (true = failure)
+ stop
+ endif
+ repeatwhile (the BT device name in available devices)
+
+ : pair with the device & turn scan off;
+
+ repeat
+ if( timeout exceeded )
+ : request bonded devices;
+ else (true = failure)
+ stop
+ endif
+ repeatwhile (the BT device name in bonded devices)
+
+ : turn BT off;
+ : turn BT on;
+
+ repeat
+ if( timeout exceeded )
+ : request bonded devices;
+ else (true = failure)
+ stop
+ endif
+ repeatwhile (the BT device name in bonded devices)
+
+ : unpair the device;
+
+ if (the BT device name is not in bonded devices) then (success)
+ stop
+ else (false=failure)
+ stop
+ endif
+}
+@enduml
+
+PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018)
+(GPL source distribution)
+Java Runtime: OpenJDK Runtime Environment
+JVM: OpenJDK 64-Bit Server VM
+Java Version: 11.0.10+9-Ubuntu-0ubuntu1.20.04
+Operating System: Linux
+OS Version: 5.8.0-44-generic
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg><
\ No newline at end of file
A test/pytest/service-bluetooth/doc/bluetooth-dev-test-visibility-on-off.puml => test/pytest/service-bluetooth/doc/bluetooth-dev-test-visibility-on-off.puml +36 -0
@@ 0,0 1,36 @@
+@startuml
+
+start
+partition Initialization {
+ :enforce pretest machine conditions:
+ ** bluetooth turned off;
+}
+
+partition test-run {
+
+ : set state:
+ -power on
+ -visibility off;
+ : get device state;
+
+ if (power is on \nvisibility is off )
+ : change visibility;
+ else (false=failure)
+ stop
+ endif
+
+ : get device state;
+ if (power is on \nvisibility is on )
+ : change visibility;
+ else (false=failure)
+ stop
+ endif
+
+ : get device state;
+ if (power is on \nvisibility is off) then (success)
+ stop
+ else (false=failure)
+ stop
+ endif
+}
+@enduml
A test/pytest/service-bluetooth/doc/bluetooth-dev-test-visibility-on-off.svg => test/pytest/service-bluetooth/doc/bluetooth-dev-test-visibility-on-off.svg +49 -0
@@ 0,0 1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="705px" preserveAspectRatio="none" style="width:323px;height:705px;" version="1.1" viewBox="0 0 323 705" width="323px" zoomAndPan="magnify"><defs><filter height="300%" id="f2xmo19ttudm5" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><ellipse cx="144" cy="20" fill="#000000" filter="url(#f2xmo19ttudm5)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FFFFFF" filter="url(#f2xmo19ttudm5)" height="96.2344" style="stroke: #000000; stroke-width: 2.0;" width="268" x="10" y="40.8018"/><path d="M99,41.8018 L99,50.0986 L89,60.0986 L10,60.0986 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="79" x="13" y="54.7969">Initialization</text><rect fill="#FEFECE" filter="url(#f2xmo19ttudm5)" height="47.9375" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="248" x="20" y="77.0986"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="228" x="30" y="98.2373">enforce pretest machine conditions:</text><rect fill="#000000" height="3.5" style="stroke: #000000; stroke-width: 0.0;" width="3.5" x="47" y="107.0361"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="127" x="52" y="112.2061">bluetooth turned off</text><rect fill="#FFFFFF" filter="url(#f2xmo19ttudm5)" height="546.875" style="stroke: #000000; stroke-width: 2.0;" width="276" x="36" y="147.8379"/><path d="M101,148.8379 L101,157.1348 L91,167.1348 L36,167.1348 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="55" x="39" y="161.833">test-run</text><rect fill="#FEFECE" filter="url(#f2xmo19ttudm5)" height="61.9063" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="95" x="96.5" y="184.1348"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="61" x="110.5" y="205.2734">set state:</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="62" x="110.5" y="219.2422">-power on</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="71" x="110.5" y="233.2109">-visibility off</text><rect fill="#FEFECE" filter="url(#f2xmo19ttudm5)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="126" x="81" y="266.041"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="95" y="287.1797">get device state</text><rect fill="#FEFECE" filter="url(#f2xmo19ttudm5)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="122" x="83" y="365.6191"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="98" x="97" y="386.7578">change visibility</text><polygon fill="#FEFECE" filter="url(#f2xmo19ttudm5)" points="103,320.0098,185,320.0098,197,332.8145,185,345.6191,103,345.6191,91,332.8145,103,320.0098" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="67" x="103" y="330.2202">power is on</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="78" x="103" y="343.0249">visibility is off</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="73" x="197" y="330.2202">false=failure</text><ellipse cx="290" cy="332.8145" fill="none" filter="url(#f2xmo19ttudm5)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="290.5" cy="333.3145" fill="#000000" filter="url(#f2xmo19ttudm5)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f2xmo19ttudm5)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="126" x="81" y="419.5879"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="95" y="440.7266">get device state</text><rect fill="#FEFECE" filter="url(#f2xmo19ttudm5)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="122" x="83" y="519.166"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="98" x="97" y="540.3047">change visibility</text><polygon fill="#FEFECE" filter="url(#f2xmo19ttudm5)" points="103.5,473.5566,184.5,473.5566,196.5,486.3613,184.5,499.166,103.5,499.166,91.5,486.3613,103.5,473.5566" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="67" x="103.5" y="483.7671">power is on</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="77" x="103.5" y="496.5718">visibility is on</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="73" x="196.5" y="483.7671">false=failure</text><ellipse cx="289.5" cy="486.3613" fill="none" filter="url(#f2xmo19ttudm5)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="290" cy="486.8613" fill="#000000" filter="url(#f2xmo19ttudm5)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f2xmo19ttudm5)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="126" x="81" y="573.1348"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="95" y="594.2734">get device state</text><polygon fill="#FEFECE" filter="url(#f2xmo19ttudm5)" points="105,627.1035,183,627.1035,195,639.9082,183,652.7129,105,652.7129,93,639.9082,105,627.1035" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="67" x="105" y="637.314">power is on</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="78" x="105" y="650.1187">visibility is off</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="47" x="46" y="637.314">success</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="73" x="195" y="637.314">false=failure</text><ellipse cx="83" cy="672.7129" fill="none" filter="url(#f2xmo19ttudm5)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="83.5" cy="673.2129" fill="#000000" filter="url(#f2xmo19ttudm5)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><ellipse cx="205" cy="672.7129" fill="none" filter="url(#f2xmo19ttudm5)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="205.5" cy="673.2129" fill="#000000" filter="url(#f2xmo19ttudm5)" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="30" y2="77.0986"/><polygon fill="#A80036" points="140,67.0986,144,77.0986,148,67.0986,144,71.0986" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="246.041" y2="266.041"/><polygon fill="#A80036" points="140,256.041,144,266.041,148,256.041,144,260.041" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="345.6191" y2="365.6191"/><polygon fill="#A80036" points="140,355.6191,144,365.6191,148,355.6191,144,359.6191" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="197" x2="280" y1="332.8145" y2="332.8145"/><polygon fill="#A80036" points="270,328.8145,280,332.8145,270,336.8145,274,332.8145" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="399.5879" y2="419.5879"/><polygon fill="#A80036" points="140,409.5879,144,419.5879,148,409.5879,144,413.5879" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="300.0098" y2="320.0098"/><polygon fill="#A80036" points="140,310.0098,144,320.0098,148,310.0098,144,314.0098" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="499.166" y2="519.166"/><polygon fill="#A80036" points="140,509.166,144,519.166,148,509.166,144,513.166" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="196.5" x2="279.5" y1="486.3613" y2="486.3613"/><polygon fill="#A80036" points="269.5,482.3613,279.5,486.3613,269.5,490.3613,273.5,486.3613" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="553.1348" y2="573.1348"/><polygon fill="#A80036" points="140,563.1348,144,573.1348,148,563.1348,144,567.1348" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="453.5566" y2="473.5566"/><polygon fill="#A80036" points="140,463.5566,144,473.5566,148,463.5566,144,467.5566" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="93" x2="83" y1="639.9082" y2="639.9082"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="83" x2="83" y1="639.9082" y2="662.7129"/><polygon fill="#A80036" points="79,652.7129,83,662.7129,87,652.7129,83,656.7129" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="195" x2="205" y1="639.9082" y2="639.9082"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="205" x2="205" y1="639.9082" y2="662.7129"/><polygon fill="#A80036" points="201,652.7129,205,662.7129,209,652.7129,205,656.7129" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="607.1035" y2="627.1035"/><polygon fill="#A80036" points="140,617.1035,144,627.1035,148,617.1035,144,621.1035" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="144" x2="144" y1="125.0361" y2="184.1348"/><polygon fill="#A80036" points="140,174.1348,144,184.1348,148,174.1348,144,178.1348" style="stroke: #A80036; stroke-width: 1.0;"/><!--
+@startuml
+
+start
+partition Initialization {
+ :enforce pretest machine conditions:
+ ** bluetooth turned off;
+}
+
+partition test-run {
+
+ : set state:
+ -power on
+ -visibility off;
+ : get device state;
+
+ if (power is on \nvisibility is off )
+ : change visibility;
+ else (false=failure)
+ stop
+ endif
+
+ : get device state;
+ if (power is on \nvisibility is on )
+ : change visibility;
+ else (false=failure)
+ stop
+ endif
+
+ : get device state;
+ if (power is on \nvisibility is off) then (success)
+ stop
+ else (false=failure)
+ stop
+ endif
+}
+@enduml
+
+PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018)
+(GPL source distribution)
+Java Runtime: OpenJDK Runtime Environment
+JVM: OpenJDK 64-Bit Server VM
+Java Version: 11.0.10+9-Ubuntu-0ubuntu1.20.04
+Operating System: Linux
+OS Version: 5.8.0-44-generic
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg><
\ No newline at end of file