File tree Expand file tree Collapse file tree 11 files changed +107
-61
lines changed
taskcluster/kinds/run-smoke-tests Expand file tree Collapse file tree 11 files changed +107
-61
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,27 @@ jobs:
26
26
mv ./ci_pyproject.toml ./pyproject.toml;
27
27
pipenv install;
28
28
- name : Run Setup.exe
29
+ id : setup
29
30
run : |
30
31
.\setup.exe /silent;
31
32
Start-Sleep -Seconds 10;
32
33
- name : Run Smoke Tests in Win
34
+ if : steps.setup.conclusion == 'success'
33
35
run : |
34
36
pipenv run pytest -n 4 .
35
37
$env:TEST_EXIT_CODE = $LASTEXITCODE
36
38
mv artifacts artifacts-win || true
37
39
exit $env:TEST_EXIT_CODE
40
+ - name : Run Smoke Tests in Win (Headed)
41
+ if : steps.setup.conclusion == 'success'
42
+ run : |
43
+ rm ./pyproject.toml;
44
+ mv ./ci_pyproject_headed.toml ./pyproject.toml;
45
+ pipenv run pytest -n 4 .
46
+ $env:TEST_EXIT_CODE = $LASTEXITCODE
47
+ rm artifacts/assets -r -Force
48
+ mv artifacts/* artifacts-win
49
+ exit $env:TEST_EXIT_CODE
38
50
- name : Upload artifacts
39
51
if : always()
40
52
uses : actions/upload-artifact@v4
65
77
pipenv run pytest --fx-executable $(cat ./fx_location) -s -n 4 . || TEST_EXIT_CODE=$?
66
78
mv artifacts artifacts-mac || true
67
79
exit $TEST_EXIT_CODE
80
+ - name : Run Smoke Tests in MacOS (Headed)
81
+ run : |
82
+ mv ./ci_pyproject_headed.toml ./pyproject.toml;
83
+ pipenv run pytest --fx-executable $(cat ./fx_location) -s -n 4 . || TEST_EXIT_CODE=$?
84
+ mv -r artifacts/* artifacts-mac/ || true
85
+ exit $TEST_EXIT_CODE
68
86
- name : Upload artifacts
69
87
if : always()
70
88
uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ log_cli = true
4
4
log_cli_level = " warn"
5
5
markers = [
6
6
" audio: test is reliant on audio" ,
7
- " pynput : test uses pynput package " ,
7
+ " headed : test must run in headed mode (e.g. uses pynput) " ,
8
8
" incident: incident smoke tests" ,
9
9
" unstable: temporary mark for unstable tests" ,
10
10
" slow: test is clocked at more than 30s on modern machines" ,
@@ -16,7 +16,7 @@ markers = [
16
16
testpaths = [
17
17
" tests"
18
18
]
19
- addopts = " -vs --ci --reruns 2 --reruns-delay 1 -m 'not incident and not unstable' --html=artifacts/report.html"
19
+ addopts = " -vs --ci --run-headless -- reruns 2 --reruns-delay 1 -m 'not incident and not unstable and not headed ' --html=artifacts/report.html"
20
20
21
21
[tool .ruff ]
22
22
target-version = " py310"
Original file line number Diff line number Diff line change
1
+ [tool .pytest .ini_options ]
2
+ generate_report_on_test = true
3
+ log_cli = true
4
+ log_cli_level = " warn"
5
+ markers = [
6
+ " audio: test is reliant on audio" ,
7
+ " headed: test must run in headed mode (e.g. uses pynput)" ,
8
+ " incident: incident smoke tests" ,
9
+ " unstable: temporary mark for unstable tests" ,
10
+ " slow: test is clocked at more than 30s on modern machines" ,
11
+ " ci: basic tests to run in ci" ,
12
+ " locale_de: tests run in DE locale versions" ,
13
+ " locale_fr: tests run in FR locale versions" ,
14
+ " locale_gb: tests run in GB locale versions"
15
+ ]
16
+ testpaths = [
17
+ " tests"
18
+ ]
19
+ addopts = " -vs --ci --reruns 4 --reruns-delay 1 -m 'not incident and not unstable and headed' --html=artifacts/report_headed.html"
20
+
21
+ [tool .ruff ]
22
+ target-version = " py310"
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ def driver(
250
250
"""
251
251
try :
252
252
options = Options ()
253
- if opt_headless or opt_ci :
253
+ if opt_headless :
254
254
options .add_argument ("--headless" )
255
255
options .binary_location = fx_executable
256
256
for opt , value in set_prefs :
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ log_cli = true
5
5
log_cli_level = " info"
6
6
markers = [
7
7
" audio: test is reliant on audio" ,
8
- " pynput : test uses pynput package " ,
8
+ " headed : test must run in headed mode (e.g. uses pynput) " ,
9
9
" incident: incident smoke tests" ,
10
10
" unstable: temporary mark for unstable tests" ,
11
11
" slow: test is clocked at more than 30s on modern machines" ,
Original file line number Diff line number Diff line change 1
1
[tool .pytest .ini_options ]
2
- generate_report_on_test = false
3
2
addopts = " -vs --html=report.html"
4
3
log_cli = true
5
4
log_cli_level = " info"
6
5
markers = [
7
6
" audio: test is reliant on audio" ,
8
- " pynput : test uses pynput package " ,
7
+ " headed : test must run in headed mode (e.g. uses pynput) " ,
9
8
" incident: incident smoke tests" ,
10
9
" unstable: temporary mark for unstable tests" ,
11
10
" slow: test is clocked at more than 30s on modern machines" ,
Original file line number Diff line number Diff line change 24
24
"pytest" ,
25
25
"--run-headless" ,
26
26
"-m" ,
27
- "not unstable" ,
27
+ "not unstable and not headed " ,
28
28
"-n" ,
29
29
"4" ,
30
30
* tests ,
Original file line number Diff line number Diff line change 31
31
./collect_executables.sh;
32
32
mv ./ci_pyproject.toml ./pyproject.toml;
33
33
pipenv install;
34
+ pipenv run pytest --fx-executable $(cat ./fx_location) -n 4 .;
35
+ mv ./ci_pyproject_headed.toml ./pyproject.toml;
34
36
pipenv run pytest --fx-executable $(cat ./fx_location) -n 4 .
35
37
notify :
36
38
recipients :
@@ -40,55 +42,55 @@ tasks:
40
42
content :
41
43
slack :
42
44
blocks : [
43
- {
44
- " type " : " header" ,
45
- " text " : {
46
- " type " : " plain_text" ,
47
- " text " : " firefox-desktop :firefox: ${task.metadata.name}\n "
48
- }
49
- },
50
- {
51
- " type " : " divider"
52
- },
53
- {
54
- " type " : " section" ,
55
- " text " : {
56
- " type " : " mrkdwn" ,
57
- " text " : " *Task*: <https://firefox-ci-tc.services.mozilla.com/tasks/${status.taskId}|Taskcluster>"
58
- }
59
- },
60
- {
61
- " type " : " section" ,
62
- " text " : {
63
- " type " : " mrkdwn" ,
64
- " text " : " *Owner*: ${task.metadata.owner}"
65
- }
66
- },
67
- {
68
- " type " : " section" ,
69
- " text " : {
70
- " type " : " mrkdwn" ,
71
- " text " : " *Commit*: <${task.metadata.source}>"
72
- }
73
- },
74
- {
75
- " type " : " section" ,
76
- " text " : {
77
- " type " : " mrkdwn" ,
78
- " text " : " *Test Summary*: <https://firefoxci.taskcluster-artifacts.net/${status.taskId}/0/public/results/report.html?sort=result> :debug:"
79
- }
80
- },
81
- {
82
- " type " : " divider"
83
- },
84
- {
85
- " type " : " context" ,
86
- " elements " : [
87
- {
88
- " type " : " mrkdwn" ,
89
- " text " : " :testops-notify: created by Desktop QA Test Engineering"
90
- }
91
- ]
92
- }
93
- ]
45
+ {
46
+ " type " : " header" ,
47
+ " text " : {
48
+ " type " : " plain_text" ,
49
+ " text " : " firefox-desktop :firefox: ${task.metadata.name}\n "
50
+ }
51
+ },
52
+ {
53
+ " type " : " divider"
54
+ },
55
+ {
56
+ " type " : " section" ,
57
+ " text " : {
58
+ " type " : " mrkdwn" ,
59
+ " text " : " *Task*: <https://firefox-ci-tc.services.mozilla.com/tasks/${status.taskId}|Taskcluster>"
60
+ }
61
+ },
62
+ {
63
+ " type " : " section" ,
64
+ " text " : {
65
+ " type " : " mrkdwn" ,
66
+ " text " : " *Owner*: ${task.metadata.owner}"
67
+ }
68
+ },
69
+ {
70
+ " type " : " section" ,
71
+ " text " : {
72
+ " type " : " mrkdwn" ,
73
+ " text " : " *Commit*: <${task.metadata.source}>"
74
+ }
75
+ },
76
+ {
77
+ " type " : " section" ,
78
+ " text " : {
79
+ " type " : " mrkdwn" ,
80
+ " text " : " *Test Summary*: <https://firefoxci.taskcluster-artifacts.net/${status.taskId}/0/public/results/report.html?sort=result> :debug:"
81
+ }
82
+ },
83
+ {
84
+ " type " : " divider"
85
+ },
86
+ {
87
+ " type " : " context" ,
88
+ " elements " : [
89
+ {
90
+ " type " : " mrkdwn" ,
91
+ " text " : " :testops-notify: created by Desktop QA Test Engineering"
92
+ }
93
+ ]
94
+ }
95
+ ]
94
96
text : " {task[name]} with id $taskId has finished!"
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def test_url():
14
14
15
15
16
16
@pytest .mark .incident
17
- @pytest .mark .pynput
17
+ @pytest .mark .headed
18
18
def test_pdf_form_fill (driver , test_url ):
19
19
try :
20
20
from pynput .keyboard import Controller , Key
Original file line number Diff line number Diff line change 1
1
import platform
2
+ import sys
3
+ from os import environ
2
4
from time import sleep
3
5
4
6
import pytest
8
10
from modules .page_object import ExamplePage
9
11
from modules .util import BrowserActions , Utilities
10
12
13
+ WIN_GHA = environ .get ("GITHUB_ACTIONS" ) == "true" and sys .platform .startswith ("win" )
11
14
12
- @pytest .mark .unstable
15
+
16
+ @pytest .mark .skipif (WIN_GHA , reason = "Test unstable in Windows Github Actions" )
17
+ @pytest .mark .headed
13
18
def test_save_page_as (driver : Firefox ):
14
19
"""
15
20
C2637623.1: save page as
You can’t perform that action at this time.
0 commit comments