Skip to content

Commit a46a469

Browse files
author
Krum Motsov
committed
Merge branch 'master' of github.com:testspace-samples/python.unittest
2 parents 9795eed + 5d727b6 commit a46a469

File tree

3 files changed

+45
-26
lines changed

3 files changed

+45
-26
lines changed

.testspace.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<suite name="Tests" state="1" id=".sh" description="run **all** of the unit tests">
1010
<attributes>
1111
<![CDATA[nose2 -X -C --coverage-report xml
12-
echo "$PWD/nose2.xml{test}" > ${self.result}]]>
12+
echo "$PWD/nose2.xml" > ${self.result}]]>
1313
</attributes>
1414
</suite>
1515
<suite name="Coverage" state="1" id=".sh" description="Code coverage based on latest run. Review the ==Reports== tab for historical tracking">
@@ -18,4 +18,4 @@ echo "$PWD/nose2.xml{test}" > ${self.result}]]>
1818
</attributes>
1919
</suite>
2020
</root>
21-
</schema>
21+
</schema>

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[![Testspace](http://www.testspace.com/public/img/testspace_logo.png)](http://www.testspace.com)
2+
***
3+
4+
## Python/Unittest sample for demonstrating Testspace based on the [test_driven_python repo](https://github.com/siddhi/test_driven_python)
5+
6+
Sample demonstrates techniques for using Testspace with Python code and the [`unittest` test framework](https://docs.python.org/2/library/unittest.html) together with [`cov-core` code coverage tool](https://pypi.python.org/pypi/cov-core) and [`nose2` runner](https://github.com/nose-devs/nose2).
7+
8+
[![Build Status](https://travis-ci.org/testspace-samples/python.unittest.svg?branch=master)](https://travis-ci.org/testspace-samples/python.unittest)
9+
[![Space Health](https://samples.testspace.com/projects/91/spaces/310/badge)](https://samples.testspace.com/projects/91/spaces/310 "Test Cases")
10+
[![Space Metric](https://samples.testspace.com/projects/91/spaces/310/metrics/209/badge)](https://samples.testspace.com/projects/91/spaces/310/metrics#metric-209 "Line/Statement Coverage")
11+
12+
***
13+
14+
In order to run this sample you will need a host workstation with installed python 2.6+.
15+
16+
<pre>
17+
sudo pip install -r requirements.txt
18+
nose2 --junit-xml --with-coverage --coverage-report xml
19+
</pre>
20+
21+
Installing and configuring testspace runner:
22+
23+
<pre>
24+
./testspace_install.sh
25+
export PATH="${HOME}/testspace:${PATH}"
26+
testspace config url "token:@my-org-name.testspace.com/my-project"
27+
</pre>
28+
29+
Publishing results example:
30+
31+
<pre>
32+
testspace publish [Tests]nose2.xml coverage.xml "my-reports-only-space"
33+
</pre>
34+
35+
Checkout the [Space](https://samples.testspace.com/projects/python/spaces/unittest).
36+
37+
***
38+
39+
To fork this example using Travis requires:
40+
- Create an account at www.testspace.com
41+
- Travis Environment Variables:
42+
- `TESTSPACE_USER_TOKEN` set to the `value` defined as your [Access token](http://help.testspace.com/using-your-organization:user-settings).
43+
- `TESTSPACE_URL` set to `my-org-name.testspace.com/my-project/my-space`. Refer [here](http://help.testspace.com/reference:runner-reference#config) for more details. This example uses `samples.testspace.com/javascript/jasmine`.

README.rst

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

0 commit comments

Comments
 (0)