Commit 884745d0 by Mushtaq Ali Committed by Mushtaq Ali

For running single acceptance test, add an optional argument that will enable us…

For running single acceptance test, add an optional argument that will enable us to supply an argument if we want to just run one single test

Examples:
>  make test-acceptance tests.py:FullWorkflowOverrideTest.test_staff_override_at_end
Runs test_staff_override_at_end test of FullWorkflowOverrideTest class

>  make test-acceptance tests.py:FullWorkflowOverrideTest
Runs tests for FullWorkflowOverrideTest class

>  make test-acceptance tests.py
Runs all tests in tests.py

> make test-acceptance
This would work as it was previously i.e run all the acceptance tests
parent b8307ca9
......@@ -72,7 +72,7 @@ test-js-debug: render-templates
test-sandbox: test-acceptance test-a11y
test-acceptance:
./scripts/test-acceptance.sh tests
./scripts/test-acceptance.sh
test-a11y:
./scripts/test-acceptance.sh accessibility
......@@ -12,7 +12,7 @@
#
# Usage:
#
# ./test-acceptance.sh {test_file}
# ./test-acceptance.sh {test}
#
############################################################
......@@ -33,6 +33,10 @@ cd test/logs
test_name="${1:-acceptance}"
if [[ -z ${test} ]]; then
export test="tests.py"
fi
# The machines that these tests run on in jenkins have an old
# version of npm which doesn't seem to work with the
......@@ -53,4 +57,4 @@ if [[ "${test_name}" = "accessibility" ]]; then
fi
echo "Running acceptance tests from ${test_name}.py against the sandbox..."
nosetests ../acceptance/${test_name}.py --with-xunit --xunit-file=../acceptance/xunit-${test_name}.xml
nosetests ../acceptance/${test} --with-xunit --xunit-file=../acceptance/xunit-${test_name}.xml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment