Changes

Jump to: navigation, search

Services/Sync/Getting Started

1,245 bytes added, 16:26, 31 May 2012
m
document Python functional tests
[https://developer.mozilla.org/en/Writing_xpcshell-based_unit_tests Writing xpcshell-based unit testing].
 
==Python Functional Tests==
 
In the services/ tree are a handful of HTTP servers implemented in JS. These are effectively lightweight clones of the services described by the specs at http://docs.services.mozilla.com/.
 
The main implementations of these services are in Python. And, there exist a Python test suite that you can point at any HTTP endpoint and they will validate the functional behavior of the server. We use these Python functional tests to validate that the in-tree JS server implementations are functionally proper.
 
To run these functional tests, you'll need a built Firefox source tree and will need to obtain the Python server code, which contains the tests.
 
===Running JS Servers===
 
There is Makefile magic in services/common/Makefile that can launch a standalone JS server instance. From your object directory:
 
make -C services/common storage-server
make -C services/common aitc-server
 
===Running Python Functional Tests===
 
You'll need to obtain the server source code, configure it, then launch the tests. For example:
 
git clone git://github.com/mozilla-services/server-syncstorage.git
cd server-syncstorage
make
source bin/activate
python syncstorage/tests/functional/test_storage.py http://localhost:8080/
= Collaboration =
Canmove, confirm
409
edits

Navigation menu