Skip to content
Brad Erickson edited this page Feb 3, 2015 · 2 revisions

Unit tests

We have unit tests, but no where near full coverage at this point, so we need to do additional testing.

To run unit tests:

./scripts/tests.sh

To run individual unit test (for example):

./tests.sh tests.roundwared.test_recording_collection.TestRecordingCollection

Stream testing script

We have a script that starts up a stream and then moves the listener in and out of range of the default asset at lat/lon 1/1. To run this test:

./scripts/stream-test.sh

You can add additional ambient test assets to project #1 using this script:

./scripts/add-test-audio.py

Manual testing - API v1

These are urls that can be used for manual testing, typically in this order to approximate an actual client.

get config:

http://localhost:8888/api/1/?operation=get_config&project_id=1

then get tags:

http://localhost:8888/api/1/?operation=get_tags&project_id=1

These will both return a nice JSON object with a bunch of data. You can look at the RW API docs for more info on the expected responses: http://roundware.org/docs/api/index.html then request a stream:

http://localhost:8888/api/1/?operation=request_stream&session_id=1

this will return a stream mountpoint url that you can play in your browser.
Modify it with tag filters:

http://localhost:8888/api/1/?operation=modify_stream&session_id=1&tags=3,4,5,8,9,22

and move the listener:

http://localhost:8888/api/1/?operation=move_listener&session_id=1&latitude=1&longitude=1

you should then hear ambient sounds (if you've added the test audio) filtering into the ambient music. The default database only contains one audio asset.

If all of this works, things are looking good, but obviously this is only the most basic core functionality. You can look at the RW logs at /var/log/roundware for more info on what's going on especially if something goes wrong.