• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..23-Nov-2020-

interface/H23-Nov-2020-1,8871,230

interop/H23-Nov-2020-4,4813,233

model/H23-Nov-2020-2,5601,817

multipython/H23-Nov-2020-182122

protocol/H23-Nov-2020-5,5034,078

transport/H23-Nov-2020-9657

util/H23-Nov-2020-1,243961

README.rstH A D24-Sep-20194.8 KiB14097

__init__.pyH A D24-Sep-20191 KiB3210

regen_wsdl.pyH A D15-Jun-2020881 2718

sort_wsdl.pyH A D15-Jun-20202.8 KiB10557

test_null_server.pyH A D15-Jun-20204.3 KiB13587

test_service.pyH A D15-Jun-202016.4 KiB512372

test_soft_validation.pyH A D15-Jun-20206.3 KiB180119

test_sqlalchemy.pyH A D23-Nov-202039.7 KiB1,303929

test_sqlalchemy_deprecated.pyH A D15-Jun-202011.9 KiB381256

wsdl.xmlH A D24-Sep-201989.9 KiB1,8671,866

README.rst

1
2*********************
3Running Tests Locally
4*********************
5
6While the test coverage for Spyne is not too bad, we always accept new tests
7that cover new use-cases. Please consider contributing tests even if your
8use-case is working fine! Given the nature of open-source projects, Spyne may
9shift focus or change maintainers in the future. This can result in patches
10which may cause incompatibilities with your existing code base. The only way to
11detect such corner cases is to have a great test suite.
12
13Spyne's master repository is already integrated with travis-ci.org. Head over
14to http://travis-ci.org/arskom/spyne to see the test results for yourself.
15
16As the necessary configuration is already done, it's very simple to integrate
17your own fork of Spyne with travis-ci.org, which should come in handy even if
18you don't plan to be a long-time contributor to Spyne. Just sign in with your
19Github account and follow instructions.
20
21If you want to run the tests locally, first you have to install all dependencies
22(you may want to use virtualenv for that). ::
23
24    pip install -r requirements/test_requirements.txt
25
26and after all dependencies are installed you can run tests using the canonical
27test command ::
28
29    python setup.py test
30
31If you want to run only tests that are supposed to pass under Python 3, run: ::
32
33    python setup.py test_python3
34
35We use tox as well, but only for django tests. So if you just want to run
36Spyne <=> Django interop tests with all combinations of supported CPython
37and Django versions, run: ::
38
39    tox
40
41The full list of environments that tox supports can be found inside
42``setup.py``\.
43
44Spyne's generic test script does not run WS-I tests. Also see the related
45section below.
46
47If you don't want this or just want to run a specific test,
48`pytest <http://pytest.org/latest/>`_  is a nice tool that lets you do just
49that: ::
50
51    py.test -v --tb=short spyne/test/protocol/test_json.py
52
53You can run tests directly by executing them as well. This will use Python's
54builtin ``unittest`` package which is less polished, but just fine. ::
55
56    spyne/test/protocol/test_json.py
57
58Note that just running ``py.test`` or similar powerful test-juggling software
59naively in the root directory of tests won't work. Spyne runs some
60interoperability tests by starting an actual daemon listening to a particular
61port and then making (or processing) real requests, so running all tests in one
62go is problematic. The rather specialized logic in setup.py for running tests
63is the result of these quirks. Patches are welcome!
64
65SOAP Interoperability Tests
66===========================
67
68The interoperability servers require twisted.web.
69
70Python
71------
72
73Python interop tests currently use Spyne's own clients and suds (specifically
74suds-jurko fork). The suds test is the first thing we check and try not to break.
75
76Ruby
77----
78
79You need Ruby 1.8.x to run the ruby interop test against soap_http_basic.
80Unfortunately, the Ruby Soap client does not do proper handling of namespaces,
81so you'll need to turn off strict validation if you want to work with ruby
82clients.
83
84Ruby test module is very incomplete, implementing only two (echo_string and
85echo_integer) tests. We're looking for volunteers who'd like to work on
86increasing test coverage for other use cases.
87
88.Net
89----
90
91There isn't any .Net tests for Spyne. WS-I test compliance reportedly covers
92.Net use cases as well. Patches are welcome!
93
94Java
95----
96
97The WS-I test is written in Java. But unfortunately, it only focuses on Wsdl
98document and not the Soap functionality itself. We're looking for volunteers
99who'd like to work on writing Java interop tests for spyne.
100
101To run the Wsdl tests, you should first get wsi-interop-tools package from
102http://ws-i.org and unpack it next to test_wsi.py. Here are the relevant links:
103
104http://www.ws-i.org/deliverables/workinggroup.aspx?wg=testingtools
105http://www.ws-i.org/Testing/Tools/2005/06/WSI_Test_Java_Final_1.1.zip
106
107See also test_wsi.py for more info.
108
109Now run the soap_http_basic interop test server and run test_wsi.py. If all goes
110well, you should get a new wsi-report-spyne.xml file in the same directory.
111
112Here's the directory tree from a working setup:
113
114::
115
116    |-- README.rst
117    |-- (...)
118    |-- interop
119    |   |-- (...)
120    |   |-- test_wsi.py
121    |   `-- wsi-test-tools
122    |       |-- License.htm
123    |       |-- README.txt
124    |       `-- (...)
125    `-- (...)
126
127
128***************************
129Integrating with CI systems
130***************************
131
132Spyne is already integrated with Jenkins and travis-ci.org.
133
134The travis configuration file is located in the root of the source repository,
135under its standard name: .travis.yml
136
137A script for running Spyne test suite inside Jenkins can also be found in the
138project root directory, under the name run_tests.sh. It's supposed to be used
139as a multi-configuration project. See the script header for more information.
140