diff --git a/Robot-Framework/test-suites/bat-tests/__init__.robot b/Robot-Framework/test-suites/bat-tests/__init__.robot index b89f6f87..48d4bdb3 100644 --- a/Robot-Framework/test-suites/bat-tests/__init__.robot +++ b/Robot-Framework/test-suites/bat-tests/__init__.robot @@ -26,10 +26,11 @@ BAT tests setup Switch Connection ${CONNECTION} BAT tests teardown - Connect to ghaf host + ${connection} Connect + Set Global Variable ${CONNECTION} ${connection} Log journctl IF "Lenovo" in "${DEVICE}" Connect to netvm Log out END - Close All Connections \ No newline at end of file + Close All Connections diff --git a/Robot-Framework/test-suites/audio-tests/audio.robot b/Robot-Framework/test-suites/bat-tests/audio.robot similarity index 82% rename from Robot-Framework/test-suites/audio-tests/audio.robot rename to Robot-Framework/test-suites/bat-tests/audio.robot index 0cf35a93..bf059966 100644 --- a/Robot-Framework/test-suites/audio-tests/audio.robot +++ b/Robot-Framework/test-suites/bat-tests/audio.robot @@ -3,29 +3,28 @@ *** Settings *** Documentation Testing audio applicaton -Force Tags audio lenovo-x1 +Force Tags audio Resource ../../__framework__.resource Resource ../../resources/serial_keywords.resource Resource ../../resources/common_keywords.resource Resource ../../resources/connection_keywords.resource Resource ../../resources/ssh_keywords.resource Resource ../../config/variables.robot -Suite Setup Initialize Variables And Connect -Suite Teardown Close All Connections -Test Timeout 2 minutes +Test Setup Connect to netvm +Test Teardown Close All Connections +Test Timeout 3 minutes *** Test Cases *** Record Audio And Verify [Documentation] Record short audio with pulseaudio tool. Verify audio clip is bigger than default empty file (40Kb) [Teardown] Execute Command rm /tmp/test*.wav sudo=True sudo_password=${PASSWORD} - [Tags] SSRCSP-T247 - Connect to netvm + [Tags] SSRCSP-T247 lenovo-x1 FOR ${vm} IN ${CHROME_VM} ${BUSINESS_VM} Connect to VM ${vm} # Execute Command timeouts in business-vm, but it is executing the command Log To Console Recording audio file - Run Keyword And Ignore Error Execute Command parecord -r /tmp/test_${vm}.wav timeout=10 + Run Keyword And Ignore Error Execute Command parecord -r /tmp/test_${vm}.wav sudo=True sudo_password=${PASSWORD} timeout=10 Sleep 5 Execute Command pkill parecord timeout=10 sudo=True sudo_password=${PASSWORD} Sleep 1 @@ -35,12 +34,11 @@ Record Audio And Verify Check Audio devices [Documentation] List audio sinks and sources in business-vm and chrome-vm and check status is running - [Tags] SSRCSP-T246 - Connect to netvm + [Tags] SSRCSP-T246 lenovo-x1 FOR ${vm} IN ${CHROME_VM} ${BUSINESS_VM} Connect to VM ${vm} - ${sources} Execute Command pactl list sources - ${sinks} Execute Command pactl list sinks + ${sources} Execute Command pactl list sources sudo=True sudo_password=${PASSWORD} + ${sinks} Execute Command pactl list sinks sudo=True sudo_password=${PASSWORD} Should Not Be Empty ${sources} Should Not Be Empty ${sinks} END diff --git a/Robot-Framework/test-suites/bat-tests/business_vm.robot b/Robot-Framework/test-suites/bat-tests/business_vm.robot index 17b90075..5758ad80 100644 --- a/Robot-Framework/test-suites/bat-tests/business_vm.robot +++ b/Robot-Framework/test-suites/bat-tests/business_vm.robot @@ -8,6 +8,7 @@ Resource ../../resources/ssh_keywords.resource Resource ../../resources/virtualization_keywords.resource Resource ../../config/variables.robot Resource ../../resources/common_keywords.resource +Test Setup Business Apps Test Setup Test Teardown Business Apps Test Teardown @@ -16,8 +17,6 @@ Test Teardown Business Apps Test Teardown Start Microsoft Outlook on LenovoX1 [Documentation] Start Microsoft Outlook in Business-vm and verify process started [Tags] outlook SP-T176 - Connect to netvm - Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD} Start XDG application "Microsoft Outlook" Connect to VM ${BUSINESS_VM} Check that the application was started outlook @@ -25,8 +24,6 @@ Start Microsoft Outlook on LenovoX1 Start Microsoft 365 on LenovoX1 [Documentation] Start Microsoft 365 in Business-vm and verify process started [Tags] microsoft365 SP-T178 - Connect to netvm - Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD} Start XDG application "Microsoft 365" Connect to VM ${BUSINESS_VM} Check that the application was started microsoft365 @@ -34,8 +31,6 @@ Start Microsoft 365 on LenovoX1 Start Microsoft Teams on LenovoX1 [Documentation] Start Microsoft Teams in Business-vm and verify process started [Tags] teams SP-T177 - Connect to netvm - Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD} Start XDG application Teams Connect to VM ${BUSINESS_VM} Check that the application was started teams @@ -43,8 +38,6 @@ Start Microsoft Teams on LenovoX1 Start Trusted Browser on LenovoX1 [Documentation] Start Trusted Browser in Business-vm and verify process started [Tags] trusted_browser SP-T179 - Connect to netvm - Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD} Start XDG application "Trusted Browser" Connect to VM ${BUSINESS_VM} Check that the application was started chrome @@ -52,8 +45,6 @@ Start Trusted Browser on LenovoX1 Start Video Editor on LenovoX1 [Documentation] Start Video Editor in Business-vm and verify process started [Tags] video_editor SP-T244 - Connect to netvm - Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD} Start XDG application "Video Editor" Connect to VM ${BUSINESS_VM} Check that the application was started lossless @@ -61,8 +52,6 @@ Start Video Editor on LenovoX1 Start Text Editor on LenovoX1 [Documentation] Start Text Editor in Business-vm and verify process started [Tags] text_editor SP-T243 - Connect to netvm - Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD} Start XDG application "Text Editor" Connect to VM ${BUSINESS_VM} Check that the application was started text-editor @@ -70,8 +59,6 @@ Start Text Editor on LenovoX1 Start Xarchiver on LenovoX1 [Documentation] Start Xarchiver in Business-vm and verify process started [Tags] xarchiver SP-T242 - Connect to netvm - Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD} Start XDG application "Xarchiver" Connect to VM ${BUSINESS_VM} Check that the application was started xarchiver @@ -79,6 +66,10 @@ Start Xarchiver on LenovoX1 *** Keywords *** +Business Apps Test Setup + Connect to netvm + Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD} + Business Apps Test Teardown Kill process @{APP_PIDS} Close All Connections \ No newline at end of file diff --git a/Robot-Framework/test-suites/logging-tests/check_logs.robot b/Robot-Framework/test-suites/bat-tests/check_logs.robot similarity index 94% rename from Robot-Framework/test-suites/logging-tests/check_logs.robot rename to Robot-Framework/test-suites/bat-tests/check_logs.robot index 3610ddeb..a0408802 100644 --- a/Robot-Framework/test-suites/logging-tests/check_logs.robot +++ b/Robot-Framework/test-suites/bat-tests/check_logs.robot @@ -3,12 +3,12 @@ *** Settings *** Documentation Testing logging -Force Tags logging lenovo-x1 +Force Tags bat logging lenovo-x1 Resource ../../config/variables.robot Resource ../../resources/ssh_keywords.resource Resource ../../resources/connection_keywords.resource Library DateTime -Suite Setup Set Variables ${DEVICE} +Suite Setup Connect to netvm Suite Teardown Close All Connections @@ -21,7 +21,6 @@ ${GRAFANA_LOGS} https://loki.ghaflogs.vedenemo.dev Check Grafana logs [Documentation] Check that all virtual machines are sending logs to Grafana [Tags] SP-T172 - [Setup] Connect to netvm [Teardown] Remove Wifi configuration ${TEST_WIFI_SSID} Configure wifi ${NETVM_SSH} ${TEST_WIFI_SSID} ${TEST_WIFI_PSWD} Check Internet Connection diff --git a/Robot-Framework/test-suites/bat-tests/gui-vm.robot b/Robot-Framework/test-suites/bat-tests/gui-vm.robot index 4cf5ebeb..03d17479 100644 --- a/Robot-Framework/test-suites/bat-tests/gui-vm.robot +++ b/Robot-Framework/test-suites/bat-tests/gui-vm.robot @@ -7,8 +7,8 @@ Force Tags gui-vm-apps bat lenovo-x1 Resource ../../resources/ssh_keywords.resource Resource ../../config/variables.robot Resource ../../resources/common_keywords.resource -Test Setup Run Keywords Connect to netvm AND Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD} -Test Teardown Gui-vm apps teardown +Test Setup Gui-vm Apps Test Setup +Test Teardown Gui-vm Apps Test Teardown *** Variables *** @@ -55,7 +55,11 @@ Start File Manager on LenovoX1 *** Keywords *** -Gui-vm apps teardown +Gui-vm Apps Test Setup + Connect to netvm + Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD} + +Gui-vm Apps Test Teardown Connect to VM ${GUI_VM} Kill process @{APP_PIDS} Connect to VM ${GUI_VM} ${USER_LOGIN} ${USER_PASSWORD} diff --git a/Robot-Framework/test-suites/video-tests/video.robot b/Robot-Framework/test-suites/bat-tests/video.robot similarity index 95% rename from Robot-Framework/test-suites/video-tests/video.robot rename to Robot-Framework/test-suites/bat-tests/video.robot index e48b7115..39f8bf16 100644 --- a/Robot-Framework/test-suites/video-tests/video.robot +++ b/Robot-Framework/test-suites/bat-tests/video.robot @@ -3,15 +3,15 @@ *** Settings *** Documentation Testing camera application -Force Tags video lenovo-x1 +Force Tags bat video lenovo-x1 Resource ../../__framework__.resource Resource ../../resources/serial_keywords.resource Resource ../../resources/common_keywords.resource Resource ../../resources/connection_keywords.resource Resource ../../resources/ssh_keywords.resource Resource ../../config/variables.robot -Suite Setup Initialize Variables And Connect -Suite Teardown Close All Connections +Test Setup Connect to netvm +Test Teardown Close All Connections Test Timeout 2 minutes @@ -19,7 +19,6 @@ Test Timeout 2 minutes Check Camera Application [Documentation] Check that camera application is available in business-vm and not in other vm [Tags] SP-T235 - Connect to netvm FOR ${vm} IN @{VMS} Connect to VM ${vm} ${out} Execute Command v4l2-ctl --list-devices sudo=True sudo_password=${PASSWORD} @@ -30,7 +29,6 @@ Check Camera Application Record Video With Camera [Documentation] Start Camera application and record short video [Tags] SP-T236 - Connect to netvm Connect to VM ${BUSINESS_VM} Execute Command rm /tmp/video* sudo=True sudo_password=${PASSWORD} @{recorded_video_ids} Create List diff --git a/Robot-Framework/test-suites/performance-tests/performance.robot b/Robot-Framework/test-suites/performance-tests/performance.robot index f167cd28..d0523032 100644 --- a/Robot-Framework/test-suites/performance-tests/performance.robot +++ b/Robot-Framework/test-suites/performance-tests/performance.robot @@ -288,7 +288,8 @@ Sysbench test in VMs on LenovoX1 ... chrome-vm=4 ... comms-vm=4 ... admin-vm=1 - ... audio-vm=1 + ... audio-vm=2 + ... business-vm=4 ${vms} Get Dictionary Keys ${threads} @{FAILED_VMS} Create List Set Global Variable @{FAILED_VMS}