}
private SahiTestSuite prepareSuite(String suitePath, String base, String browser, String sessionId,
String browserOption, String browserProcessName, String threadCapacity, boolean useSystemProxy,
boolean isSingleSession, HttpRequest request) {
final SahiTestSuite suite = new SahiTestSuite(net.sf.sahi.config.Configuration.getAbsoluteUserPath(suitePath),
base, browser, sessionId, browserOption, browserProcessName, isSingleSession);
int threads = 1;
try {
threads = Integer.parseInt(threadCapacity);
} catch (Exception e) {}
suite.setAvailableThreads(threads);
suite.setUseSystemProxy(useSystemProxy);
try {
net.sf.sahi.config.Configuration.copyProfiles();
} catch (IOException e) {
e.printStackTrace();
}
suite.setExtraInfo(request.getParameter("extraInfo"));
suite.setInitJS(request.getParameter("initJS"));
setReporters(suite, request);
setIssueCreators(suite, request);
return suite;
}