Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 65068 Details for
Bug 141540
Use JVMTI instead of JVMPI to get event notification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Client Side Launch Configuration Verification Hook Class
LaunchConfigVerificationClass.java (text/plain), 6.45 KB, created by
Liz Dancy
on 2007-04-26 12:39:42 EDT
(
hide
)
Description:
Client Side Launch Configuration Verification Hook Class
Filename:
MIME Type:
Creator:
Liz Dancy
Created:
2007-04-26 12:39:42 EDT
Size:
6.45 KB
patch
obsolete
>package org.eclipse.tptp.tests.verification.hooks; > >import org.eclipse.hyades.use.cases.auto.common.Logger; >import org.eclipse.hyades.use.cases.auto.common.VerifyHookUtil; >import org.eclipse.swt.widgets.Control; >import org.eclipse.swt.widgets.TableItem; >import org.eclipse.swt.widgets.Tree; >import org.eclipse.swt.widgets.TreeItem; >import org.eclipse.tptp.test.auto.gui.internal.runner.AutoGUIVerificationHook; > >/** > * Generated code for the test suite <b>Platform.Execution.LaunchConfig.JVMTI</b> located at > * <i>/org.eclipse.hyades.probekit.tests/test-resources/Platform.Execution.LaunchConfig.JVMTI.testsuite</i>. > * > * A test suite to test the Launch Configuration for the JVMTI Probe Insertion Analysis Type. > * This test suite *must* be run with JRE 1.5 or higher > * > * @author Liz Dancy > */ >public class LaunchConfigVerificationClass extends AutoGUIVerificationHook { > > /** > * Constructor for LaunchConfigVerificationClass. An instance of this class is created to > * test a test method. > * > * @param testMethodName The test method to be tested. > * @param paramTypes The parameter types of the test method > * @param args The arguments of the test method > */ > public LaunchConfigVerificationClass(String testMethodName, > Class[] paramTypes, Object[] args) { > super(testMethodName, paramTypes, args); > } > > /** > * @see junit.framework.TestCase#setUp() > */ > protected void setUp() throws Exception { > } > > /** > * @see junit.framework.TestCase#tearDown() > */ > protected void tearDown() throws Exception { > } > > /** > * TestNoProbesSelectedMonitor > * Test that the correct error message is displayed when no probes have been selected for probe insertion. > * @throws Exception > */ > public void verifyNoProbesSelectedMonitor(org.eclipse.swt.widgets.Shell arg0) > throws Exception > { > > Logger.getInstance().logMessage(Logger.INFO, "Entering verifyNoAgentError"); > VerifyHookUtil.verifyControlValue(arg0, VerifyHookUtil.TEXT_CONTROL_TYPE, new String[] {"No probes are selected for probe insertion"}); > Logger.getInstance().logMessage(Logger.INFO, "Exiting verifyNoAgentError"); > } > > /** > * TestCoexistenceViolations > * Tests that when probe Insertion is selected, no other analysis types can be selected at the same time. > > 1) Create a new Profile Launch Configuration of type External Java Application > 2) Select Monitor > 3) Select Probe Insertion Analysis > 4) Veridy that it is selected > 5) Select Execution Time Analysis > 6) Verify that Probe Insertion Analysis is no longer selected > * @throws Exception > */ > public void verifyProbeInsertionSelected(org.eclipse.swt.widgets.Shell arg0) > throws Exception > { > Logger.getInstance().logMessage(Logger.INFO, "Entering verifyProbeInsertionSelected"); > verifyLauncherItemState(arg0, new String[] {"Execution Time Analysis", "MemoryAnalysis","Thread Analysis", "Probe Insertion" }, > new boolean[]{false, false, false, true}); > Logger.getInstance().logMessage(Logger.INFO, "Exiting verifyProbeInsertionSelected"); > } > > /** > * TestCoexistenceViolations > * Tests that when probe Insertion is selected, no other analysis types can be selected at the same time. > * @throws Exception > */ > public void verifyCoexistenceViolation(org.eclipse.swt.widgets.Shell arg0) > throws Exception > { > Logger.getInstance().logMessage(Logger.INFO, "Entering verifyDefaultAnalysisType"); > verifyLauncherItemState(arg0, new String[] { "Execution Time Analysis", "MemoryAnalysis","Thread Analysis", "Probe Insertion" }, > new boolean[]{true, false, false, false}); > Logger.getInstance().logMessage(Logger.INFO, "Exiting verifyDefaultAnalysisType"); > } > > private void verifyLauncherItemState (org.eclipse.swt.widgets.Shell arg0, String[] launcherItems, boolean[] state) > { > Control[] trees = VerifyHookUtil.findAllControl(arg0, VerifyHookUtil.TREE_CONTROL_TYPE, null); > TreeItem[] requestedItems = new TreeItem[launcherItems.length]; > > for (int i = 0; i < trees.length; i++) > { > for (int j = 0; j < launcherItems.length; j++) > { > TreeItem treeItem = VerifyHookUtil.findChild((Tree)trees[i], launcherItems[j], true); > if (treeItem != null) > requestedItems[j] = treeItem; > } > } > > for (int i = 0; i < requestedItems.length; i++) > { > assertNotNull("Could not find the launch item: " + launcherItems[i], requestedItems[i]); > assertEquals(requestedItems[i].getChecked(), state[i]); > } > } > > /** > * TestSaveProbeSelections > * Tests that the previous selections will be reloaded if the Edit Options Dialog is closed and then re-opened. > * @throws Exception > */ > public void verifySaveSelections(org.eclipse.swt.widgets.Shell arg0) > throws Exception > { > TableItem tableItem = VerifyHookUtil.findTableItem(arg0, 0, "myprobe"); > assertTrue(tableItem!=null); > assertTrue("the UI state was not properly persisted",(tableItem.getChecked()==true) ); > } > > /** > * TestCancelSelections > * Tests that if you make changes and cancel the selections the changes are not presisted upon the next open of the Edit Options Dialog. > * @throws Exception > */ > public void verifyCancelSelections(org.eclipse.swt.widgets.Shell arg0) > throws Exception > { > TableItem tableItem = VerifyHookUtil.findTableItem(arg0, 0, "myprobe"); > assertTrue(tableItem!=null); > assertTrue("the UI state was not properly persisted",(tableItem.getChecked()==true) ); > } > > /** > * TestAddProbeRefresh > * Test adding a second probe called myprobe2 > * and then trying another launch configuration to > * ensure that the new probes show up and the UI is > * refreshed. > * @throws Exception > */ > public void verifyAddProbeRefresh(org.eclipse.swt.widgets.Shell arg0) > throws Exception > { > TableItem tableItem = VerifyHookUtil.findTableItem(arg0, 0, "myprobe2"); > assertTrue("could not find myProbe 2", tableItem!=null); > assertTrue("the UI state was not properly persisted",(tableItem.getChecked()==false) ); > } > > /** > * TestNoProbesEditOptions > * Tests that when you have unselected all probes, an error message will be displayed in the Edit Optiosn Dialog. > * @throws Exception > */ > public void verifyNoProbesEditOptions(org.eclipse.swt.widgets.Shell arg0) > throws Exception > { > Logger.getInstance().logMessage(Logger.INFO, "Entering ErrorMessage"); > VerifyHookUtil.verifyControlValue(arg0, VerifyHookUtil.TEXT_CONTROL_TYPE, new String[] {"No probes are selected for probe insertion"}); > Logger.getInstance().logMessage(Logger.INFO, "Exiting verifyErrorMessage"); > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 141540
:
64054
|
64200
|
64202
|
64210
|
64938
|
65067
| 65068 |
65838
|
65909
|
65934