Skip to content

Commit 343c83e

Browse files
committed
WT-1273 remove Selenium tests
1 parent 5d5eb79 commit 343c83e

22 files changed

Lines changed: 10 additions & 714 deletions

.github/workflows/cdn_tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,10 @@ jobs:
5454
MARK_EXPRESSION: "cdnssl"
5555
env:
5656
BASE_URL: ${{ github.event.inputs.mozorg_service_hostname || 'https://www.mozilla.org' }} # Mozorg base URL
57-
BROWSER_NAME: ""
5857
CI_JOB_ID: ${{ github.run_id }}
59-
DRIVER: ""
6058
LABEL: ${{ matrix.LABEL }}
6159
MARK_EXPRESSION: ${{ matrix.MARK_EXPRESSION }}
6260
PYTEST_PROCESSES: 1
63-
SAUCELABS_API_KEY: ""
64-
SAUCELABS_USERNAME: ""
6561
RERUNS_ALLOWED: 3
6662
RERUNS_DELAY_SECS: 60
6763

.github/workflows/download_tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,10 @@ jobs:
3636
needs: notify-of-test-run-start
3737
env:
3838
BASE_URL: ${{ github.event.inputs.mozorg_service_hostname || 'https://www.mozilla.org' }} # Mozorg base URL
39-
BROWSER_NAME: ""
4039
CI_JOB_ID: ${{ github.run_id }}
41-
DRIVER: ""
4240
LABEL: test-downloads
4341
MARK_EXPRESSION: download
4442
PYTEST_PROCESSES: auto
45-
SAUCELABS_API_KEY: ""
46-
SAUCELABS_USERNAME: ""
4743

4844
# Note we use if: always() below to keep things going, rather than
4945
# continue-on-error, because that approach falsely marks the overall

.github/workflows/integration_tests.yml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,30 +43,11 @@ jobs:
4343
integration-tests:
4444
if: github.repository == 'mozilla/bedrock'
4545
runs-on: ubuntu-latest
46-
strategy:
47-
matrix:
48-
include:
49-
- LABEL: test-ie-saucelabs
50-
BROWSER_NAME: internet explorer
51-
DRIVER: SauceLabs
52-
MARK_EXPRESSION: smoke
53-
PLATFORM: Windows 10
54-
PYTEST_PROCESSES: 8
55-
- LABEL: test-headless
56-
DRIVER: ""
57-
MARK_EXPRESSION: headless
58-
5946
env:
6047
BASE_URL: ${{ github.event.inputs.mozorg_service_hostname }}
61-
BROWSER_NAME: ${{ matrix.BROWSER_NAME }}
6248
CI_JOB_ID: ${{ github.run_id }}
63-
DRIVER: ${{ matrix.DRIVER }}
64-
LABEL: ${{ matrix.LABEL }}
65-
MARK_EXPRESSION: ${{ matrix.MARK_EXPRESSION }}
66-
PLATFORM: ${{ matrix.PLATFORM }}
67-
PYTEST_PROCESSES: ${{ matrix.PYTEST_PROCESSES }}
68-
SAUCELABS_API_KEY: ${{ secrets.SAUCELABS_API_KEY }}
69-
SAUCELABS_USERNAME: ${{ secrets.SAUCELABS_USERNAME }}
49+
LABEL: test-headless
50+
MARK_EXPRESSION: headless
7051

7152
# Note we use if: always() below to keep things going, rather than
7253
# continue-on-error, because that approach falsely marks the overall
@@ -96,7 +77,7 @@ jobs:
9677
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
9778
with:
9879
name: test-results
99-
path: results-${{github.run_id}}-${{matrix.label}}
80+
path: results-${{github.run_id}}
10081
if-no-files-found: ignore # this avoids a false "Warning" if there were no issues
10182

10283
playwright-tests:

bin/integration_tests/cleanup_after_functional_tests.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,3 @@ docker cp "bedrock-${CI_JOB_ID}:/app/tests/results" "results-${CI_JOB_ID}"
1616

1717
# Now that we copied artifact, remove container.
1818
docker rm "bedrock-${CI_JOB_ID}"
19-
20-
if [ "${DRIVER}" = "Remote" ]; then
21-
docker compose \
22-
-f ./bin/integration_tests/docker_compose_for_integration_tests.yml \
23-
-p "selenium-hub-${CI_JOB_ID}" \
24-
down --remove-orphans
25-
fi

bin/integration_tests/docker_compose_for_integration_tests.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

