Skip to content

Commit 53929dc

Browse files
committed
test: windows pytest
1 parent 0849193 commit 53929dc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

sample/Tests/test/test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def test_0_other_functions(self):
3434
self.assertEqual("Set call timeout to: 600000ms", output.get_text())
3535

3636
# Go back to authenticated scene
37+
time.sleep(5)
3738
self.altdriver.find_object(By.NAME, "CancelButton").tap()
3839
self.altdriver.wait_for_current_scene_to_be("AuthenticatedScene")
3940

sample/Tests/test_windows.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ function Run-Pytest {
3030
[string]$testFile
3131
)
3232
Write-Output "Running pytest for $testFile..."
33-
Start-Process -FilePath "pytest" -ArgumentList $testFile -NoNewWindow -PassThru | Wait-Process
33+
$process = Start-Process -FilePath "pytest" -ArgumentList "-x", $testFile -NoNewWindow -PassThru -Wait
34+
if ($process.ExitCode -ne 0) {
35+
Write-Output "Test failed for $testFile. Stopping execution."
36+
exit $process.ExitCode
37+
}
3438
}
3539

3640
# Function to stop Chrome if it's running
@@ -105,7 +109,7 @@ function Logout {
105109
Write-Output "Chrome executable not found."
106110
exit
107111
}
108-
112+
109113
Start-Process -FilePath $chromePath -ArgumentList "--remote-debugging-port=9222"
110114

111115
Write-Output "Running python script to logout..."

0 commit comments

Comments
 (0)