[AS3] Class r1.rpc.testing.RPCTestSuite

[AS3] Class r1.rpc.testing.RPCTestSuite

Client API
Packager1.rpc.testing
Classpublic class RPCTestSuite

The class for an RPC test suites. The R1-RPC/J test generator generates test cases and instantiate them into a generated test suite class. You can manually write your own test case and suite classes.

Most of the mechanisms here are to cater for the test UI. Please refer to the source code of the test UI as well as the generated test case and test suite classes for how this class is used.



Public Properties
 PropertyDefined by
  allRun : Boolean = false
RPCTestSuite
  allTestCases : Array
[read-only]
RPCTestSuite
  facade : RPCFacade
[read-only]
RPCTestSuite
  facadeClassName : String
[read-only]
RPCTestSuite
  isLoggedIn : Boolean
[read-only]
RPCTestSuite
  needLogin : Boolean = false
RPCTestSuite
  password : String = "null"
RPCTestSuite
  passwordEncrypted : Boolean = true
RPCTestSuite
  quietRun : Boolean = false
RPCTestSuite
  unblockableListener : Function
[write-only]
RPCTestSuite
  username : String = "null"
RPCTestSuite
  userObject : Object = null
RPCTestSuite
Public Methods
 MethodDefined by
  
RPCTestSuite
  
RPCTestSuite
  
cancelRunAll():void
RPCTestSuite
  
init():void
Override to do anything after the test cases are all added.
RPCTestSuite
  
initRPC(rpcUri:String):void
Call this method to initialize the RPC object in the façade.
RPCTestSuite
  
login(postLoginCB:Function, username:String, password:String):void
RPCTestSuite
  
pauseRunAll(pause:Boolean):void
RPCTestSuite
  
registerUserAndLogin(postLoginCB:Function, username:String, password:String, userObj:Object):void
RPCTestSuite
  
resetAll():void
RPCTestSuite
  
runAll(interval:int = 0):void
RPCTestSuite
  
setListener(f:Function, extra:Object = null):void
RPCTestSuite
Property detail
allRunproperty
public var allRun:Boolean = false
allTestCasesproperty 
allTestCases:Array  [read-only]Implementation
    public function get allTestCases():Array
facadeproperty 
facade:RPCFacade  [read-only]Implementation
    public function get facade():RPCFacade
facadeClassNameproperty 
facadeClassName:String  [read-only]Implementation
    public function get facadeClassName():String
isLoggedInproperty 
isLoggedIn:Boolean  [read-only]Implementation
    public function get isLoggedIn():Boolean
needLoginproperty 
public var needLogin:Boolean = false
passwordproperty 
public var password:String = "null"
passwordEncryptedproperty 
public var passwordEncrypted:Boolean = true
quietRunproperty 
public var quietRun:Boolean = false
unblockableListenerproperty 
unblockableListener:Function  [write-only]Implementation
    public function set unblockableListener(value:Function):void
usernameproperty 
public var username:String = "null"
userObjectproperty 
public var userObject:Object = null
Constructor detail
RPCTestSuite()constructor
public function RPCTestSuite(facade:RPCFacade)Parameters
facade:RPCFacade
Method detail
callListener()method
public function callListener(tc:RPCTestCase):voidParameters
tc:RPCTestCase
cancelRunAll()method 
public function cancelRunAll():void
init()method 
public function init():void

Override to do anything after the test cases are all added.

initRPC()method 
public function initRPC(rpcUri:String):void

Call this method to initialize the RPC object in the façade. It uses passwordEncrypted, so make sure it is set correctly before calling this method.

Parameters
rpcUri:String
login()method 
public function login(postLoginCB:Function, username:String, password:String):voidParameters
postLoginCB:Function
 
username:String
 
password:String
pauseRunAll()method 
public function pauseRunAll(pause:Boolean):voidParameters
pause:Boolean
registerUserAndLogin()method 
public function registerUserAndLogin(postLoginCB:Function, username:String, password:String, userObj:Object):voidParameters
postLoginCB:Function
 
username:String
 
password:String
 
userObj:Object
resetAll()method 
public function resetAll():void
runAll()method 
public function runAll(interval:int = 0):void

Parameters
interval:int (default = 0) — In milliseconds. If > 0, run all cases one by one. Otherwise, launch all at the same time.
setListener()method 
public function setListener(f:Function, extra:Object = null):void

Parameters
f:Function — Signature is: function f(tc:RPCTestCase, extra:Object):void {}
 
extra:Object (default = null)

See also

r1.rpc.test_framework.RPCTestCase