Switch branches/tags
Nothing to show
Find file History
Pull request Compare This branch is 1 commit ahead, 961 commits behind splunk:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
custom_search
.coveragerc
README.md
results.xml
results200.xml
results404.xml
runtests.py
services.server.info.xml
services.xml
splunk.baseline
splunk.binding.baseline
splunk.client.baseline
splunk.data.baseline
splunk.results.baseline
test_binding.py
test_client.py
test_data.py
test_examples.py
testfile.txt

README.md

Splunk Test "Framework"

The truth is that there really isn't a Splunk Test Framework. It simply uses Python's builtin unittest module.

Each distinct area of the SDK is tested in a single file. For example, splunk.client is tested in test_client.py, while the examples are tested in test_examples.py.

There are no dependencies to run the tests. You can simply execute:

cd tests
python runtests.py

or:

cd tests
./runtests.py

Code Coverage

We have support for using the excellent coverage.py, which needs to be installed on your system. You can get more information about the module at the author's website: http://nedbatchelder.com/code/coverage/

To install it, simply use easy_install or pip:

easy_install coverage

or

pip install coverage

Once you have coverage.py installed, you can run get coverage information as follows:

cd tests
coverage run runtests.py
coverage combine
coverage report

Should you want to get an HTML report:

coverage html

and open coverage_html_report/index.html in your favorite browser.