org.flexunit.ant.tasks
Class TestRun

java.lang.Object
  extended by org.flexunit.ant.tasks.TestRun

public class TestRun
extends java.lang.Object


Field Summary
private  TestRunConfiguration configuration
           
private  org.apache.tools.ant.Project project
           
private  Reports reports
           
private  java.lang.String TRUE
           
 
Constructor Summary
TestRun(org.apache.tools.ant.Project project, TestRunConfiguration configuration)
           
 
Method Summary
protected  void analyzeReports()
          End of test report run.
protected  ExecutionContext obtainContext(PlayerCommand player)
           
protected  PlayerCommand obtainPlayer()
          Fetch the player command to execute the SWF.
 void run()
           
protected  java.util.concurrent.Future<java.lang.Object> setupSocketThread()
          Create a server socket for receiving the test reports from FlexUnit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRUE

private final java.lang.String TRUE
See Also:
Constant Field Values

configuration

private TestRunConfiguration configuration

project

private org.apache.tools.ant.Project project

reports

private Reports reports
Constructor Detail

TestRun

public TestRun(org.apache.tools.ant.Project project,
               TestRunConfiguration configuration)
Method Detail

run

public void run()
         throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

obtainPlayer

protected PlayerCommand obtainPlayer()
Fetch the player command to execute the SWF.

Returns:
PlayerCommand based on user config

obtainContext

protected ExecutionContext obtainContext(PlayerCommand player)
Parameters:
player - PlayerCommand which should be executed
Returns:
Context to wrap the execution of the PlayerCommand

setupSocketThread

protected java.util.concurrent.Future<java.lang.Object> setupSocketThread()
Create a server socket for receiving the test reports from FlexUnit. We read and write the test reports inside of a Thread.


analyzeReports

protected void analyzeReports()
End of test report run. Called at the end of a test run. If verbose is set to true reads all suites in the suite list and prints out a descriptive message including the name of the suite, number of tests run and number of tests failed, ignores any errors. If any tests failed during the test run, the build is halted.