com.pushtotest.testmaker.gui.NewAgentWizard.maxqhelp
Class TMCodeGenerator

java.lang.Object
  extended by com.bitmechanic.maxq.generator.AbstractCodeGenerator
      extended by com.pushtotest.testmaker.gui.NewAgentWizard.maxqhelp.TMCodeGenerator
All Implemented Interfaces:
com.bitmechanic.maxq.generator.IScriptGenerator, com.bitmechanic.maxq.ProxyServer.Observer, java.lang.Runnable

public class TMCodeGenerator
extends com.bitmechanic.maxq.generator.AbstractCodeGenerator

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.


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
TMCodeGenerator(com.bitmechanic.maxq.IScriptAdapter adapter)
           
 
Method Summary
 void doAssertResponse(java.lang.String respCode)
           
 void doBodyParameterList(com.bitmechanic.maxq.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(com.bitmechanic.maxq.HeaderValue[] headers)
          TODO: FILL New MaxQ Method in om.pushtotest.testmaker.gui.NewAgentWizard.maxqhelp
 void doNew()
           
 void doParameterList(com.bitmechanic.maxq.Param[] params)
           
 void doQueryStringParameterList(com.bitmechanic.maxq.Param[] params)
           
 void doResponseForFile()
           
 void doResponseForStdOut(java.lang.String url)
           
 void doSetCharset(java.lang.String set)
           
 void doSetData(java.lang.String data)
           
 void doStartRecording()
           
 void doStopRecording()
           
 void doTestUrlMessage(java.lang.String url)
           
 void doTidyCode(java.lang.String url)
           
static java.lang.String getGeneratorDescription()
           
 int getStepCount()
           
 java.lang.String[] getValidFileExtensions()
           
 void setLoadImages(boolean loadimages)
          Extension to AbstractCodeGenerator to allow TestMaker to tell the generator if the script being recorded will automatically, by TestMaker's agentbase class, load the tag references.
 void setStruts(boolean b)
           
 
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

TMCodeGenerator

public TMCodeGenerator(com.bitmechanic.maxq.IScriptAdapter adapter)
Method Detail

doHeaders

public void doHeaders(com.bitmechanic.maxq.HeaderValue[] headers)
TODO: FILL New MaxQ Method in om.pushtotest.testmaker.gui.NewAgentWizard.maxqhelp

Specified by:
doHeaders in class com.bitmechanic.maxq.generator.AbstractCodeGenerator

doBodyParameterList

public void doBodyParameterList(com.bitmechanic.maxq.Param[] params)
Specified by:
doBodyParameterList in class com.bitmechanic.maxq.generator.AbstractCodeGenerator

doQueryStringParameterList

public void doQueryStringParameterList(com.bitmechanic.maxq.Param[] params)
Specified by:
doQueryStringParameterList in class com.bitmechanic.maxq.generator.AbstractCodeGenerator

doSetCharset

public void doSetCharset(java.lang.String set)
Specified by:
doSetCharset in class com.bitmechanic.maxq.generator.AbstractCodeGenerator

setStruts

public void setStruts(boolean b)
Specified by:
setStruts in class com.bitmechanic.maxq.generator.AbstractCodeGenerator

setLoadImages

public void setLoadImages(boolean loadimages)
Extension to AbstractCodeGenerator to allow TestMaker to tell the generator if the script being recorded will automatically, by TestMaker's agentbase class, load the tag references.


getGeneratorDescription

public static java.lang.String getGeneratorDescription()

doNew

public void doNew()

doParameterList

public void doParameterList(com.bitmechanic.maxq.Param[] params)
                     throws com.bitmechanic.maxq.Utils.UserException
Specified by:
doParameterList in class com.bitmechanic.maxq.generator.AbstractCodeGenerator
Throws:
com.bitmechanic.maxq.Utils.UserException

doCallUrl

public void doCallUrl(java.lang.String url,
                      java.lang.String method,
                      java.lang.String data,
                      java.lang.String contentLength)
               throws com.bitmechanic.maxq.Utils.UserException
Specified by:
doCallUrl in class com.bitmechanic.maxq.generator.AbstractCodeGenerator
Throws:
com.bitmechanic.maxq.Utils.UserException

doSetData

public void doSetData(java.lang.String data)
               throws com.bitmechanic.maxq.Utils.UserException
Specified by:
doSetData in class com.bitmechanic.maxq.generator.AbstractCodeGenerator
Throws:
com.bitmechanic.maxq.Utils.UserException

doAssertResponse

public void doAssertResponse(java.lang.String respCode)
                      throws com.bitmechanic.maxq.Utils.UserException
Specified by:
doAssertResponse in class com.bitmechanic.maxq.generator.AbstractCodeGenerator
Throws:
com.bitmechanic.maxq.Utils.UserException

doTidyCode

public void doTidyCode(java.lang.String url)
                throws com.bitmechanic.maxq.Utils.UserException
Specified by:
doTidyCode in class com.bitmechanic.maxq.generator.AbstractCodeGenerator
Throws:
com.bitmechanic.maxq.Utils.UserException

doResponseForStdOut

public void doResponseForStdOut(java.lang.String url)
                         throws com.bitmechanic.maxq.Utils.UserException
Specified by:
doResponseForStdOut in class com.bitmechanic.maxq.generator.AbstractCodeGenerator
Throws:
com.bitmechanic.maxq.Utils.UserException

doResponseForFile

public void doResponseForFile()
                       throws com.bitmechanic.maxq.Utils.UserException
Specified by:
doResponseForFile in class com.bitmechanic.maxq.generator.AbstractCodeGenerator
Throws:
com.bitmechanic.maxq.Utils.UserException

doTestUrlMessage

public void doTestUrlMessage(java.lang.String url)
                      throws com.bitmechanic.maxq.Utils.UserException
Specified by:
doTestUrlMessage in class com.bitmechanic.maxq.generator.AbstractCodeGenerator
Throws:
com.bitmechanic.maxq.Utils.UserException

getValidFileExtensions

public java.lang.String[] getValidFileExtensions()

doStartRecording

public void doStartRecording()

doStopRecording

public void doStopRecording()

doEndTransaction

public void doEndTransaction()
                      throws com.bitmechanic.maxq.Utils.UserException
Appends an EOL char to scriptAdapter

Specified by:
doEndTransaction in class com.bitmechanic.maxq.generator.AbstractCodeGenerator
Throws:
com.bitmechanic.maxq.Utils.UserException

getStepCount

public int getStepCount()