首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

SWTBot中运行中那些参数统制

2013-11-09 
SWTBot中运行中那些参数控制// slow down testsSWTBotPreferences.PLAYBACK_DELAY 10// set to the def

SWTBot中运行中那些参数控制

// slow down testsSWTBotPreferences.PLAYBACK_DELAY = 10;// set to the default speedSWTBotPreferences.PLAYBACK_DELAY = 0;

// increase timeout to 10 secondsSWTBotPreferences.TIMEOUT = 10000;// set to the default timeout of 5 secondsSWTBotPreferences.TIMEOUT = 5000;

// increase timeout to 1 secondSWTBotPreferences.DEFAULT_POLL_DELAY = 1000;// set to the default timeout of 500ms.SWTBotPreferences.DEFAULT_POLL_DELAY = 500;

?????????

在swtbot运行中总存在一些控制参数如超时时间,失败截屏数量等.具体请看下面不解释:

public interface SWTBotPreferenceConstants {/** @see SWTBotPreferences#DEFAULT_KEY */public static final StringKEY_DEFAULT_KEY= "org.eclipse.swtbot.search.defaultKey";/** @see SWTBotPreferences#TIMEOUT */public static final StringKEY_TIMEOUT= "org.eclipse.swtbot.search.timeout";/** @see SWTBotPreferences#PLAYBACK_DELAY */public static final StringKEY_PLAYBACK_DELAY= "org.eclipse.swtbot.playback.delay";/** @see SWTBotPreferences#DEFAULT_POLL_DELAY */public static final StringKEY_DEFAULT_POLL_DELAY= "org.eclipse.swtbot.playback.poll.delay";/** @see SWTBotPreferences#MAX_ERROR_SCREENSHOT_COUNT */public static final StringKEY_MAX_ERROR_SCREENSHOT_COUNT= "org.eclipse.swtbot.screenshots.error.maxcount";/** @see SWTBotPreferences#SCREENSHOTS_DIR */public static final StringKEY_SCREENSHOTS_DIR= "org.eclipse.swtbot.screenshots.dir";/** @see SWTBotPreferences#SCREENSHOT_FORMAT */public static final StringKEY_SCREENSHOT_FORMAT= "org.eclipse.swtbot.screenshots.format";/** @see SWTBotPreferences#KEYBOARD_LAYOUT */public static final StringKEY_KEYBOARD_LAYOUT= "org.eclipse.swtbot.keyboard.layout";/** @see SWTBotPreferences#TYPE_INTERVAL */public static final StringKEY_TYPE_INTERVAL= "org.eclipse.swtbot.keyboard.interval";/** @see SWTBotPreferences#KEYBOARD_STRATEGY */public static final StringKEY_KEYBOARD_STRATEGY= "org.eclipse.swtbot.keyboard.strategy";}

?

