Skip to content

Commit 9a60f17

Browse files
lainetsmarkkuriekkinen
authored andcommitted
Replace nosetests with unittest
I don't think we need the XML output, so unittest should suffice. Removes XML output from selenium tests. Closes #1030.
1 parent 4003ae0 commit 9a60f17

3 files changed

Lines changed: 7 additions & 15 deletions

File tree

doc/jenkins/README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
2-
A+ is using a continuous integration server running Jenkins.
3-
The Jenkins is currently running at http://plustest.cs.hut.fi
4-
5-
* The Jenkins UI at port 8080 is limited by firewall at Aalto University.
6-
* Test reports and test site are public to internet.
7-
* Pull requests at GitHub are automatically tested and commented by Jenkins.
8-
1+
Jenkins is not currently used but the instructions and configurations are left here in case it will be used in the future. Note that the configurations want a `selenium_test_report.xml` file from the selenium tests but it is not produced anymore.
92

103
Jenkins setup
114
=============

requirements_testing.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ coverage
33
# Required to run browser tests:
44
selenium
55
pyvirtualdisplay
6-
nose
76
django-debug-toolbar >= 3.2.2, < 4
87
prospector

selenium_test/run_servers_and_tests.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
cd `dirname "$0"`/test
44

5-
TEST=nosetests
5+
TEST="python3 -m unittest"
66
XVFB=`which xvfb-run`
77

88
if [ -z "$WORKSPACE" ]; then
99
WORKSPACE=.
1010
fi
1111

12-
if [ -n "$VENV_HOME" ]; then
13-
TEST="$VENV_HOME/nosetests --verbosity=3 --with-xunit --xunit-file=$WORKSPACE/selenium_test_report.xml"
14-
fi
12+
echo "Starting servers..."
1513

1614
trap '../kill_servers.sh' EXIT
1715
../run_servers.sh
1816

17+
echo "Running tests..."
18+
1919
if [ -x "$XVFB" ]; then
20-
$XVFB $TEST *_test.py
20+
$XVFB $TEST discover -p "*_test.py"
2121
else
22-
$TEST *_test.py
22+
$TEST discover -p "*_test.py"
2323
fi

0 commit comments

Comments
 (0)