Remove unused integration-test code (Fixes #8922)

This commit is contained in:
Alex Gibson 2020-07-14 13:47:13 +01:00 коммит произвёл Paul McLanahan
Родитель 854e142939
Коммит b2beca1cee
5 изменённых файлов: 26 добавлений и 141 удалений

Просмотреть файл

@ -1,16 +0,0 @@
#!/bin/bash -x
BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $BIN_DIR/set_git_env_vars.sh
docker stop bedrock-code-${BRANCH_AND_COMMIT}
for NODE_NUMBER in `seq ${NUMBER_OF_NODES:-5}`;
do
docker stop bedrock-selenium-node-${NODE_NUMBER}-${BRANCH_AND_COMMIT}
done;
docker stop bedrock-selenium-hub-${BRANCH_AND_COMMIT}
# always report success
exit 0

Просмотреть файл

@ -1,85 +0,0 @@
#!/bin/bash -xe
# $1 should be the properties name for this run
# defaults
DRIVER=SauceLabs
MARK_EXPRESSION="not headless and not download"
case $1 in
chrome)
BROWSER_NAME=chrome
BROWSER_VERSION=latest
PLATFORM="Windows 10"
;;
firefox)
BROWSER_NAME=firefox
BROWSER_VERSION=latest
PLATFORM="Windows 10"
;;
ie)
BROWSER_NAME="internet explorer"
PLATFORM="Windows 10"
;;
ie9)
BROWSER_NAME="internet explorer"
BROWSER_VERSION="9.0"
PLATFORM="Windows 7"
MARK_EXPRESSION=sanity
;;
download)
DRIVER=
MARK_EXPRESSION=download
;;
headless)
DRIVER=
MARK_EXPRESSION=headless
;;
*)
set +x
echo "Missing or invalid required argument"
echo
echo "Usage: run_integration_tests.sh <chrome|firefox|ie{,6,7}|headless>"
exit 1
;;
esac
BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $BIN_DIR/set_git_env_vars.sh
if [ -z "${BASE_URL}" ]; then
# start bedrock
docker run -d --rm \
--name bedrock-code-${BRANCH_AND_COMMIT} \
--env-file docker/envfiles/prod.env \
${DEPLOYMENT_DOCKER_IMAGE} bin/run-prod.sh
DOCKER_LINKS=(--link bedrock-code-${BRANCH_AND_COMMIT}:bedrock)
BASE_URL="http://bedrock:8000"
fi
# make sure results dir exists or docker will create it
# and it will be owned by root
RESULTS_DIR="$PWD/results"
DOCKER_RESULTS_DIR="/app/results"
rm -rf "$RESULTS_DIR"
mkdir -p "$RESULTS_DIR"
docker run --rm -v "${RESULTS_DIR}:${DOCKER_RESULTS_DIR}" -u $(stat -c "%u:%g" "$RESULTS_DIR") \
${DOCKER_LINKS[@]} \
-e "BASE_URL=${BASE_URL}" \
-e "DRIVER=${DRIVER}" \
-e "SAUCELABS_USERNAME=${SAUCELABS_USERNAME}" \
-e "SAUCELABS_API_KEY=${SAUCELABS_API_KEY}" \
-e "BROWSER_NAME=${BROWSER_NAME}" \
-e "BROWSER_VERSION=${BROWSER_VERSION}" \
-e "PLATFORM=${PLATFORM}" \
-e "SELENIUM_HOST=${SELENIUM_HOST}" \
-e "SELENIUM_PORT=${SELENIUM_PORT}" \
-e "SELENIUM_VERSION=${SELENIUM_VERSION}" \
-e "BUILD_TAG=${BUILD_TAG}" \
-e "SCREEN_RESOLUTION=${SCREEN_RESOLUTION}" \
-e "MARK_EXPRESSION=${MARK_EXPRESSION}" \
-e "TESTS_PATH=${TESTS_PATH}" \
-e "RESULTS_PATH=${DOCKER_RESULTS_DIR}" \
-e "PYTEST_PROCESSES=5" \
-e "PRIVACY=public restricted" \
mozmeao/bedrock_test:${GIT_COMMIT} bin/run-integration-tests.sh

Просмотреть файл

