Skip to content

Commit

Permalink
Merge pull request #130 from tiiuae/SP-4969
Browse files Browse the repository at this point in the history
SP-4969 Add automated tests for Business vm
  • Loading branch information
maaharko authored Aug 8, 2024
2 parents fb84742 + 264b1d8 commit 75134d3
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 2,477 deletions.
1 change: 1 addition & 0 deletions Robot-Framework/config/variables.robot
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Set Variables
Set Global Variable ${ZATHURA_VM} zathura-vm
Set Global Variable ${ELEMENT_VM} element-vm
Set Global Variable ${APPFLOWY_VM} appflowy-vm
Set Global Variable ${BUSINESS_VM} business-vm

IF $BUILD_ID != '${EMPTY}'
${config}= Read Config ../config/${BUILD_ID}.json
Expand Down
21 changes: 21 additions & 0 deletions Robot-Framework/resources/common_keywords.resource
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: 2022-2024 Technology Innovation Institute (TII)
# SPDX-License-Identifier: Apache-2.0

*** Settings ***
Resource ../config/variables.robot


*** Keywords ***

Check that the application was started
[Arguments] ${app_name} ${range}=2
FOR ${i} IN RANGE ${range}
@{found_pids} Find pid by name ${app_name}
Set Global Variable @{app_pids} @{found_pids}
${status} Run Keyword And Return Status Should Not Be Empty ${app_pids}
IF ${status} BREAK
Sleep 1
END
Should Not Be Empty ${app_pids} ${app_name} is not started
Log To Console ${app_name} is started

16 changes: 1 addition & 15 deletions Robot-Framework/test-suites/bat-tests/apps.robot
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Documentation Testing launching applications
Force Tags apps
Resource ../../resources/ssh_keywords.resource
Resource ../../config/variables.robot
Resource ../../resources/common_keywords.resource
Suite Teardown Close All Connections


Expand Down Expand Up @@ -75,18 +76,3 @@ Start Appflowy on LenovoX1
Connect to VM ${APPFLOWY_VM}
Check that the application was started appflowy
[Teardown] Kill process @{app_pids}


*** Keywords ***

Check that the application was started
[Arguments] ${app_name} ${range}=2
FOR ${i} IN RANGE ${range}
@{found_pids} Find pid by name ${app_name}
Set Global Variable @{app_pids} @{found_pids}
${status} Run Keyword And Return Status Should Not Be Empty ${app_pids}
IF ${status} BREAK
Sleep 1
END
Should Not Be Empty ${app_pids} ${app_name} is not started
Log To Console ${app_name} is started
55 changes: 55 additions & 0 deletions Robot-Framework/test-suites/bat-tests/business_vm.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# SPDX-FileCopyrightText: 2022-2024 Technology Innovation Institute (TII)
# SPDX-License-Identifier: Apache-2.0

*** Settings ***
Documentation Testing Business VM
Force Tags bat businessvm lenovo-x1
Resource ../../resources/ssh_keywords.resource
Resource ../../resources/virtualization_keywords.resource
Resource ../../config/variables.robot
Resource ../../resources/common_keywords.resource

Suite Teardown Close All Connections


*** Test Cases ***

Start Microsoft Outlook on LenovoX1
[Documentation] Start Microsoft Outlook in dedicated VM and verify process started
[Tags] outlook SP-T186
Connect to netvm
Connect to VM ${GUI_VM}
Start XDG application "Microsoft Outlook"
Connect to VM ${BUSINESS_VM}
Check that the application was started outlook
[Teardown] Kill process @{app_pids}

Start Microsoft 365 on LenovoX1
[Documentation] Start Microsoft 365 in dedicated VM and verify process started
[Tags] microsoft365 SP-T188
Connect to netvm
Connect to VM ${GUI_VM}
Start XDG application "Microsoft 365"
Connect to VM ${BUSINESS_VM}
Check that the application was started microsoft365
[Teardown] Kill process @{app_pids}

Start Microsoft Teams on LenovoX1
[Documentation] Start Microsoft Teams in dedicated VM and verify process started
[Tags] teams SP-T187
Connect to netvm
Connect to VM ${GUI_VM}
Start XDG application Teams
Connect to VM ${BUSINESS_VM}
Check that the application was started teams
[Teardown] Kill process @{app_pids}

Start Microsoft Trusted Browser on LenovoX1
[Documentation] Start Microsoft Trusted Browser in dedicated VM and verify process started
[Tags] trusted_browser SP-T189
Connect to netvm
Connect to VM ${GUI_VM}
Start XDG application "Trusted Browser"
Connect to VM ${BUSINESS_VM}
Check that the application was started chromium
[Teardown] Kill process @{app_pids}
Empty file.
Empty file.
Loading

0 comments on commit 75134d3

Please sign in to comment.