});
}
private void doRunScenarios(PackageDeploymentURIHelper helper,
ByteArrayOutputStream out) throws IOException {
ServiceImplementation serv = RepositoryServiceServlet.getService();
PackageItem pkg;
if ( helper.isLatest() ) {
pkg = serv.getRulesRepository().loadPackage( helper.getPackageName() );
} else {
pkg = serv.getRulesRepository().loadPackageSnapshot( helper.getPackageName(),
helper.getVersion() );
}
try {
BulkTestRunResult result = serv.runScenariosInPackage( pkg );
out.write( result.toString().getBytes() );
} catch ( DetailedSerializableException e ) {
log.error( e );
out.write( e.getMessage().getBytes() );
} catch ( SerializableException e ) {