bin/integration_tests/functional_tests.sh

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -5,66 +5,20 @@
55

66
set -euo pipefail
77

8-
# reduce parallelism to try to make test runners more efficient
9-
#NUM_CPUS=$(grep -c ^processor /proc/cpuinfo)
10-
NUM_CPUS=1
11-
# Number of CPUs + 1 to have a hot spare.
12-
NUM_BROWSER_NODES=$(( NUM_CPUS + 1 ))
13-
148
if [ -z "${BASE_URL:-}" ];
159
then
1610
echo "No BASE_URL set, exiting"
1711
exit 0;
1812
fi
1913

20-
if [ "${DRIVER}" = "Remote" ]; then
21-
docker compose \
22-
-f ./bin/integration_tests/docker_compose_for_integration_tests.yml \
23-
-p "selenium-hub-${CI_JOB_ID}" \
24-
up -d selenium-hub
25-
26-
docker compose \
27-
-f ./bin/integration_tests/docker_compose_for_integration_tests.yml \
28-
-p "selenium-hub-${CI_JOB_ID}" \
29-
up -d --scale ${BROWSER_NAME}=${NUM_BROWSER_NODES} ${BROWSER_NAME}
30-
31-
SELENIUM_HOST="grid"
32-
SELENIUM_PORT=4444
33-
DOCKER_LINKS=(--link selenium-hub-${CI_JOB_ID}-selenium-hub-1:grid --net selenium-hub-${CI_JOB_ID}_default)
34-
35-
36-
echo -n "Waiting for Selenium Grid to get ready..."
37-
IP=$(docker inspect selenium-hub-${CI_JOB_ID}-selenium-hub-1 | jq -r .[0].NetworkSettings.Networks[].IPAddress)
38-
set +e
39-
SELENIUM_READY=$((curl -fs http://${IP}:4444/wd/hub/status | jq -es 'if . == [] then null else .[] | .value.ready end' > /dev/null) || echo "false")
40-
while ! ${SELENIUM_READY}; do
41-
echo -n "."
42-
SELENIUM_READY=$((curl -fs http://${IP}:4444/wd/hub/status | jq -es 'if . == [] then null else .[] | .value.ready end' > /dev/null) || echo "false")
43-
sleep 1s;
44-
done
45-
set -e
46-
echo " done"
47-
fi
48-
4914
docker pull ${TEST_IMAGE}
5015

5116
docker run \
5217
--name "bedrock-${CI_JOB_ID}" \
53-
${DOCKER_LINKS[@]} \
54-
-e "DRIVER=${DRIVER}" \
55-
-e "SAUCELABS_USERNAME=${SAUCELABS_USERNAME}" \
56-
-e "SAUCELABS_API_KEY=${SAUCELABS_API_KEY}" \
57-
-e "SELENIUM_HOST=${SELENIUM_HOST:-}" \
58-
-e "SELENIUM_PORT=${SELENIUM_PORT:-}" \
59-
-e "BROWSER_NAME=${BROWSER_NAME:-}" \
60-
-e "BROWSER_VERSION=${BROWSER_VERSION:-}" \
61-
-e "PLATFORM=${PLATFORM:-}" \
6218
-e "MARK_EXPRESSION=${MARK_EXPRESSION:-}" \
6319
-e "BASE_URL=${BASE_URL:-}" \
6420
-e "PYTEST_PROCESSES=${PYTEST_PROCESSES:=4}" \
6521
-e "BOUNCER_URL=${BOUNCER_URL:=https://download.mozilla.org/}" \
66-
-e "SCREEN_WIDTH=1600" \
67-
-e "SCREEN_HEIGHT=1200" \
6822
-e "RERUNS_ALLOWED=${RERUNS_ALLOWED:=2}" \
6923
-e "RERUNS_DELAY_SECS=${RERUNS_DELAY_SECS:=1}" \
7024
${TEST_IMAGE} bin/integration_tests/run_integration_tests.sh

bin/integration_tests/run_integration_tests.sh

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,12 @@ set -xe
99
: ${PYTEST_PROCESSES:="1"}
1010
: ${BASE_URL:="https://www-dev.allizom.org"}
1111
: ${BOUNCER_URL:="https://download.mozilla.org/"}
12-
: ${SELENIUM_HOST:="localhost"}
13-
: ${SELENIUM_PORT:="4444"}
14-
: ${BROWSER_NAME:="firefox"}
1512
: ${TESTS_PATH:="tests"}
1613
: ${RESULTS_PATH:="${TESTS_PATH}/results"}
1714
: ${RERUNS_ALLOWED:="2"}
1815
: ${RERUNS_DELAY_SECS:="1"}
1916

20-
# Common arguments
21-
if [ "${DRIVER}" = "SauceLabs" ]; then
22-
# Temporarily exclude logs for Saucelabs jobs https://github.com/pytest-dev/pytest-selenium/issues/288
23-
CMD="SAUCELABS_W3C=true SELENIUM_EXCLUDE_DEBUG=logs pytest"
24-
else
25-
CMD="pytest"
26-
fi
27-
17+
CMD="pytest"
2818
CMD="${CMD} -r a"
2919
CMD="${CMD} --verbose"
3020
CMD="${CMD} --workers ${PYTEST_PROCESSES}"
@@ -33,27 +23,6 @@ CMD="${CMD} --reruns ${RERUNS_ALLOWED}"
3323
CMD="${CMD} --reruns-delay ${RERUNS_DELAY_SECS}"
3424
CMD="${CMD} --html ${RESULTS_PATH}/index.html"
3525
CMD="${CMD} --junitxml ${RESULTS_PATH}/junit.xml"
36-
if [ -n "${DRIVER}" ]; then CMD="${CMD} --driver ${DRIVER}"; fi
37-
38-
# Remote arguments
39-
if [ "${DRIVER}" = "Remote" ]; then
40-
CMD="${CMD} --selenium-host ${SELENIUM_HOST}"
41-
CMD="${CMD} --selenium-port ${SELENIUM_PORT}"
42-
CMD="${CMD} --capability browserName \"${BROWSER_NAME}\""
43-
if [ -n "${BROWSER_VERSION}" ]; then CMD="${CMD} --capability browserVersion \"${BROWSER_VERSION}\""; fi
44-
if [ -n "${PLATFORM}" ]; then CMD="${CMD} --capability platformName \"${PLATFORM}\""; fi
45-
fi
46-
47-
# Sauce Labs arguments
48-
if [ "${DRIVER}" = "SauceLabs" ]; then
49-
CMD="${CMD} --capability browserName \"${BROWSER_NAME}\""
50-
if [ -n "${BROWSER_VERSION}" ]; then CMD="${CMD} --capability browserVersion \"${BROWSER_VERSION}\""; fi
51-
if [ -n "${PLATFORM}" ]; then CMD="${CMD} --capability platformName \"${PLATFORM}\""; fi
52-
if [ -n "${SELENIUM_VERSION}" ]; then CMD="${CMD} --capability selenium-version \"${SELENIUM_VERSION}\""; fi
53-
if [ -n "${BUILD_TAG}" ]; then CMD="${CMD} --capability build \"${BUILD_TAG}\""; fi
54-
if [ -n "${SCREEN_RESOLUTION}" ]; then CMD="${CMD} --capability screenResolution \"${SCREEN_RESOLUTION}\""; fi
55-
if [ -n "${PRIVACY}" ]; then CMD="${CMD} --capability public \"${PRIVACY}\""; fi
56-
fi
5726

5827
if [ -n "${MARK_EXPRESSION}" ]; then CMD="${CMD} -m \"${MARK_EXPRESSION}\""; fi
5928

bin/run-integration-tests.sh

Lines changed: 0 additions & 58 deletions
This file was deleted.

requirements/dev.in

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,17 @@ factory-boy==3.3.3
66
freezegun==1.5.5
77
markdown-it-py>=4.2.0
88
py==1.11.0
9-
PyPOM==2.2.4
109
pyquery==2.0.1
11-
pytest==9.0.3 # Included because we use it directly, but also a subdep of pytest-selenium's subdeps
10+
pytest==9.0.3
11+
pytest-base-url==2.1.0 # Provides the --base-url option and base_url fixture used by our HTTP integration tests
1212
pytest-cov==7.1.0
1313
pytest-datadir==1.8.0
1414
pytest-django==4.12.0
1515
pytest-mock==3.15.1
1616
pytest-parallel==0.1.1
1717
pytest-rerunfailures==16.1
18-
pytest-selenium==4.1.0
1918
responses==0.26.0
2019
ruff==0.15.12
21-
selenium==4.43.0
2220
translate-toolkit==3.19.8
2321
uv==0.11.15
2422
wagtail-factories==4.4.0

0 commit comments

Comments
 (0)