org.zkoss.ztl.util
Class ConfigHelper

java.lang.Object
  extended by org.zkoss.ztl.util.ConfigHelper

public class ConfigHelper
extends java.lang.Object

ZTL configuration helper.

Author:
sam, jumperchen

Field Summary
protected static java.lang.String RESULT_FILE_ENCODING
          TODO Logging untested yet
protected static java.lang.String RESULTS_BASE_PATH
           
protected static java.lang.String SCREENSHOT_PATH
           
protected  java.lang.String screenshotsResultsPath
           
 
Method Summary
 void clearCache(ZKSelenium browser)
           
 java.lang.String getAction()
           
 java.lang.String getBrowser()
           
 java.util.List<com.thoughtworks.selenium.Selenium> getBrowsers(java.lang.String keys)
          Deprecated. as of release ZTL 2.0.0 version
 java.util.List<com.thoughtworks.selenium.Selenium> getBrowsersForLazy(java.lang.String keys, java.lang.String caseName)
           
 java.lang.String getClient()
           
 int getConnectionReducePeriod()
           
 int getConnectionWaitPeriod()
           
 java.lang.String getContextPath()
           
 java.lang.String getDelay()
           
 int getGranularity()
          Returns the granularity for each comparing section.
 java.lang.String getImageDest()
          Returns the path of the image destination directory.
 java.lang.String getImageSrc()
          Returns the path of the image source directory.
static ConfigHelper getInstance()
           
 int getLeniency()
          Returns the leniency for each comparing section.
 int getMaxTimeoutCount()
           
 java.lang.String getMutexDir()
           
 int getRestartSleep()
           
 java.lang.String getServer()
           
 java.lang.String getTheme()
           
 java.lang.String getTimeout()
           
 boolean isAllIgnoreCase(java.lang.String fileName)
           
 boolean isComparable()
          Returns whether in a comparable mode.
 boolean isDebuggable()
           
 boolean isIgnoreCase(java.lang.String key, java.lang.String fileName)
           
 long lastModified()
           
 void setConnectionReducePeriod(int connectionReducePeriod)
           
 void setConnectionWaitPeriod(int connectionWaitPeriod)
           
 void setMaxTimeoutCount(int maxTimeoutCount)
           
 void setMutexDir(java.lang.String mutexDir)
           
 void setRestartSleep(int _restartSleep)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESULT_FILE_ENCODING

protected static final java.lang.String RESULT_FILE_ENCODING
TODO Logging untested yet

See Also:
Constant Field Values

SCREENSHOT_PATH

protected static final java.lang.String SCREENSHOT_PATH
See Also:
Constant Field Values

RESULTS_BASE_PATH

protected static final java.lang.String RESULTS_BASE_PATH
See Also:
Constant Field Values

screenshotsResultsPath

protected java.lang.String screenshotsResultsPath
Method Detail

getInstance

public static ConfigHelper getInstance()

isDebuggable

public boolean isDebuggable()

getTheme

public java.lang.String getTheme()

getClient

public java.lang.String getClient()

getServer

public java.lang.String getServer()

getContextPath

public java.lang.String getContextPath()

getAction

public java.lang.String getAction()

getDelay

public java.lang.String getDelay()

getTimeout

public java.lang.String getTimeout()

getBrowser

public java.lang.String getBrowser()

lastModified

public long lastModified()

isAllIgnoreCase

public boolean isAllIgnoreCase(java.lang.String fileName)

isIgnoreCase

public boolean isIgnoreCase(java.lang.String key,
                            java.lang.String fileName)

clearCache

public void clearCache(ZKSelenium browser)

shutdown

public void shutdown()

getBrowsersForLazy

public java.util.List<com.thoughtworks.selenium.Selenium> getBrowsersForLazy(java.lang.String keys,
                                                                             java.lang.String caseName)

getBrowsers

@Deprecated
public java.util.List<com.thoughtworks.selenium.Selenium> getBrowsers(java.lang.String keys)
Deprecated. as of release ZTL 2.0.0 version

See Also:
getBrowsersForLazy(java.lang.String, java.lang.String)

getImageSrc

public java.lang.String getImageSrc()
Returns the path of the image source directory.

Property name in config.properties: imgsrc, which means the source directory of the base image.


getImageDest

public java.lang.String getImageDest()
Returns the path of the image destination directory.

Property name in config.properties: imgdest, which means the destination directory of the compared result, if fails.


isComparable

public boolean isComparable()
Returns whether in a comparable mode.

default: false. Property name in config.properties: comparable, which means the image comparison is in a comparable mode, if true specified. Otherwise, the image is stored to the imgsrc directory as the base images.


getGranularity

public int getGranularity()
Returns the granularity for each comparing section.

Property name in config.properties: granularity

It is better to have 1~15, less is a precise comparison, but performance is slow. Don't specify too high, it may compare without any different.


getLeniency

public int getLeniency()
Returns the leniency for each comparing section.

Property name in config.properties: leniency

It is better to have 1~10, less is a precise comparison.


getConnectionWaitPeriod

public int getConnectionWaitPeriod()

setConnectionWaitPeriod

public void setConnectionWaitPeriod(int connectionWaitPeriod)

getMutexDir

public java.lang.String getMutexDir()

setMutexDir

public void setMutexDir(java.lang.String mutexDir)

getConnectionReducePeriod

public int getConnectionReducePeriod()

setConnectionReducePeriod

public void setConnectionReducePeriod(int connectionReducePeriod)

getRestartSleep

public int getRestartSleep()

setRestartSleep

public void setRestartSleep(int _restartSleep)

getMaxTimeoutCount

public int getMaxTimeoutCount()

setMaxTimeoutCount

public void setMaxTimeoutCount(int maxTimeoutCount)


Copyright © 2014. All Rights Reserved.