protected Type getDefaultLogLevel() {
return TreeLogger.WARN;
}
});
registerHandler(new ArgHandlerFlag() {
@Override
public String getPurpose() {
return "Synonym for -prod (deprecated)";
}
@Override
public String getTag() {
return "-web";
}
@Override
public boolean isUndocumented() {
return true;
}
@Override
public boolean setFlag() {
shell.developmentMode = false;
return true;
}
});
registerHandler(new ArgHandlerFlag() {
@Override
public String getPurpose() {
return "Causes your test to run in production (compiled) mode (defaults to development mode)";
}
@Override
public String getTag() {
return "-prod";
}
@Override
public boolean setFlag() {
shell.developmentMode = false;
return true;
}
});
registerHandler(new ArgHandlerInt() {
@Override
public String[] getDefaultArgs() {
return new String[]{getTag(), "5"};
}
@Override
public String getPurpose() {
return "Set the test method timeout, in minutes";
}
@Override
public String getTag() {
return "-testMethodTimeout";
}
@Override
public String[] getTagArgs() {
return new String[]{"minutes"};
}
@Override
public boolean isUndocumented() {
return false;
}
@Override
public void setInt(int minutes) {
shell.baseTestMethodTimeoutMillis = minutes * 60 * 1000;
}
});
registerHandler(new ArgHandlerInt() {
@Override
public String[] getDefaultArgs() {
return new String[]{getTag(), String.valueOf(DEFAULT_BEGIN_TIMEOUT_MINUTES)};
}
@Override
public String getPurpose() {
return "Set the test begin timeout (time for clients to contact "
+ "server), in minutes";
}
@Override
public String getTag() {
return "-testBeginTimeout";
}
@Override
public String[] getTagArgs() {
return new String[]{"minutes"};
}
@Override
public boolean isUndocumented() {
return false;
}
@Override
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)";
}