com.bitmechanic.maxq
Class Test

java.lang.Object
  extended by com.bitmechanic.maxq.Test

public class Test
extends java.lang.Object

This encapsulates a test opened in the GUI. It holds a script generator and gets sent messages from the proxy server and the GUI and passes them to it when recording is in progress.


Constructor Summary
Test(ProxyServer proxy, IScriptAdapter adapter, java.io.File file)
          Load an existing test from a file.
Test(ProxyServer proxy, IScriptAdapter adapter, java.lang.String generatorClass)
          Create a new test using the supplied generator.
 
Method Summary
 void close()
          Called when this instance is no longer required.
 java.lang.String getCurrentPath()
           
 java.io.File getTestFile()
           
 java.lang.String getTestName()
           
 java.lang.String[] getvalidTestFileExtensions()
          Returns a list of the valid file extensions for the test based on the code generator used.
 boolean isRecording()
           
 void save()
           
 void setTestFile(java.io.File file)
           
 void startRecording()
           
 void stopRecording()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Test

public Test(ProxyServer proxy,
            IScriptAdapter adapter,
            java.lang.String generatorClass)
Create a new test using the supplied generator.


Test

public Test(ProxyServer proxy,
            IScriptAdapter adapter,
            java.io.File file)
     throws java.io.IOException,
            Utils.UserException
Load an existing test from a file.

Throws:
java.io.IOException
Utils.UserException
Method Detail

getTestName

public java.lang.String getTestName()

getTestFile

public java.io.File getTestFile()

setTestFile

public void setTestFile(java.io.File file)

getCurrentPath

public java.lang.String getCurrentPath()

getvalidTestFileExtensions

public java.lang.String[] getvalidTestFileExtensions()
Returns a list of the valid file extensions for the test based on the code generator used. For a jython generator ".py" would be returned.

Returns:
String array containing valid extensions
See Also:
IScriptGenerator.getValidFileExtensions()

isRecording

public boolean isRecording()

stopRecording

public void stopRecording()

startRecording

public void startRecording()

save

public void save()
          throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
Called when this instance is no longer required.