/** * The default key used to match SWT widgets. Defaults to {@code org.eclipse.swtbot.widget.key}. To set another * default use the system property * {@value org.eclipse.swtbot.swt.finder.utils.SWTBotPreferenceConstants#KEY_DEFAULT_KEY}. */public static StringDEFAULT_KEY= System.getProperty(KEY_DEFAULT_KEY, "org.eclipse.swtbot.widget.key");/** * The timeout for finding widgets among other things. Defaults to 5000ms. To set another default use the system * property {@value org.eclipse.swtbot.swt.finder.utils.SWTBotPreferenceConstants#KEY_TIMEOUT}. */public static longTIMEOUT= toLong(System.getProperty(KEY_TIMEOUT, "5000"), 5000);/** * The speed of playback in milliseconds. Defaults to 0. To set another default, use the system property {@code * org.eclipse.swtbot.playback.delay}. */public static longPLAYBACK_DELAY= toLong(System.getProperty(KEY_PLAYBACK_DELAY, "0"), 0);/** * The maximum number of screenshots that SWTBot should capture. Defaults to 100. To set another default use the * system property * {@value org.eclipse.swtbot.swt.finder.utils.SWTBotPreferenceConstants#KEY_MAX_ERROR_SCREENSHOT_COUNT}. */public static intMAX_ERROR_SCREENSHOT_COUNT= toInt(System.getProperty(KEY_MAX_ERROR_SCREENSHOT_COUNT, "100"), 100);/** * The directory in which screenshots should be generated. Defaults to "screenshots". To set another default use the * system property {@value org.eclipse.swtbot.swt.finder.utils.SWTBotPreferenceConstants#KEY_SCREENSHOTS_DIR}. */public static StringSCREENSHOTS_DIR= System.getProperty(KEY_SCREENSHOTS_DIR, "screenshots");/** * The screenshot image format to be used. Defaults to "jpeg". To set another default use the system property * {@value org.eclipse.swtbot.swt.finder.utils.SWTBotPreferenceConstants#KEY_SCREENSHOT_FORMAT}. The value must be * one these: BMP, GIF, ICO, JPEG, JPG, PNG or TIFF. */public static StringSCREENSHOT_FORMAT= System.getProperty(KEY_SCREENSHOT_FORMAT, "jpeg");/** * The keyboard layout. This value is autodetected at runtime. This can be set using the system property * {@value org.eclipse.swtbot.swt.finder.utils.SWTBotPreferenceConstants#KEY_KEYBOARD_LAYOUT}. * <p> * <strong>Note:</strong> the layout must be of the form foo.bar.baz.[MAC_][LANGUAGE_][COUNTRY_][VARIANT_] This * expects a file named "foo/bar/baz/[MAC_][LANGUAGE_][COUNTRY_][VARIANT_].keyboard" * </p> * Eg: * <table border="1"> * <tr> * <th align="left"><b>Layout Name</b></th> * <th align="left"><b>Configuration File</b></th> * </tr> * <tr> * <td>com.foo.bar.MAC.EN.US</td> * <td>com/foo/bar/MAC_EN_US.keyboard</td> * </tr> * <tr> * <td>com.foo.bar.MAC.EN_GB</td> * <td>com/foo/bar/MAC_EN_GB.keyboard</td> * </tr> * <tr> * <td>com.foo.bar.FR_FR</td> * <td>com/foo/bar/FR_FR.keyboard</td> * </tr> * <tr> * <td>com.foo.bar.DE</td> * <td>/com/foo/bar/DE.keyboard</td> * </tr> * </table> * * @see Locale */public static StringKEYBOARD_LAYOUT= System.getProperty(KEY_KEYBOARD_LAYOUT, KeyboardLayoutDetector.detectKeyboard());/** * The the time interval in milliseconds between typing characters in a string. Defaults to 50ms. To set another * default use the system property {@code org.eclipse.swtbot.keyboard.interval}. */public static intTYPE_INTERVAL= toInt(System.getProperty(KEY_TYPE_INTERVAL, "50"), 50);/** * The default keyboard strategy. Defaults to org.eclipse.swtbot.swt.finder.keyboard.AWTKeyboardStrategy. To set * another default use the system property {@code org.eclipse.swtbot.keyboard.strategy}. This property must be set * to a subclass of {@link KeyboardStrategy}. * * @see KeyboardStrategy * @see Keyboard */public static StringKEYBOARD_STRATEGY= System.getProperty(KEY_KEYBOARD_STRATEGY,"org.eclipse.swtbot.swt.finder.keyboard.AWTKeyboardStrategy");/** * The default time delay between successive polling while waiting for a condition to be evaluated. Defaults to * 500ms. To set another default use the system property * {@value org.eclipse.swtbot.swt.finder.utils.SWTBotPreferenceConstants#KEY_DEFAULT_POLL_DELAY}. * * @see SWTBot#waitUntil(ICondition, long, long) * @see SWTBot#waitWhile(ICondition, long, long) */public static final longDEFAULT_POLL_DELAY= toLong(System.getProperty(KEY_DEFAULT_POLL_DELAY, "500"), 500);

?

热点排行