Package TestON :: Package core :: Module openspeak :: Class OpenSpeak
[hide private]
[frames] | no frames]

Class OpenSpeak

source code

Instance Methods [hide private]
 
__init__(self) source code
 
compiler(self, **compileParameters)
This method will parse the openspeak file and will write to a python module with the equivalent translations.
source code
 
verify_and_translate(self, line)
It will accept the each line and calls the suitable API to conver into pyton equivalent syntax .
source code
 
translate_repeat(self, **repeatStatement)
this will transalte the repeat statement into a python equivalen while loop
source code
 
translate_if_else_operator(self, **loopBlock)
This method will translate if-else loop block into its equivalent python code.
source code
 
translate_experimental_mode(self, **modeType)
This API will translate statment EXPERIMENTAL MODE ON/OFF into python equivalent.
source code
 
interpret(self, **interpetParameters)
This method will accept the OpenSpeak syntax into a string and will return a python equivalent translations statement
source code
 
translate_logs(self, **logStatement)
This will translate the OpenSpeak log message statements into python equivalent to resultString and returns resultString
source code
 
translate_log_message(self, **messageStatement)
This API will translate log messages if it is a string or Variable or combination of string and variable.
source code
 
translate_assertion(self, **assertStatement)
This will translate the ASSERT <value1> <COMPARISON OPERATOR> <value2> into python equivalent to resultString and returns resultString
source code
 
translate_response_result(self, **operatorStatement)
It will translate the LAST_RESPONSE or LAST_RESULT statement into its equivalent.
source code
 
translate_assertMessage(self, **messageStatement)
This API will facilitate the translation of assert ONPASS or ONFAIL messages .
source code
 
translate_operator(self, **operatorStatement)
It will translate the operator for assertion , by ensuring against given arguments.
source code
 
translate_store(self, **storeStatement)
This will translate the STORE <variable> IN <value> or <variable> = <value> into python equivalent to resultString and returns resultString
source code
 
translate_disconnect(self, **disconnectStatement)
This will translate the DISCONNECT <component_name> into python equivalent to resultString and returns resultString
source code
 
translate_onDOAs(self, **onDoStatement)
This will translate the ON <component> DO <action> USING <arg1> AS <value1>,<arg2> AS <value2> into python equivalent to resultString and returns resultString
source code
 
handle_conjuction(self, **conjuctStatement)
This will handle the conjuctions
source code
 
translate_usingas(self, **argumentAS)
This will tranlate USING argument AS value Statement into equivalent argument passing.
source code
 
translate_connect(self, **connectStatement)
This will translate the CONNECT <component_name> USING1 <arg1> AS <value1>, <arg2> AS <value2> into python equivalent to resultString and returns resultString
source code
 
translate_parameters(self, **parameterStatement)
This will translate the OpenSpeak Case and Params parameters into python equivalent to resultString and returns resultString
source code
 
_argsCheck(self, **args)
This API will check if given argument is varibale reference or String and will translate accordingly.
source code
 
translate_step(self, **stepStatement)
This will translate the STEP "DO SOMETHING HERE" into python equivalent to resultString and returns resultString
source code
 
translate_comment(self, **commentStatement)
This will translate the COMMENT "DO SOMETHING HERE" into python equivalent to resultString and returns resultString
source code
 
translate_testcase_name(self, **nameStatement)
This method will convert NAME "<Testcase_name>" into python equivalent statement to resultString and returns resultString
source code
 
translate_case_block(self, **caseBlock)
This method will translate the case block in test script .
source code
 
translate_loop_block(self, *loopBlock)
This method will translate for loop block into its equivalent python code.
source code
 
translate_conjuction(self, conjuctionStatement)
This will translate the AND conjuction statements into python equivalent to resultString and returns resultString
source code
 
parse_args(self, args, **kwargs)
It will accept the (key,value) pair and will return the (key,value) pairs with keys in uppercase.
source code
Method Details [hide private]

compiler(self, **compileParameters)

source code 

This method will parse the openspeak file and will write to a python module with the equivalent translations. It can accept OpenSpeak syntax in string or an OpenSpeak file as an input parameter. Translated form can be written into python module if attribute "WRITETOFILE" is set to 1.

verify_and_translate(self, line)

source code 

It will accept the each line and calls the suitable API to conver into pyton equivalent syntax . It will return the translated python syntax .

translate_if_else_operator(self, **loopBlock)

source code 

This method will translate if-else loop block into its equivalent python code. Whole loop block will be passed into loopBlock List. It returns the transalted reuslt as a string.

translate_experimental_mode(self, **modeType)

source code 

This API will translate statment EXPERIMENTAL MODE ON/OFF into python equivalent. It will return the transalted value.

translate_log_message(self, **messageStatement)

source code 

This API will translate log messages if it is a string or Variable or combination of string and variable. It will return the analysed and translate message.

translate_response_result(self, **operatorStatement)

source code 

It will translate the LAST_RESPONSE or LAST_RESULT statement into its equivalent. It returns the translate form in resulString.

translate_assertMessage(self, **messageStatement)

source code 

This API will facilitate the translation of assert ONPASS or ONFAIL messages . The message can be a string or calling another API in OpenSpeak syntax. It will return the translated message

translate_operator(self, **operatorStatement)

source code 

It will translate the operator for assertion , by ensuring against given arguments. It will return the translated assertion operator.

translate_usingas(self, **argumentAS)

source code 

This will tranlate USING argument AS value Statement into equivalent argument passing. It will return translated form into resultString

_argsCheck(self, **args)

source code 

This API will check if given argument is varibale reference or String and will translate accordingly. It will return the tanslate form in resultString.

translate_case_block(self, **caseBlock)

source code 

This method will translate the case block in test script . It returns the translated equivalent python code for test script

translate_loop_block(self, *loopBlock)

source code 

This method will translate for loop block into its equivalent python code. Whole loop block will be passed into loopBlock List. It returns the transalted reuslt as a string.