diff --git a/test-cases/connman-pan-network-access-reconnect.yaml b/test-cases/connman-pan-network-access-reconnect.yaml new file mode 100644 index 0000000000000000000000000000000000000000..45ecf8cd5aa2a310f7ee96a090c30f960dd1a7b2 --- /dev/null +++ b/test-cases/connman-pan-network-access-reconnect.yaml @@ -0,0 +1,88 @@ +metadata: + name: connman-pan-network-access-reconnect + format: "Apertis Test Definition 1.0" + image-types: + target: [ armhf, amd64 ] + basesdk: [ amd64 ] + sdk: [ amd64 ] + image-deployment: + - APT + type: functional + exec-type: manual + priority: medium + maintainer: "Apertis Project" + description: "Test ConnMan support for bluetooth PAN Network Access Profile. + This test will test that after restarting the Bluetooth tethering + from the phone side the internet access from Apertis to a bluetooth + device sharing its internet connection is maintained." + + resources: + - "A USB Bluetooth adapter." + - "A phone supporting PAN NAP. A computer can also be used to share its + internet connection." + + macro_install_packages_preconditions: apertis-tests chaiwala-tests python3-dbus python3-gi + pre-conditions: + - "Make sure an Internet connection is active on the phone and can be shared. + The steps are phone specific." + - "Ensure the bluetooth adapter is detected in Apertis: In VirtualBox menu, + select \"Devices > USB\" and check the entry corresponding to the selected + bluetooth adapter." + - "Please note that connman disables bluetooth by default on a fresh image. + If it's already enabled, connmanctl will give an \"In progress\" error that + may be ignored. To enable the device:" + - $ connmanctl enable bluetooth + - "Start simple agent:" + - $ /usr/lib/chaiwala-tests/bluez/simple-agent -y + - "Pair both devices initiating from the phone side" + - "Pay attention to the simple-agent window as it requires input during + the pairing process." + + expected: + - "At this point, you should be able to navigate on the internet from Apertis. + For example:" + - | + >user@apertis:~$ ping www.google.fr + PING www.google.fr (216.58.198.163) 56(84) bytes of data. + 64 bytes from lhr25s10-in-f3.1e100.net (216.58.198.163): icmp_seq=1 ttl=50 time=62.0 ms + - "Start the web browser from the Applications menu and display a web page." + - "Specifying a DNS should not be necessary, it can be done as follow:" + - $ connmanctl config bluetooth_aabbccddeeff_feedbeefcafe --nameservers 8.8.8.8 + - "After toggling the bluetooth tethering option from ON-OFF to ON the connection should be + re-established i.e. the auto-connect feature should work as expected" + notes: + - "Warning: Connman changes are persistent (over reboot!). After finishing + testing, it might be wise to perform the dhcp test to ensure that the + network is in a sensible state." + - "For ALL tests the enable step will give an \"In progress\" error if the + device is already enabled. This is to be expected." + + post-conditions: + - "Disconnect using connmanctl:" + - $ connmanctl disconnect bluetooth_aabbccddeeff_feedbeefcafe + - "Enable ethernet again if it was disabled" + - $ connmanctl enable ethernet + +run: + steps: + - "To ensure effective usage of bluetooth and not ethernet, one can use:" + - $ connmanctl disable ethernet + - "List connman services and Check no other network technologies is in use + with:" + - $ connmanctl services + - "From the result select the bluetooth service which matches both the adapter + and phone addresses. If connections succeeds, connmanctl will display + Connected bluetooth_aabbccddeeff_feedbeefcafe:" + - $ connmanctl connect bluetooth_aabbccddeeff_feedbeefcafe + - | + >Connected bluetooth_aabbccddeeff_feedbeefcafe + - "Control ip routing goes through PAN interface. IP addresses can vary, but + the default gateway should be bnepX or enXaabbccddeeff:" + - $ ip route + - | + >default via 192.168.2.1 dev bnep0 + 192.168.2.0/24 dev bnep0 proto kernel scope link src 192.168.2.3 + 192.168.2.1 dev bnep0 scope link + - "At this point an internet connection is setup on the apertis side from the phone" + - "Now on the phone side toggle the bluetooth tethering option from the settings menu from the initial ON state + to OFF state and back to ON state" diff --git a/test-cases/connman-pan-tethering-reboot.yaml b/test-cases/connman-pan-tethering-reboot.yaml new file mode 100644 index 0000000000000000000000000000000000000000..60ff13d8ab133e26961e068b9bf3cbd72426c4db --- /dev/null +++ b/test-cases/connman-pan-tethering-reboot.yaml @@ -0,0 +1,54 @@ +metadata: + name: connman-pan-tethering-reboot + format: "Apertis Test Definition 1.0" + image-types: + target: [ armhf, amd64 ] + basesdk: [ amd64 ] + sdk: [ amd64 ] + image-deployment: + - APT + type: functional + exec-type: manual + priority: medium + maintainer: "Apertis Project" + description: "Test Connman-pan-tethering support for PAN connectivity after reboot." + + resources: + - "A Bluetooth adapter." + - "A device supporting PAN PANU." + + macro_install_packages_preconditions: apertis-tests python3-dbus python3-gi + pre-conditions: + - "Make sure an Internet connection is active on the system." + - "When testing on the SDK image, make sure blueman-applet is not running or + kill it." + + expected: + - "If after rebooting the target the connection to the phone succeeds and you are able to navigate on the internet then + it works." + + notes: + - "Warning: Connman changes are persistent (over reboot!). After finishing + testing, it might be wise to perform the dhcp test to ensure that the + network is in a sensible state." + - "For ALL tests the enable step will give an \"In progress\" error if the + device is already enabled. This is to be expected." + +run: + steps: + - "Enable bluetooth:" + - $ connmanctl enable bluetooth + - "Start Bluetooth tethering:" + - $ connmanctl tether bluetooth on + - "Start simple agent:" + - $ /usr/lib/chaiwala-tests/bluez/simple-agent -y + - "On the other device, scan for the Bluetooth device and pair with, then + connect to the Bluetooth PAN. Most phones(?) don't actually support + tethering to another device (as they, by definition, already have an + internet connection) but connecting a computer and asking, say, + NetworkManager to connect to the newly paired bluetooth device should work + just fine (when testing in this case, ensure all other connections are + disabled!)" + - "Reboot the phone" + - "After the phone is rebooted it should be able to establish a connection to the target" + - "An internet connection should be re-established" diff --git a/test-cases/connman-services-reboot.yaml b/test-cases/connman-services-reboot.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6830457ce0f03d3de7c359d6d0123a2694ab963d --- /dev/null +++ b/test-cases/connman-services-reboot.yaml @@ -0,0 +1,68 @@ +metadata: + name: connman-services-reboot + format: "Apertis Test Definition 1.0" + image-types: + target: [ armhf, amd64 ] + basesdk: [ amd64 ] + sdk: [ amd64 ] + image-deployment: + - APT + - OSTree + type: functional + exec-type: manual + priority: critical + maintainer: "Apertis Project" + description: "Tests Network connection management: ensuring that ConnMan can + connect to actual networks even after the device under test is rebooted" + macro_install_packages_preconditions: wget + pre-conditions: + - "The device must have wifi, otherwise skip this test." + - "Please note that connman disables wifi by default on a fresh image. To + enable:" + - $ connmanctl enable wifi + - "If it's already enabled, connmanctl will give the error + \"Error wifi: Already enabled\" that may be ignored." + + expected: + - "If success \"Connected <service ID>\" will be printed by connmanctl, + otherwise \"Agent ReportError <service ID>\" will be printed." + - "On executing the wget command the connection should succeed and you should be able to ping any website" + - "After rebooting the target it is still able to reconnect to the wi-fi network or to the mobile hotspot and ping any website like www.google.com" + + notes: + - "Warning: Connman changes are persistent (over reboot!). After finishing + testing, it might be wise to perform the dhcp test to ensure that the + network is in a sensible state." + - "For ALL tests the enable step will give an \"In progress\" error if the + device is already enabled. This is to be expected." + - "When testing the SDK image in VirtualBox with an Asus USB-N10 Wireless + adapter, firmware-realtek needs to be installed on the host." + +run: + steps: + - "Run the ConnMan CLI Interface:" + - $ connmanctl + - "When run without arguments, connmanctl will launch in interactive mode + with a \"connmanctl>\" prompt." + - "Scan wifi:" + - $ connmanctl> scan wifi + - "Wait for \"Scan completed for wifi\" before continuing (this may take a few + seconds and will appear above connmanctl prompt)." + - "Turn on the agent, to manage additional information if required:" + - $ connmanctl> agent on + - "connmanctl should return \"Agent registered\"." + - "List services available:" + - $ connmanctl> services + - "Select required service and use the \"service ID\" (second column) to + connect:" + - $ connmanctl> connect <service ID> + - "If it's connecting to a wifi service that needs additional information + connmanctl will output an \"Agent RequestInput (…)\" line followed by a + prompt for the required information, such as \"Passphrase? \"." + - "Ensure ConnMan returns \"Connected <service ID>\" before continuing." + - "Quit from connmanctl interactive mode with:" + - $connmanctl> quit + - "On the terminal enter $wget www.google.com" + - "Wget is successfull" + - "Reboot the target" + - "Once the target is rebooted again execute the above wget command on the terminal" diff --git a/test-cases/connman-services-switchover.yaml b/test-cases/connman-services-switchover.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c0ff010277410a3fdff431bec80ca1ba78986508 --- /dev/null +++ b/test-cases/connman-services-switchover.yaml @@ -0,0 +1,77 @@ +metadata: + name: connman-services-switchover + format: "Apertis Test Definition 1.0" + image-types: + target: [ armhf, amd64 ] + basesdk: [ amd64 ] + sdk: [ amd64 ] + image-deployment: + - APT + - OSTree + type: functional + exec-type: manual + priority: critical + maintainer: "Apertis Project" + description: "Tests Network connection management: ensuring that ConnMan can + connect to actual networks even after the device under test is rebooted" + macro_install_packages_preconditions: wget + pre-conditions: + - "The device must have wifi, otherwise skip this test." + - "A mobile Hot-Spot must be setup" + - "Please note that connman disables wifi by default on a fresh image. To + enable:" + - $ connmanctl enable wifi + - "If it's already enabled, connmanctl will give the error + \"Error wifi: Already enabled\" that may be ignored." + + expected: + - "If success \"Connected <service ID>\" will be printed by connmanctl, + otherwise \"Agent ReportError <service ID>\" will be printed." + - "On executing the wget command the connection should succeed and you should be able to ping any website" + - "On switching over from the mobile hot-spot to Wi-Fi network connman should not ask the user to re-enter the password for the Wi-Fi network" + + notes: + - "Warning: Connman changes are persistent (over reboot!). After finishing + testing, it might be wise to perform the dhcp test to ensure that the + network is in a sensible state." + - "For ALL tests the enable step will give an \"In progress\" error if the + device is already enabled. This is to be expected." + - "When testing the SDK image in VirtualBox with an Asus USB-N10 Wireless + adapter, firmware-realtek needs to be installed on the host." + +run: + steps: + - "Run the ConnMan CLI Interface:" + - $ connmanctl + - "When run without arguments, connmanctl will launch in interactive mode + with a \"connmanctl>\" prompt." + - "Scan wifi:" + - $connmanctl> scan wifi + - "Wait for \"Scan completed for wifi\" before continuing (this may take a few + seconds and will appear above connmanctl prompt)." + - "Turn on the agent, to manage additional information if required:" + - $connmanctl> agent on + - "connmanctl should return \"Agent registered\"." + - "List services available:" + - $connmanctl> services + - "Select required service and use the \"service ID\" (second column) to + connect:" + - $connmanctl> connect <service ID> + - "If it's connecting to a Wi-Fi service that needs additional information + connmanctl will output an \"Agent RequestInput (…)\" line followed by a + prompt for the required information, such as \"Passphrase? \"." + - "Ensure ConnMan returns \"Connected <service ID>\" before continuing." + - "Quit from connmanctl interactive mode with:" + - $connmanctl> quit + - "On the terminal enter $wget www.google.com" + - "Wget is successfull and the connection is establised via Wi-Fi" + - "Disconnect from the Wi-Fi network" + - $ connmanctl + - $connmanctl> scan wifi + - "Connect to the mobile hot-spot that you have setup on your phone by entering the right password" + - "Quit from connmanctl interactive mode with:" + - $connmanctl> quit + - $ connmanctl + - $connmanctl> scan wifi + - $ "Connect back to the Wi-Fi network" +