@ -1,4 +0,0 @@
#!/bin/bash -xe
GIT_COMMIT=${GIT_COMMIT:-$(git rev-parse HEAD)}
docker build -t bedrock_linkchecker:${GIT_COMMIT} --pull=true -f docker/dockerfiles/bedrock_linkchecker .
docker run --rm -v `pwd`/results:/results -e URLS="${URLS}" -e THREADS=${THREADS} -e RECURSION_LEVEL=${RECURSION_LEVEL} -e CHECK_EXTERNAL=${CHECK_EXTERNAL} -e VERBOSE=${VERBOSE} bedrock_linkchecker:${GIT_COMMIT}

Просмотреть файл

@ -110,38 +110,36 @@ Adding test runs
~~~~~~~~~~~~~~~~
Test runs can be added by creating a new job in the `.gitlab-ci.yml file in the www-config repository`_
with the desired variables
For example, if you wanted to run tests in Firefox on both Windows 10 and
with the desired variables. For example, if you wanted to run tests in Firefox on both Windows 10 and
OS X, against our dev environment, you could create the following clauses:
.. code-block:: yaml
dev-test-firefox-osx:
extends:
- .dev
- .test
variables:
BROWSER_NAME: firefox
BROWSER_VERSION: latest
PLATFORM: OS X 10.11
dev-test-firefox-osx:
extends:
- .dev
- .test
variables:
BROWSER_NAME: firefox
BROWSER_VERSION: latest
PLATFORM: OS X 10.11
dev-test-firefox-win10:
extends:
- .dev
- .test
variables:
BROWSER_NAME: firefox
BROWSER_VERSION: latest
PLATFORM: Windows 10
dev-test-firefox-win10:
extends:
- .dev
- .test
variables:
BROWSER_NAME: firefox
BROWSER_VERSION: latest
PLATFORM: Windows 10
You can use `Sauce Labs platform configurator`_ to help with the parameter values.
If you have commit rights to our Github repo (mozilla/bedrock) you can simply push
your branch to the branch named ``run-integration-tests``, and the ``bedrock-integration-tests``
app will be deployed and all of the integration tests defined in the ``jenkins.yml``
file for that branch will be run. Please announce in our IRC channel (#www on irc.mozilla.org)
that you'll be doing this so that we don't get conflicts.
your branch to the branch named ``run-integration-tests``, and the ``bedrock-test.moz.works``
app will be deployed and the full suite of integration tests for that branch will be run.
Please announce in our Slack channel (#www on mozilla.slack.com) that you'll be doing this so
that we don't get conflicts.
.. _Deployment Pipeline: https://ci.vpn1.moz.works/blue/organizations/jenkins/bedrock_multibranch_pipeline/branches/
.. _CircleCI: https://circleci.com/

Просмотреть файл

@ -279,18 +279,12 @@ Using the above email addresses enables newsletter form testing without actually
the Basket instance, which reduces automated newsletter spam and improves test
reliability due to any potential network flakiness.
Link Checks
-----------
Headless tests
--------------
A full link checker is run over the production environments, which uses a tool named
`LinkChecker`_ to crawl the entire website and reports any broken or malformed links both
internally and externally. These jobs are run once a day in the `Jenkins instance`_ and
are named with the ``bedrock_linkchecker_`` prefix.
In addition, there are targeted functional tests for the `download`_ and `localized
download`_ pages. These tests do not use the LinkChecker tool, and are run as part of
the pipeline, which ensures that any broken download links are noticed much earlier,
and also do not depend on a crawler to find them.
There are targeted headless tests for the `download`_ and `localized download`_ pages.
These tests and are run as part of the pipeline to ensure that download links constructed
via product details are well formed and return valid 200 responses.
.. _Jasmine: https://jasmine.github.io/1.3/introduction.html
.. _Karma: https://karma-runner.github.io/
@ -306,8 +300,6 @@ and also do not depend on a crawler to find them.
.. _waits: http://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.wait.html
.. _expected conditions: http://seleniumhq.github.io/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html
.. _Web QA style guide: https://wiki.mozilla.org/QA/Execution/Web_Testing/Docs/Automation/StyleGuide
.. _LinkChecker: http://wummel.github.io/linkchecker/
.. _Jenkins instance: https://ci.vpn1.moz.works/
.. _download: https://github.com/mozilla/bedrock/blob/master/tests/functional/test_download.py
.. _localized download: https://github.com/mozilla/bedrock/blob/master/tests/functional/test_download_l10n.py
.. _Basket: https://github.com/mozilla/basket