Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-ora2
Commits
7e2a9b39
Commit
7e2a9b39
authored
Oct 28, 2015
by
Andy Armstrong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add make commands for running acceptance tests
parent
3d7c7c31
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
12 deletions
+55
-12
Makefile
+6
-0
scripts/jenkins-acceptance-tests.sh
+10
-5
scripts/test-acceptance.sh
+34
-0
test/acceptance/README.rst
+5
-7
No files found.
Makefile
View file @
7e2a9b39
...
@@ -64,3 +64,9 @@ test-js: render-templates
...
@@ -64,3 +64,9 @@ test-js: render-templates
test-js-debug
:
render-templates
test-js-debug
:
render-templates
./scripts/js-debugger.sh
./scripts/js-debugger.sh
test-acceptance
:
./scripts/test-acceptance.sh tests
test-a11y
:
./scripts/test-acceptance.sh accessibility
scripts/jenkins-acceptance-tests.sh
View file @
7e2a9b39
...
@@ -35,12 +35,17 @@ virtualenv venv
...
@@ -35,12 +35,17 @@ virtualenv venv
source
venv/bin/activate
source
venv/bin/activate
pip install
-r
requirements/test-acceptance.txt
pip install
-r
requirements/test-acceptance.txt
cd test
/acceptance
python tests.py
######### Run acceptance tests #########
make test-acceptance
######### Run accessibility tests #########
# Unset SELENIUM_HOST so that bok-choy doesn't try to use saucelabs
# Unset SELENIUM_HOST so that bok-choy doesn't try to use saucelabs
unset
SELENIUM_HOST
unset
SELENIUM_HOST
# AutoAuthPage times out in PhantomJS when using https, switch to use http
# AutoAuthPage times out in PhantomJS when using https, so switch to use http
export
BASE_URL
=
"http://
${
BASIC_AUTH_USER
}
:
${
BASIC_AUTH_PASSWORD
}
@
${
TEST_HOST
}
"
export
BASE_URL
=
"http://
${
BASIC_AUTH_USER
}
:
${
BASIC_AUTH_PASSWORD
}
@
${
TEST_HOST
}
"
export
SELENIUM_BROWSER
=
phantomjs
python accessibility.p
y
make test-a11
y
scripts/test-acceptance.sh
0 → 100755
View file @
7e2a9b39
#!/usr/bin/env bash
############################################################
#
# test-acceptance.sh
#
# Runs acceptance tests from a specified file against
# an edX platform sandbox.
#
# Note: this script is invoked from the ORA Makefile and
# should not normally be used directly.
#
# Usage:
#
# ./test-acceptance.sh {test_file}
#
############################################################
cd
`
dirname
$BASH_SOURCE
`
&&
cd
..
if
[
-z
"
$BASE_URL
"
]
;
then
echo
"Error: BASE_URL must be set to point to your sandbox"
exit
1
fi
mkdir
-p
test
/logs
cd test
/logs
export
SELENIUM_BROWSER
=
phantomjs
test_name
=
"
${
1
:-
acceptance
}
"
echo
"Running acceptance tests from
${
test_name
}
.py against the sandbox..."
python ../acceptance/
${
test_name
}
.py
test/acceptance/README.rst
View file @
7e2a9b39
...
@@ -18,12 +18,11 @@ To use the tests:
...
@@ -18,12 +18,11 @@ To use the tests:
pip install -r requirements/test-acceptance.txt
pip install -r requirements/test-acceptance.txt
2.
Prepare for tests
2.
Specify your sandbox location
.. code:: bash
.. code:: bash
cd edx-ora2/test/acceptance
export BASE_URL=https://{USER}:{PASSWORD}@{SANDBOX}
export BASE_URL=https://{USER}:{PASSWORD}@example.com
3. Run the tests
3. Run the tests
...
@@ -31,11 +30,10 @@ To run the acceptance tests:
...
@@ -31,11 +30,10 @@ To run the acceptance tests:
.. code:: bash
.. code:: bash
python tests.py
make test-acceptance
To run the accessibility tests
, which must be run with phantomjs as the browser
:
To run the accessibility tests:
.. code:: bash
.. code:: bash
export SELENIUM_BROWSER=phantomjs
make test-a11y
python accessibility.py
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment