use of org.eclipse.test.performance.Dimension in project webtools.servertools by eclipse.
the class PublishTestCase method testPublish.
public void testPublish() throws Exception {
Dimension[] dims = new Dimension[] { Dimension.ELAPSED_PROCESS, Dimension.USED_JAVA_HEAP };
tagAsSummary("Publish to Tomcat", dims);
IServer server = AbstractTomcatServerTestCase.server;
IServerWorkingCopy wc = server.createWorkingCopy();
int size = CreateModulesTestCase.NUM_MODULES;
IModule[] modules = new IModule[size];
for (int i = 0; i < size; i++) modules[i] = ModuleHelper.getModule(CreateModulesTestCase.WEB_MODULE_NAME + i);
wc.modifyModules(modules, null, null);
wc.save(true, null);
startMeasuring();
server.publish(IServer.PUBLISH_FULL, null);
stopMeasuring();
commitMeasurements();
assertPerformance();
}
use of org.eclipse.test.performance.Dimension in project webtools.servertools by eclipse.
the class PublishHugeModuleTestCase method testHugePublish.
public void testHugePublish() throws Exception {
Dimension[] dims = new Dimension[] { Dimension.ELAPSED_PROCESS, Dimension.USED_JAVA_HEAP };
tagAsSummary("Publish huge module to Tomcat", dims);
IServer server = AbstractTomcatServerTestCase.server;
IServerWorkingCopy wc = server.createWorkingCopy();
// remove previous apps
IModule[] remove = server.getModules();
wc.modifyModules(null, remove, null);
wc.save(true, null);
server.publish(IServer.PUBLISH_FULL, null);
for (int i = 0; i < 5; i++) {
// add huge app
IModule[] add = new IModule[1];
add[0] = ModuleHelper.getModule(CreateHugeModuleTestCase.WEB_MODULE_NAME);
wc.modifyModules(add, null, null);
wc.save(true, null);
// publish huge app
startMeasuring();
server.publish(IServer.PUBLISH_FULL, null);
stopMeasuring();
// remove huge app and republish
remove = server.getModules();
wc.modifyModules(null, add, null);
wc.save(true, null);
server.publish(IServer.PUBLISH_FULL, null);
}
commitMeasurements();
assertPerformance();
}
use of org.eclipse.test.performance.Dimension in project webtools.servertools by eclipse.
the class AddRemoveModulesWizard2TestCase method testAddRemoveModulesWizard.
public void testAddRemoveModulesWizard() throws Exception {
Dimension[] dims = new Dimension[] { Dimension.ELAPSED_PROCESS, Dimension.USED_JAVA_HEAP };
tagAsSummary("Add/remove modules wizard", dims);
IModule module = ModuleHelper.getModule(CreateModulesTestCase.WEB_MODULE_NAME + "0");
for (int i = 0; i < 5; i++) {
startMeasuring();
WizardTestCase.testRoS(module);
stopMeasuring();
}
commitMeasurements();
assertPerformance();
}
use of org.eclipse.test.performance.Dimension in project webtools.servertools by eclipse.
the class AddRemoveModulesWizardTestCase method testAddRemoveModulesWizard.
public void testAddRemoveModulesWizard() throws Exception {
Dimension[] dims = new Dimension[] { Dimension.ELAPSED_PROCESS, Dimension.USED_JAVA_HEAP };
tagAsSummary("Add/remove modules wizard", dims);
IModule module = ModuleHelper.getModule(CreateModulesTestCase.WEB_MODULE_NAME + "0");
startMeasuring();
WizardTestCase.testRoS(module);
stopMeasuring();
commitMeasurements();
assertPerformance();
}
use of org.eclipse.test.performance.Dimension in project webtools.servertools by eclipse.
the class OpenEditorAgainTestCase method testOpenEditor.
public void testOpenEditor() throws Exception {
Dimension[] dims = new Dimension[] { Dimension.ELAPSED_PROCESS, Dimension.USED_JAVA_HEAP };
tagAsSummary("Open Tomcat editor again", dims);
for (int i = 0; i < 5; i++) {
startMeasuring();
IServer server = getFirstServer(getServerTypeId());
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IEditorPart editor = page.openEditor(new ServerEditorInput(server.getId()), SERVER_EDITOR_ID, true);
stopMeasuring();
page.closeEditor(editor, false);
}
commitMeasurements();
assertPerformance();
}
Aggregations