r4 - 13 Jul 2007 - 11:01:09 - MimiYinYou are here: OSAF >  Projects Web  >  QualityAssuranceTeam > BroadswordJSONTest

Broadsword -- JSONTest Documentation

Where is JSONTest

JSONest lives in the tools repository under the broadsword project.

svn co svn+ssh://svn.osafoundation.org/svn/tools/broadsword/trunk/modules/JSONTest.py JSONTest.py

What is JSONest

JSONTest is a class providing JSON-RPC specific functionality for our tests.

JSONst inherits from HTTPTest for all it's test framework needs.

What is defined in JSONTest

Currently there are 3 methods provided in this class.

parseJSON method: Optional string argument, defaults to self.test_response.read(). Returns a python dictionary of the string argument if supplied, else it returns a dictionary of the last request response.

convertToJson method: Takes a python dictionary argument, returns the string representation.

getJsonAttrib method: This method takes a string argument, and returns a string corresponding to string argument passed from the last request response. For example in Scooby testing we need to know the result because it is the JSID used to keep the session going, so we call: JSID = getJsonAttrib('result').

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.