cz.cuni.amis.pogamut.emohawk.bot
Class EmohawkBotTest

Package class diagram package EmohawkBotTest
java.lang.Object
  extended by cz.cuni.amis.tests.BaseTest
      extended by cz.cuni.amis.pogamut.emohawk.test.EmohawkTest
          extended by cz.cuni.amis.pogamut.emohawk.bot.EmohawkBotTest
Direct Known Subclasses:
EmohawkTest000_BasicNavigation, EmohawkTest000_BasicNavigation, EmohawkTest001_Door, NavigationTestPlayground, NavigationTestPlayground2

public abstract class EmohawkBotTest
extends EmohawkTest

UT2004Bot test - it allows you to easily specify the game type and map name the bot should run at + specify a timeout for the test.

Just use one of the startTest(Class) methods

Author:
Jimmy

Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.emohawk.test.EmohawkTest
emohawkHome, log, MAPS, testId, ucc, useInternalUcc
 
Fields inherited from class cz.cuni.amis.tests.BaseTest
NEW_LINE
 
Constructor Summary
EmohawkBotTest()
           
 
Method Summary
protected  String getMapName()
           
protected  void startTest(Class<? extends EmohawkBotTestController> controllerClass)
          Starts the test.
protected  void startTest(Class<? extends EmohawkBotTestController> controllerClass, double latchWaitMinutes)
          Starts the test.
protected  void startTest(Class<? extends EmohawkBotTestController> controllerClass, double latchWaitMinutes, int agentsCount)
          Starts the test.
protected  void startTest(Class<? extends EmohawkBotTestController> controllerClass, double latchWaitMinutes, UT2004BotParameters... params)
          Starts the test.
 void startUCC(UCCWrapperConfEmohawk uccConf)
          Starts UCC server according to params obtained from EmohawkBotTest#getGameType() and getMapName().
 
Methods inherited from class cz.cuni.amis.pogamut.emohawk.test.EmohawkTest
afterTest, awaitAgentDown, awaitAgentUp, beforeTest, endUcc, startAllUTBots, startUTBot, startUTBot, startUTObserver, startUTServer
 
Methods inherited from class cz.cuni.amis.tests.BaseTest
assertFail, assertFalse, assertTrue, baseTestBeforeClass, getLogLevel, is32Bit, is64Bit, isLinux, isWindows, log, process, process, testFailed, testFailed, testOk
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmohawkBotTest

public EmohawkBotTest()
Method Detail

startUCC

public void startUCC(UCCWrapperConfEmohawk uccConf)
              throws UCCStartException
Starts UCC server according to params obtained from EmohawkBotTest#getGameType() and getMapName().

Overrides:
startUCC in class EmohawkTest
Throws:
cz.cuni.amis.pogamut.ut2004.server.exceptions.UCCStartException
UCCStartException

getMapName

protected String getMapName()
Returns:
the map the UCC should load for the test

startTest

protected void startTest(Class<? extends EmohawkBotTestController> controllerClass)
Starts the test.

Test bot will be controlled by 'controllerClass'.

The test will timeout after 1 minutes.

Parameters:
controllerClass -

startTest

protected void startTest(Class<? extends EmohawkBotTestController> controllerClass,
                         double latchWaitMinutes)
Starts the test.

Test bot will be controlled by 'controllerClass'.

The test will timeout after 'latchWaitMinutes'.

Parameters:
controllerClass -
latchWaitMinutes -

startTest

protected void startTest(Class<? extends EmohawkBotTestController> controllerClass,
                         double latchWaitMinutes,
                         int agentsCount)
Starts the test.

Test bot will be controlled by 'controllerClass'.

The test will timeout after 'latchWaitMinutes'.

The test will lauch 'agentsCount' of bots of 'controllerClass' creating empty UT2004BotParameters for every one of them.

Parameters:
controllerClass -
latchWaitMinutes -
agentsCount -

startTest

protected void startTest(Class<? extends EmohawkBotTestController> controllerClass,
                         double latchWaitMinutes,
                         UT2004BotParameters... params)
Starts the test.

Test bot will be controlled by 'controllerClass' and will be configured with 'params.

The test will timeout after 'latchWaitMinutes'. TODO: [Jimmy] in the case of more bots, we should hook listeners to failure flags of bots to end the test case as early as possible

Parameters:
controllerClass -
params -
latchWaitMinutes -


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.