Skip to content

Commit

Permalink
перенесём исравления виндовых тестов из ветки ci_tests_refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
log0div0 committed Jan 12, 2021
1 parent 9c50a2a commit baf66b8
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 16 deletions.
51 changes: 45 additions & 6 deletions ci/test_scripts/win10.testo
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ machine win10 {
}

[no_snapshots: true]
test win10_installation_part_1 {
test win10_install_os_part_1 {
win10 {
start
mouse click "Мой язык - русский" timeout 20m
Expand All @@ -34,7 +34,7 @@ test win10_installation_part_1 {
}
}

test win10_installation_part_2: win10_installation_part_1 {
test win10_install_os_part_2: win10_install_os_part_1 {
win10 {
wait "Продолжить на выбранном языке?"
mouse move 0 0; sleep 5s
Expand Down Expand Up @@ -63,7 +63,7 @@ test win10_installation_part_2: win10_installation_part_1 {
wait "Какое имя вы хотите использовать?"
mouse move 0 0; sleep 5s
mouse click "Имя".from_bottom(0)
press LeftAlt+LeftShift; type "user"; press Enter
press LeftAlt+LeftShift; sleep 5s; type "user"; press Enter

mouse move 0 0; sleep 5s
mouse click "Пароль".from_bottom(0)
Expand Down Expand Up @@ -106,7 +106,21 @@ test win10_installation_part_2: win10_installation_part_1 {
}

[no_snapshots: true]
test win10_prepare: win10_installation_part_2 {
test win10_activate: win10_install_os_part_2 {
win10 {
mouse move "Activator"
mouse click
mouse dclick
wait "Разрешить этому приложению"
mouse click "Да".from_bottom(0)
mouse click "Активировать Windows 10"
wait "Постоянная активация прошла успешно"
press LeftAlt+F4
}
}

[no_snapshots: true]
test win10_enable_autologin: win10_activate {
win10 {
press LeftMeta+R
wait "Введите имя программы"
Expand All @@ -121,13 +135,17 @@ test win10_prepare: win10_installation_part_2 {
wait !"Автоматический вход в систему"
press LeftAlt+F4
wait !"Учетные записи пользователей"
shutdown
start
wait "Корзина"
}
}

[no_snapshots: true]
test win10_install_hyperv: win10_prepare {
test win10_install_hyperv: win10_enable_autologin {
win10 {
mouse click "Чтобы начать поиск, введите здесь"; sleep 2s
mouse click "поиск"; sleep 2s
press LeftAlt+LeftShift; sleep 2s
type "PowerShell"; sleep 2s
mouse click "Запуск от имени администратора"
wait "Разрешить этому приложению"
Expand All @@ -142,6 +160,7 @@ test win10_install_hyperv: win10_prepare {
}
}

[no_snapshots: true]
test win10_install_guest_additions: win10_install_hyperv {
win10 {
plug dvd "${ISO_DIR}/testo-guest-additions.iso"
Expand All @@ -165,3 +184,23 @@ test win10_install_guest_additions: win10_install_hyperv {
sleep 5s
}
}

[no_snapshots: true]
test win10_install_python: win10_install_guest_additions {
win10 {
exec cmd """
curl https://www.python.org/ftp/python/3.8.7/python-3.8.7-amd64.exe -o C:\\Users\\user\\Downloads\\python.exe
C:\\Users\\user\\Downloads\\python.exe /quiet InstallAllUsers=1 PrependPath=1
"""
exec cmd """
pip install pytest
"""
}
}

test win10_prepare: win10_install_python {
win10 {
copyto "${ISO_DIR}/ubuntu-16.04.6-server-amd64.iso" "C:\\ubuntu-16.04.6-server-amd64.iso"
shutdown
}
}
4 changes: 1 addition & 3 deletions ci/test_scripts/win10_ga.testo
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@

include "win10.testo"

test win10_test_ga_install: win10_installation_part_2 {
test win10_test_ga_install: win10_install_os_part_2 {
win10 {
plug dvd "${OUT_DIR}/testo-guest-additions.iso"
mouse click "Поиск видеодрайвера"
sleep 5s
mouse click "CD-дисковод"
sleep 5s
mouse click "Выполнить autorun"
Expand Down
14 changes: 9 additions & 5 deletions ci/test_scripts/win10_testo.testo
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

include "win10.testo"

[no_snapshots: true]
test win10_test_testo_install_cpu: win10_install_guest_additions {
test win10_test_testo_install_cpu: win10_prepare {
win10 {
start
wait "Корзина"
copyto "${OUT_DIR}/testo-cpu.msi" "C:\\Users\\user\\Desktop\\testo.msi"
mouse dclick "testo"
wait "Welcome to the Testo Setup"; press Enter
Expand All @@ -13,16 +14,19 @@ test win10_test_testo_install_cpu: win10_install_guest_additions {
wait "Ready to install"; press Enter
wait "Разрешить этому приложению"
mouse click "Да".from_bottom(0)
wait "Click the Finish button"; press Enter
wait "Click the Finish button"
mouse click "Finish".from_bottom(0)
wait !"Click the Finish button"

exec cmd "testo version"
shutdown
}
}

[no_snapshots: true]
test win10_test_testo_install_gpu: win10_install_guest_additions {
test win10_test_testo_install_gpu: win10_prepare {
win10 {
start
wait "Корзина"
copyto "${OUT_DIR}/testo-gpu.msi" "C:\\Users\\user\\Desktop\\testo.msi"
mouse dclick "testo"
wait "Welcome to the Testo Setup"; press Enter
Expand Down
2 changes: 1 addition & 1 deletion ci/test_scripts/win7.testo
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ machine win7 {
}
}

test win7_installation {
test win7_install_os {
win7 {
start
wait "Choose an operating system"
Expand Down
2 changes: 1 addition & 1 deletion ci/test_scripts/win7_ga.testo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

include "win7.testo"

test win7_test_ga_install: win7_installation {
test win7_test_ga_install: win7_install_os {
win7 {
plug dvd "${OUT_DIR}/testo-guest-additions.iso"
wait "Автозапуск"; press Enter
Expand Down

0 comments on commit baf66b8

Please sign in to comment.