public void setInt(int minutes) {
shell.baseTestBeginTimeoutMillis = minutes * 60 * 1000;
}
});
registerHandler(new ArgHandlerString() {
@Override
public String getPurpose() {
return "Selects the runstyle to use for this test. The name is "
+ "a suffix of com.google.gwt.junit.RunStyle or is a fully "
+ "qualified class name, and may be followed with a colon and "
+ "an argument for this runstyle. The specified class must"
+ "extend RunStyle.";
}
@Override
public String getTag() {
return "-runStyle";
}
@Override
public String[] getTagArgs() {
return new String[]{"runstyle[:args]"};
}
@Override
public boolean isUndocumented() {
return false;
}
@Override
public boolean setString(String runStyleArg) {
shell.runStyleName = runStyleArg;
return true;
}
});
registerHandler(new ArgHandlerString() {
@Override
public String getPurpose() {
return "Configure batch execution of tests";
}
@Override
public String getTag() {
return "-batch";
}
@Override
public String[] getTagArgs() {
return new String[]{"none|class|module"};
}
@Override
public boolean isUndocumented() {
return true;
}
@Override
public boolean setString(String str) {
if (str.equals("none")) {
shell.batchingStrategy = new NoBatchingStrategy();
} else if (str.equals("class")) {
shell.batchingStrategy = new ClassBatchingStrategy();
} else if (str.equals("module")) {
shell.batchingStrategy = new ModuleBatchingStrategy();
} else {
return false;
}
return true;
}
});
registerHandler(new ArgHandlerFlag() {
@Override
public String getPurpose() {
return "Causes the log window and browser windows to be displayed; useful for debugging";
}
@Override
public String getTag() {
return "-notHeadless";
}
@Override
public boolean setFlag() {
shell.setHeadless(false);
return true;
}
});
registerHandler(new ArgHandlerString() {
@Override
public String getPurpose() {
return "Precompile modules as tests are running (speeds up remote tests but requires more memory)";
}
@Override
public String getTag() {
return "-precompile";
}
@Override
public String[] getTagArgs() {
return new String[]{"simple|all|parallel"};
}
@Override
public boolean isUndocumented() {
return true;
}
@Override
public boolean setString(String str) {
if (str.equals("simple")) {
shell.compileStrategy = new SimpleCompileStrategy(shell);
} else if (str.equals("all")) {
shell.compileStrategy = new PreCompileStrategy(shell);
} else if (str.equals("parallel")) {
shell.compileStrategy = new ParallelCompileStrategy(shell);
} else {
return false;
}
return true;
}
});
registerHandler(new ArgHandlerFlag() {
@Override
public String getPurpose() {
return "Run each test using an HTML document in standards mode (rather than quirks mode)";
}
@Override
public String getTag() {
return "-standardsMode";
}
@Override
public boolean setFlag() {
shell.setStandardsMode(true);
return true;
}
});
registerHandler(new ArgHandlerFlag() {
@Override
public String getPurpose() {
return "Run each test using an HTML document in quirks mode (rather than standards mode)";
}
@Override
public String getTag() {
return "-quirksMode";
}
@Override
public boolean setFlag() {
shell.setStandardsMode(false);
return true;
}
});
registerHandler(new ArgHandlerInt() {
@Override
public String getPurpose() {
return "EXPERIMENTAL: Sets the maximum number of attempts for running each test method";
}
@Override
public String getTag() {
return "-Xtries";
}
@Override
public String[] getTagArgs() {
return new String[]{"1"};
}
@Override
public boolean isRequired() {
return false;
}
@Override
public boolean isUndocumented() {
return false;
}
@Override
public void setInt(int value) {
shell.tries = value;
}
});
registerHandler(new ArgHandlerString() {
@Override
public String getPurpose() {
return "Specify the user agents to reduce the number of permutations for remote browser tests;"
+ " e.g. ie6,ie8,safari,gecko1_8,opera";
}