|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bitmechanic.maxq.generator.AbstractCodeGenerator
com.bitmechanic.maxq.generator.JythonCodeGenerator
public class JythonCodeGenerator
Generates a Jython test case. Take a look at the IScriptGenerator Interface to see how to specify which one you want. The important information is that this class generates Jython code.
IScriptGenerator
Field Summary |
---|
Fields inherited from class com.bitmechanic.maxq.generator.AbstractCodeGenerator |
---|
assertNumber, END_STATEMENT, headersExist, jtidyConfigFile |
Fields inherited from interface com.bitmechanic.maxq.generator.IScriptGenerator |
---|
EOL |
Constructor Summary | |
---|---|
JythonCodeGenerator(IScriptAdapter adapter)
|
Method Summary | |
---|---|
void |
doAssertResponse(java.lang.String respCode)
|
void |
doBodyParameterList(Param[] params)
|
void |
doCallUrl(java.lang.String url,
java.lang.String method,
java.lang.String data,
java.lang.String contentLength)
|
void |
doEndTransaction()
Appends an EOL char to scriptAdapter |
void |
doHeaders(HeaderValue[] headers)
|
void |
doNew()
Called when a new script needs to be begun. |
void |
doParameterList(Param[] params)
Implementer must add script code for the parameters provided. |
void |
doQueryStringParameterList(Param[] params)
|
void |
doResponseForFile()
|
void |
doResponseForStdOut(java.lang.String url)
|
void |
doSetCharset(java.lang.String cs)
Called when the character set for POST requests changes. |
void |
doSetData(java.lang.String data)
|
void |
doStartRecording()
Called before any processRequest() calls. |
void |
doStopRecording()
Called after the last processResponse() call, but may be followed by another doStartRecording() to start the process over again. |
void |
doTestUrlMessage(java.lang.String url)
|
void |
doTidyCode(java.lang.String url)
|
static java.lang.String |
getGeneratorDescription()
|
java.lang.String[] |
getValidFileExtensions()
Returns an array of valid file extensions for the type of code generator in use. |
void |
setStruts(boolean struts)
Called if the processResponse find that the response contains the Struts token |
Methods inherited from class com.bitmechanic.maxq.generator.AbstractCodeGenerator |
---|
close, doLoad, doSave, getDefaultTestName, getScript, getScriptAdapter, getTestName, getTestPath, getTimeElapsedSinceLastestRequest, insert, isCpRspToFile, isCpRspToStdout, isFirstRequest, parseTestName, processRequest, processResponse, run, setDefaultTestName, setTestName, setTestPath |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JythonCodeGenerator(IScriptAdapter adapter)
Method Detail |
---|
public static java.lang.String getGeneratorDescription()
public void setStruts(boolean struts)
AbstractCodeGenerator
setStruts
in class AbstractCodeGenerator
public void doNew()
IScriptGenerator
public void doParameterList(Param[] params) throws Utils.UserException
AbstractCodeGenerator
doParameterList
in class AbstractCodeGenerator
params
- Query string and body parameters, without distinction.
Utils.UserException
public void doCallUrl(java.lang.String url, java.lang.String method, java.lang.String data, java.lang.String contentLength) throws Utils.UserException
doCallUrl
in class AbstractCodeGenerator
Utils.UserException
public void doSetData(java.lang.String data) throws Utils.UserException
doSetData
in class AbstractCodeGenerator
Utils.UserException
public void doAssertResponse(java.lang.String respCode) throws Utils.UserException
doAssertResponse
in class AbstractCodeGenerator
Utils.UserException
public void doTidyCode(java.lang.String url) throws Utils.UserException
doTidyCode
in class AbstractCodeGenerator
Utils.UserException
public void doResponseForStdOut(java.lang.String url) throws Utils.UserException
doResponseForStdOut
in class AbstractCodeGenerator
Utils.UserException
public void doResponseForFile() throws Utils.UserException
doResponseForFile
in class AbstractCodeGenerator
Utils.UserException
public void doTestUrlMessage(java.lang.String url) throws Utils.UserException
doTestUrlMessage
in class AbstractCodeGenerator
Utils.UserException
public java.lang.String[] getValidFileExtensions()
IScriptGenerator
public void doStartRecording()
IScriptGenerator
public void doStopRecording()
IScriptGenerator
public void doEndTransaction() throws Utils.UserException
doEndTransaction
in class AbstractCodeGenerator
Utils.UserException
public void doSetCharset(java.lang.String cs) throws Utils.UserException
AbstractCodeGenerator
doSetCharset
in class AbstractCodeGenerator
Utils.UserException
public void doHeaders(HeaderValue[] headers)
doHeaders
in class AbstractCodeGenerator
public void doQueryStringParameterList(Param[] params) throws Utils.UserException
doQueryStringParameterList
in class AbstractCodeGenerator
params
- Query string parameters.
Utils.UserException
public void doBodyParameterList(Param[] params) throws Utils.UserException
doBodyParameterList
in class AbstractCodeGenerator
params
- Body parameters.
Utils.UserException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |