Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 257266
Collapse All | Expand All

(-)src/org/eclipse/hyades/ui/internal/wizard/AttributeWizardPage.java (-6 / +5 lines)
Lines 24-44 Link Here
24
import org.eclipse.ui.PlatformUI;
24
import org.eclipse.ui.PlatformUI;
25
25
26
/**
26
/**
27
 * Wizard page that allows the user to define the description of the object 
27
 * <p>Wizard page that allows the user to define the description of the object 
28
 * to be created.
28
 * to be created.</p>
29
 * </p>
30
 * 
29
 * 
31
 * 
30
 * 
32
 * @author      Patrick Nedelec
31
 * @author      Patrick Nedelec
33
 * @author      Marcelo Paternostro
32
 * @author      Marcelo Paternostro
34
 * @author 	    Paul E. Slauenwhite
33
 * @author 	    Paul E. Slauenwhite
35
 * @version     April 1, 2009
34
 * @version     April 2, 2009
36
 * @since       January 26, 2005
35
 * @since       January 26, 2005
37
 */
36
 */
38
public class AttributeWizardPage extends WizardPage {
37
public class AttributeWizardPage extends WizardPage {
39
    
38
    
40
	private Text itemDescriptionText;
39
	protected Text itemDescriptionText;
41
    private String itemDescription;
40
	protected String itemDescription;
42
41
43
    private boolean firstActivation = true;
42
    private boolean firstActivation = true;
44
43
(-)tasks/treporttest.xhtml (-2 / +2 lines)
Lines 62-71 Link Here
62
62
63
<p>Generate a BIRT test report:</p>
63
<p>Generate a BIRT test report:</p>
64
<ol>
64
<ol>
65
  <li>Right-click on a test suite in the Test Navigator and select <b>Report... </b>.</li>
65
  <li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click on a test suite in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, and select <b>Report... </b>.</li>
66
  <li>Select one of the BIRT test report types and click <b>Next </b>.</li>
66
  <li>Select one of the BIRT test report types and click <b>Next </b>.</li>
67
  <li>Select the parent folder and define the name of the BIRT test report and click <b>Next</b>.</li>
67
  <li>Select the parent folder and define the name of the BIRT test report and click <b>Next</b>.</li>
68
  <li>Optionally, provide the report window (start and end data and time) for the BIRT test report.</li>
68
  <li>Provide the report window (start and end data and time) for the BIRT test report.</li>
69
  <li>Click <b>Finish </b> to generate the BIRT test report.</li>
69
  <li>Click <b>Finish </b> to generate the BIRT test report.</li>
70
  <li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new BIRT test report is to be opened in the internal Web Browser or text editor.</li>	
70
  <li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new BIRT test report is to be opened in the internal Web Browser or text editor.</li>	
71
</ol>
71
</ol>
(-)tasks/tcreatetestfromurlrecording.htm (-2 / +2 lines)
Lines 54-60 Link Here
54
<p>Performance tests are created from new URL recordings with the <a href="../../org.eclipse.hyades.test.doc.user/tasks/tcreatetestfromrecording.htm">New Test From Recording</a> wizard:</p>
54
<p>Performance tests are created from new URL recordings with the <a href="../../org.eclipse.hyades.test.doc.user/tasks/tcreatetestfromrecording.htm">New Test From Recording</a> wizard:</p>
55
55
56
<ol>
56
<ol>
57
	<li>Right-click in the Test Navigator, select <b>New</b> &gt; <b>Test Element...</b> &gt; <b>Test From Recording</b>, and click <b>Next</b>.  Alternatively, click the <b>New Test From Recording</b> button in the toolbar of the <a href="../../org.eclipse.hyades.test.doc.user/concepts/crecordercontrolview.htm">Recorder Control View</a>.</li>
57
	<li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, select <b>New</b> &gt; <b>Test Element...</b> &gt; <b>Test From Recording</b>, and click <b>Next</b>.  Alternatively, click the <b>New Test From Recording</b> button in the toolbar of the <a href="../../org.eclipse.hyades.test.doc.user/concepts/crecordercontrolview.htm">Recorder Control View</a>.</li>
58
    <li>Select <b>Create the test from a new recording</b>.</li>
58
    <li>Select <b>Create the test from a new recording</b>.</li>
59
    <li>Select the <b>URL Recorder</b> to record the new URL recording.</li>
59
    <li>Select the <b>URL Recorder</b> to record the new URL recording.</li>
60
    <li>Optionally, click <b>Advanced &gt;&gt;</b> and confirm the <b>TPTP URL Test Generator</b> is selected to create the new performance test from the new URL recording.</li> 
60
    <li>Optionally, click <b>Advanced &gt;&gt;</b> and confirm the <b>TPTP URL Test Generator</b> is selected to create the new performance test from the new URL recording.</li> 
Lines 97-103 Link Here
97
<p>In addition, performance tests can be created from existing URL recordings with the <b>New Test From Recording</b> wizard:</p>
97
<p>In addition, performance tests can be created from existing URL recordings with the <b>New Test From Recording</b> wizard:</p>
98
98
99
<ol>
99
<ol>
100
	<li>Right-click in the Test Navigator, select <b>New</b> &gt; <b>Test Element...</b> &gt; <b>Test From Recording</b>, and click <b>Next</b>.  Alternatively, click the <b>New Test From Recording</b> button in the toolbar of the <a href="../../org.eclipse.hyades.test.doc.user/concepts/crecordercontrolview.htm">Recorder Control View</a>.</li>
100
	<li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, select <b>New</b> &gt; <b>Test Element...</b> &gt; <b>Test From Recording</b>, and click <b>Next</b>.  Alternatively, click the <b>New Test From Recording</b> button in the toolbar of the <a href="../../org.eclipse.hyades.test.doc.user/concepts/crecordercontrolview.htm">Recorder Control View</a>.</li>
101
    <li>Select <b>Test From Recording</b> and click <b>Next</b>.</li>
101
    <li>Select <b>Test From Recording</b> and click <b>Next</b>.</li>
102
    <li>Select <b>Create the test from an existing URL recording</b>.</li>
102
    <li>Select <b>Create the test from an existing URL recording</b>.</li>
103
    <li>Select the <b>URL Recorder</b> to record the new URL recording.</li>
103
    <li>Select the <b>URL Recorder</b> to record the new URL recording.</li>
(-)concepts/cworkbenchLocationEditor.htm (-4 / +4 lines)
Lines 2-8 Link Here
2
<html lang="en-us" xml:lang="en-us">
2
<html lang="en-us" xml:lang="en-us">
3
<!-- 
3
<!-- 
4
/**********************************************************************
4
/**********************************************************************
5
 * Copyright (c) 2006, 2008 Scapa Technologies and others.
5
 * Copyright (c) 2006, 2009 Scapa Technologies and others.
6
 * All rights reserved. This content is made available under 
6
 * All rights reserved. This content is made available under 
7
 * the terms of the Eclipse Public License v1.0
7
 * the terms of the Eclipse Public License v1.0
8
 * which accompanies this distribution, and is available at
8
 * which accompanies this distribution, and is available at
Lines 27-37 Link Here
27
27
28
<h1>Editing a workbench location</h1>
28
<h1>Editing a workbench location</h1>
29
29
30
<p>Test workbench locations are edited using the Location editor.  The editor contains three tabs:</p> 
30
<p>Test workbench locations are edited using the Location Editor.  The editor contains three tabs:</p> 
31
31
32
<h2>Overview</h2>
32
<h2>Overview</h2>
33
33
34
<p>This tab provides an overview of the test workbench location.</p>
34
<p>This tab provides an overview of the test workbench location, including its general information, property groups, Eclipse workbench properties, and general properties.</p>
35
35
36
<p>This tab contains the following sections:</p>
36
<p>This tab contains the following sections:</p>
37
37
Lines 64-70 Link Here
64
	</li>
64
	</li>
65
</ul>
65
</ul>
66
66
67
<p>[1] Test workbench locations have a file name and logical name.  The logical name is used in the Test Navigator, dialogs, editors, and wizards to represent the test workbench location.
67
<p>[1] Test workbench locations have a file name and logical name.  The logical name is used in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, dialogs, editors, and wizards to represent the test workbench location.
68
The file name represents the test workbench location file (<i>*.location</i>) within the workspace.  When the test workbench location is created, the logical name defaults to the file name 
68
The file name represents the test workbench location file (<i>*.location</i>) within the workspace.  When the test workbench location is created, the logical name defaults to the file name 
69
(excluding the <i>.location</i> file extension) and may be modified without modifying the file name.  The logical name allows customization of the test workbench location name 
69
(excluding the <i>.location</i> file extension) and may be modified without modifying the file name.  The logical name allows customization of the test workbench location name 
70
without affecting the file name within the workspace.</p>
70
without affecting the file name within the workspace.</p>
(-)concepts/cEditingJUnitPluginTests.htm (-2 / +2 lines)
Lines 2-8 Link Here
2
<html lang="en-us" xml:lang="en-us">
2
<html lang="en-us" xml:lang="en-us">
3
<!-- 
3
<!-- 
4
/**********************************************************************
4
/**********************************************************************
5
 * Copyright (c) 2008 IBM Corporation.
5
 * Copyright (c) 2008, 2009 IBM Corporation.
6
 * All rights reserved.   This content
6
 * All rights reserved.   This content
7
 * is made available under the terms of the Eclipse Public License v1.0
7
 * is made available under the terms of the Eclipse Public License v1.0
8
 * which accompanies this distribution, and is available at
8
 * which accompanies this distribution, and is available at
Lines 38-44 Link Here
38
      <br/>
38
      <br/>
39
	</li>
39
	</li>
40
	<li>
40
	<li>
41
	<a href="PLUGINS_ROOT/org.eclipse.hyades.test.doc.user/samples/saccessdp.htm">Tutorial: Accessing a datapool from a JUnit test</a>
41
	<a href="PLUGINS_ROOT/org.eclipse.hyades.test.doc.user/samples/saccessdatapool.htm">Tutorial: Accessing a datapool from a JUnit test</a>
42
	<br/>
42
	<br/>
43
	</li>
43
	</li>
44
</ul>
44
</ul>
(-)toc/junit_plugin_test_toc.xml (-1 / +1 lines)
Lines 22-28 Link Here
22
      </topic>      
22
      </topic>      
23
      <topic label="Editing JUnit Plug-in tests" href="concepts/cEditingJUnitPluginTests.htm">
23
      <topic label="Editing JUnit Plug-in tests" href="concepts/cEditingJUnitPluginTests.htm">
24
	      <topic label="JUnit Plug-in Test Suite Editor" href="concepts/cpluginTestEditor.htm"/>
24
	      <topic label="JUnit Plug-in Test Suite Editor" href="concepts/cpluginTestEditor.htm"/>
25
		  <topic label="Tutorial: Accessing a datapool from a JUnit test" href="PLUGINS_ROOT/org.eclipse.hyades.test.doc.user/samples/saccessdp.htm"/>
25
		  <link toc="PLUGINS_ROOT/org.eclipse.hyades.test.doc.user/toc/test_datapools_toc.xml"/>
26
      </topic>          
26
      </topic>          
27
	  <topic label="Creating a workbench location" href="tasks/tcreateWorkbenchLocation.htm">
27
	  <topic label="Creating a workbench location" href="tasks/tcreateWorkbenchLocation.htm">
28
	    <topic label="Editing a workbench location" href="concepts/cworkbenchLocationEditor.htm"/>
28
	    <topic label="Editing a workbench location" href="concepts/cworkbenchLocationEditor.htm"/>
(-)tasks/tcreateWorkbenchLocation.htm (-3 / +2 lines)
Lines 30-39 Link Here
30
<p>Create a test workbench location:</p>
30
<p>Create a test workbench location:</p>
31
31
32
<ol>
32
<ol>
33
	<li>Right-click in the Test Navigator and select <b>New</b> &gt; <b>Test Element...</b>.</li>
33
	<li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, and select <b>New</b> &gt; <b>Test Element...</b> &gt; <b>Test Assets</b> &gt; <b>Workbench Location</b>, and click <b>Next</b>.</li>
34
	<li>Select <b>Test Assets</b> &gt; <b>Workbench Location</b> and click <b>Next</b>.</li>
35
    <li>Select the parent folder and define the name of the test workbench location and click <b>Next</b>.</li>
34
    <li>Select the parent folder and define the name of the test workbench location and click <b>Next</b>.</li>
36
    <li>Optionally, provide a description for the test workbench location and click <b>Next</b>.</li>
35
    <li>Provide a description for the test workbench location and click <b>Next</b>.</li>
37
    <li>Select the target workbench as either the local workbench, as defined in the <a href="PLUGINS_ROOT/org.eclipse.pde.doc.user/guide/tools/preference_pages/target_platform.htm">Target Platform</a>, 
36
    <li>Select the target workbench as either the local workbench, as defined in the <a href="PLUGINS_ROOT/org.eclipse.pde.doc.user/guide/tools/preference_pages/target_platform.htm">Target Platform</a>, 
38
    or another workbench.  If another workbench is selected, enter the host name or IP address of the target host, Eclipse location (<i>&lt;Eclipse installation directory absolute path&gt;/eclipse</i>), 
37
    or another workbench.  If another workbench is selected, enter the host name or IP address of the target host, Eclipse location (<i>&lt;Eclipse installation directory absolute path&gt;/eclipse</i>), 
39
    workspace location (<i>&lt;Eclipse workspace directory absolute path&gt;/eclipse</i>), operating system, windowing system, architecture, and locale for the host where the other workbench is installed.
38
    workspace location (<i>&lt;Eclipse workspace directory absolute path&gt;/eclipse</i>), operating system, windowing system, architecture, and locale for the host where the other workbench is installed.
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/InsertRowAction.java (-3 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-25 Link Here
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.datapool.internal.util.ContextIds;
16
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
17
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
17
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
18
import org.eclipse.jface.viewers.ISelectionProvider;
18
import org.eclipse.jface.viewers.ISelectionProvider;
19
import org.eclipse.ui.actions.SelectionProviderAction;
19
import org.eclipse.ui.actions.SelectionProviderAction;
20
20
21
/**
21
/**
22
 * @author psun
22
 * <p>Insert row action for the datapool table.</p>
23
 * 
24
 * 
25
 * @author  Peter Sun
26
 * @author  Paul E. Slauenwhite
27
 * @version April 2, 2009
28
 * @since   January 27, 2005
23
 */
29
 */
24
public class InsertRowAction extends SelectionProviderAction {
30
public class InsertRowAction extends SelectionProviderAction {
25
	private DatapoolTable table;
31
	private DatapoolTable table;
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/DeleteColumnAction.java (-4 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-26 Link Here
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.datapool.internal.util.ContextIds;
16
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
17
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
17
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
18
import org.eclipse.jface.viewers.ISelectionProvider;
18
import org.eclipse.jface.viewers.ISelectionProvider;
19
import org.eclipse.ui.actions.SelectionProviderAction;
19
import org.eclipse.ui.actions.SelectionProviderAction;
20
20
21
/**
21
/**
22
 * @author psun
22
 * <p>Delete column action for the datapool table.</p>
23
 *
23
 * 
24
 * 
25
 * @author  Peter Sun
26
 * @author  Paul E. Slauenwhite
27
 * @version April 2, 2009
28
 * @since   January 27, 2005
24
 */
29
 */
25
public class DeleteColumnAction extends SelectionProviderAction {
30
public class DeleteColumnAction extends SelectionProviderAction {
26
	private DatapoolTable table;
31
	private DatapoolTable table;
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/CutAction.java (-5 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-19 Link Here
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.datapool.internal.util.ContextIds;
16
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
17
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
17
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
18
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
18
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
19
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
19
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
Lines 22-35 Link Here
22
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
22
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
23
23
24
/**
24
/**
25
 * Cut action for the datapool table.
25
 * <p>Cut action for the datapool table.</p>
26
 * <p/>
27
 * 
26
 * 
28
 * 
27
 * 
29
 * @author  Peter Sun
28
 * @author  Peter Sun
30
 * @author  Patrick Nedelec
29
 * @author  Patrick Nedelec
31
 * @author  Paul E. Slauenwhite
30
 * @author  Paul E. Slauenwhite
32
 * @version August 6, 2008
31
 * @version April 2, 2009
33
 * @since   January 27, 2005
32
 * @since   January 27, 2005
34
 */
33
 */
35
public class CutAction extends org.eclipse.hyades.ui.internal.editor.action.CutAction {
34
public class CutAction extends org.eclipse.hyades.ui.internal.editor.action.CutAction {
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/PasteAction.java (-3 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-19 Link Here
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.datapool.internal.util.ContextIds;
16
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
17
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
17
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
18
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
18
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
19
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
19
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
Lines 29-35 Link Here
29
 * @author  Peter Sun
29
 * @author  Peter Sun
30
 * @author  Patrick Nedelec
30
 * @author  Patrick Nedelec
31
 * @author  Paul E. Slauenwhite
31
 * @author  Paul E. Slauenwhite
32
 * @version August 6, 2008
32
 * @version April 2, 2009
33
 * @since   January 27, 2005
33
 * @since   January 27, 2005
34
 */
34
 */
35
public class PasteAction extends org.eclipse.hyades.ui.internal.editor.action.PasteAction {
35
public class PasteAction extends org.eclipse.hyades.ui.internal.editor.action.PasteAction {
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/CopyAction.java (-5 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-19 Link Here
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.datapool.internal.util.ContextIds;
16
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
17
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
17
import org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart;
18
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
18
import org.eclipse.hyades.test.ui.internal.editor.extension.DatapoolEditorExtension;
19
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
19
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
Lines 22-35 Link Here
22
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
22
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
23
23
24
/**
24
/**
25
 * Copy action for the datapool table.
25
 * <p>Copy action for the datapool table.</p>
26
 * <p/>
27
 * 
26
 * 
28
 * 
27
 * 
29
 * @author  Peter Sun
28
 * @author  Peter Sun
30
 * @author  Patrick Nedelec
29
 * @author  Patrick Nedelec
31
 * @author  Paul E. Slauenwhite
30
 * @author  Paul E. Slauenwhite
32
 * @version August 6, 2008
31
 * @version April 2, 2009
33
 * @since   January 27, 2005
32
 * @since   January 27, 2005
34
 */
33
 */
35
public class CopyAction extends org.eclipse.hyades.ui.internal.editor.action.CopyAction {
34
public class CopyAction extends org.eclipse.hyades.ui.internal.editor.action.CopyAction {
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/InsertColumnAction.java (-4 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-26 Link Here
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.datapool.internal.util.ContextIds;
16
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
17
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
17
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
18
import org.eclipse.jface.viewers.ISelectionProvider;
18
import org.eclipse.jface.viewers.ISelectionProvider;
19
import org.eclipse.ui.actions.SelectionProviderAction;
19
import org.eclipse.ui.actions.SelectionProviderAction;
20
20
21
/**
21
/**
22
 * @author psun
22
 * <p>Insert column action for the datapool table.</p>
23
 *
23
 * 
24
 * 
25
 * @author  Peter Sun
26
 * @author  Paul E. Slauenwhite
27
 * @version April 2, 2009
28
 * @since   January 27, 2005
24
 */
29
 */
25
public class InsertColumnAction extends SelectionProviderAction {
30
public class InsertColumnAction extends SelectionProviderAction {
26
	private DatapoolTable table;
31
	private DatapoolTable table;
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/DeleteRowAction.java (-4 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-26 Link Here
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.datapool.internal.util.ContextIds;
16
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
17
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
17
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
18
import org.eclipse.jface.viewers.ISelectionProvider;
18
import org.eclipse.jface.viewers.ISelectionProvider;
19
import org.eclipse.ui.actions.SelectionProviderAction;
19
import org.eclipse.ui.actions.SelectionProviderAction;
20
20
21
/**
21
/**
22
 * @author psun
22
 * <p>Delete row action for the datapool table.</p>
23
 *
23
 * 
24
 * 
25
 * @author  Peter Sun
26
 * @author  Paul E. Slauenwhite
27
 * @version April 2, 2009
28
 * @since   January 27, 2005
24
 */
29
 */
25
public class DeleteRowAction extends SelectionProviderAction {
30
public class DeleteRowAction extends SelectionProviderAction {
26
	private DatapoolTable table;
31
	private DatapoolTable table;
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/EditColumnAction.java (-4 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-26 Link Here
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.datapool.internal.util.ContextIds;
16
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
17
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
17
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
18
import org.eclipse.jface.viewers.ISelectionProvider;
18
import org.eclipse.jface.viewers.ISelectionProvider;
19
import org.eclipse.ui.actions.SelectionProviderAction;
19
import org.eclipse.ui.actions.SelectionProviderAction;
20
20
21
/**
21
/**
22
 * @author psun
22
 * <p>Edit column action for the datapool table.</p>
23
 *
23
 * 
24
 * 
25
 * @author  Peter Sun
26
 * @author  Paul E. Slauenwhite
27
 * @version April 2, 2009
28
 * @since   January 27, 2005
24
 */
29
 */
25
public class EditColumnAction extends SelectionProviderAction {
30
public class EditColumnAction extends SelectionProviderAction {
26
	private DatapoolTable table;
31
	private DatapoolTable table;
(-)src/org/eclipse/hyades/test/ui/datapool/internal/action/EditRowAction.java (-4 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-26 Link Here
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
15
import org.eclipse.hyades.test.ui.datapool.internal.control.DatapoolTable;
16
import org.eclipse.hyades.test.ui.datapool.internal.util.ContextIds;
16
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
17
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
17
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
18
import org.eclipse.jface.viewers.ISelectionProvider;
18
import org.eclipse.jface.viewers.ISelectionProvider;
19
import org.eclipse.ui.actions.SelectionProviderAction;
19
import org.eclipse.ui.actions.SelectionProviderAction;
20
20
21
/**
21
/**
22
 * @author psun
22
 * <p>Edit row action for the datapool table.</p>
23
 *
23
 * 
24
 * 
25
 * @author  Peter Sun
26
 * @author  Paul E. Slauenwhite
27
 * @version April 2, 2009
28
 * @since   January 27, 2005
24
 */
29
 */
25
public class EditRowAction extends SelectionProviderAction {
30
public class EditRowAction extends SelectionProviderAction {
26
	private DatapoolTable table;
31
	private DatapoolTable table;
(-)src/org/eclipse/hyades/test/ui/internal/util/ContextIds.java (-19 / +46 lines)
Lines 16-27 Link Here
16
 * 
16
 * 
17
 * 
17
 * 
18
 * @author  Paul E. Slauenwhite
18
 * @author  Paul E. Slauenwhite
19
 * @version March 31, 2009
19
 * @version April 2, 2009
20
 * @since   February 1, 2005
20
 * @since   February 1, 2005
21
 */
21
 */
22
public class ContextIds {
22
public class ContextIds {
23
23
24
	//Create New Test From Recording wizard:
24
	//New Test From Recording wizard:
25
	public static final String NEW_TEST_FROM_RECORDING_WIZARD = ".recw0001"; //$NON-NLS-1$
25
	public static final String NEW_TEST_FROM_RECORDING_WIZARD = ".recw0001"; //$NON-NLS-1$
26
	
26
	
27
	//Recorder Control view:
27
	//Recorder Control view:
Lines 144-174 Link Here
144
	public static final String EXEC_EDIT_OVERVIEW = ".exed0001"; //$NON-NLS-1$
144
	public static final String EXEC_EDIT_OVERVIEW = ".exed0001"; //$NON-NLS-1$
145
	public static final String EXEC_EDIT_EVENTS = ".exed0002"; //$NON-NLS-1$
145
	public static final String EXEC_EDIT_EVENTS = ".exed0002"; //$NON-NLS-1$
146
146
147
	// Added to support datapool editing (PBS 12/06/03)
147
	//Dtapools:
148
	// datapool editor
148
	
149
	//Datapool Editor:
150
	public static final String DATA_BASE_DIALOG = ".dpld0001"; //$NON-NLS-1$	
151
152
	//New Datapool wizard:
153
	public static final String NEW_DATAPOOL_WIZARD = ".dplw0001"; //$NON-NLS-1$	
154
155
	//Import CSV File as Datapool wizard:
156
	public static final String IMPORT_CSV_FILE_AS_DATAPOOL_WIZARD = ".dplw0002"; //$NON-NLS-1$	
157
158
	//Export Datapool as CSV File wizard:
159
	public static final String EXPORT_DATAPOOL_AS_CSV_FILE_WIZARD = ".dplw0003"; //$NON-NLS-1$	
160
149
	public static final String DATA_FORM = ".datf0001"; //$NON-NLS-1$
161
	public static final String DATA_FORM = ".datf0001"; //$NON-NLS-1$
150
	public static final String DATA_TEXT_FORM = ".datf0002"; //$NON-NLS-1$
162
	public static final String DATA_TEXT_FORM = ".datf0002"; //$NON-NLS-1$
151
	public static final String DATA_NAME_FORM = ".datf0003"; //$NON-NLS-1$
163
	public static final String DATA_NAME_FORM = ".datf0003"; //$NON-NLS-1$
152
	
153
	public static final String DATA_TABLE_FORM = ".datbf0001"; //$NON-NLS-1$
164
	public static final String DATA_TABLE_FORM = ".datbf0001"; //$NON-NLS-1$
154
	
165
155
	// insert column action
166
	//Insert column action:
156
	public static final String INS_COL_ACT = ".ica0001"; //$NON-NLS-1$
167
	public static final String INS_COL_ACT = ".ica0001"; //$NON-NLS-1$
157
	// delete column action
168
158
	public static final String DEL_COL_ACT = ".dca0001"; //$NON-NLS-1$
169
	//Edit column action:
159
	// edit column action
160
	public static final String EDIT_COL_ACT = ".eca0001"; //$NON-NLS-1$
170
	public static final String EDIT_COL_ACT = ".eca0001"; //$NON-NLS-1$
161
	// insert row action
171
172
	//Delete column action:
173
	public static final String DEL_COL_ACT = ".dca0001"; //$NON-NLS-1$
174
	
175
	//Insert row action:
162
	public static final String INS_ROW_ACT = ".ira0001"; //$NON-NLS-1$
176
	public static final String INS_ROW_ACT = ".ira0001"; //$NON-NLS-1$
163
	// delete row action
177
164
	public static final String DEL_ROW_ACT = ".dra0001"; //$NON-NLS-1$
178
	//Edit row action:
165
	// edit row action
166
	public static final String EDIT_ROW_ACT = ".era0001"; //$NON-NLS-1$	
179
	public static final String EDIT_ROW_ACT = ".era0001"; //$NON-NLS-1$	
167
	// insert row group action
180
	
181
	//Delete row action:
182
	public static final String DEL_ROW_ACT = ".dra0001"; //$NON-NLS-1$
183
184
	//Insert row group action:
168
	public static final String INS_ROW_GRP_ACT = ".irga0001"; //$NON-NLS-1$
185
	public static final String INS_ROW_GRP_ACT = ".irga0001"; //$NON-NLS-1$
169
	// delete row group action
186
170
	public static final String DEL_ROW_GRP_ACT = ".drga0001"; //$NON-NLS-1$
187
	//Edit row group action:
171
	// edit row group action
172
	public static final String EDIT_ROW_GRP_ACT = ".erga0001"; //$NON-NLS-1$
188
	public static final String EDIT_ROW_GRP_ACT = ".erga0001"; //$NON-NLS-1$
173
		
189
	
190
	//Delete row group action:
191
	public static final String DEL_ROW_GRP_ACT = ".drga0001"; //$NON-NLS-1$
192
193
	//Copy action:
194
	public static final String COPY_ACT = ".cpya0001"; //$NON-NLS-1$
195
196
	//Cut action:
197
	public static final String CUT_ACT = ".cuta0001"; //$NON-NLS-1$
198
199
	//Paste action:
200
	public static final String PASTE_ACT = ".psta0001"; //$NON-NLS-1$
174
}
201
}
(-)src/org/eclipse/hyades/test/ui/internal/wizard/DatapoolImportWizard.java (-1 / +19 lines)
Lines 28-42 Link Here
28
import org.eclipse.hyades.test.ui.UiPlugin;
28
import org.eclipse.hyades.test.ui.UiPlugin;
29
import org.eclipse.hyades.test.ui.datapool.internal.util.CSVImportExportUtil;
29
import org.eclipse.hyades.test.ui.datapool.internal.util.CSVImportExportUtil;
30
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
30
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
31
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
31
import org.eclipse.hyades.test.ui.internal.util.TestUIUtilities;
32
import org.eclipse.hyades.test.ui.internal.util.TestUIUtilities;
32
import org.eclipse.jface.dialogs.ErrorDialog;
33
import org.eclipse.jface.dialogs.ErrorDialog;
33
import org.eclipse.jface.operation.IRunnableWithProgress;
34
import org.eclipse.jface.operation.IRunnableWithProgress;
34
import org.eclipse.jface.viewers.IStructuredSelection;
35
import org.eclipse.jface.viewers.IStructuredSelection;
35
import org.eclipse.jface.wizard.Wizard;
36
import org.eclipse.jface.wizard.Wizard;
37
import org.eclipse.swt.widgets.Composite;
36
import org.eclipse.tptp.platform.common.ui.wizard.LocationPage;
38
import org.eclipse.tptp.platform.common.ui.wizard.LocationPage;
37
import org.eclipse.ui.IImportWizard;
39
import org.eclipse.ui.IImportWizard;
38
import org.eclipse.ui.IWorkbench;
40
import org.eclipse.ui.IWorkbench;
41
import org.eclipse.ui.PlatformUI;
39
import org.eclipse.ui.actions.WorkspaceModifyOperation;
42
import org.eclipse.ui.actions.WorkspaceModifyOperation;
43
import org.eclipse.ui.help.IWorkbenchHelpSystem;
40
44
41
/**
45
/**
42
 * <p>Datapool import wizard to import data from a CSV file to an 
46
 * <p>Datapool import wizard to import data from a CSV file to an 
Lines 45-51 Link Here
45
 * 
49
 * 
46
 * @author  Bianca Xue Jiang
50
 * @author  Bianca Xue Jiang
47
 * @author  Paul E. Slauenwhite
51
 * @author  Paul E. Slauenwhite
48
 * @version April 1, 2009
52
 * @version April 2, 2009
49
 * @since   March 18, 2005
53
 * @since   March 18, 2005
50
 */
54
 */
51
public class DatapoolImportWizard extends Wizard implements IImportWizard {
55
public class DatapoolImportWizard extends Wizard implements IImportWizard {
Lines 105-110 Link Here
105
	}
109
	}
106
110
107
	/* (non-Javadoc)
111
	/* (non-Javadoc)
112
	 * @see org.eclipse.jface.wizard.Wizard#createPageControls(org.eclipse.swt.widgets.Composite)
113
	 */
114
	public void createPageControls(Composite parent){
115
		
116
		super.createPageControls(parent);
117
		
118
		//Set the context sensitive help:
119
		IWorkbenchHelpSystem workbenchHelpSystem = PlatformUI.getWorkbench().getHelpSystem();
120
		workbenchHelpSystem.setHelp(datapoolImportPageOne.getControl(), (UiPlugin.getID() + ContextIds.IMPORT_CSV_FILE_AS_DATAPOOL_WIZARD));
121
		workbenchHelpSystem.setHelp(datapoolImportPageTwo.getControl(), (UiPlugin.getID() + ContextIds.IMPORT_CSV_FILE_AS_DATAPOOL_WIZARD));
122
		workbenchHelpSystem.setHelp(locationPage.getControl(), (UiPlugin.getID() + ContextIds.IMPORT_CSV_FILE_AS_DATAPOOL_WIZARD));
123
	}
124
	
125
	/* (non-Javadoc)
108
	 * @see org.eclipse.jface.wizard.IWizard#performFinish()
126
	 * @see org.eclipse.jface.wizard.IWizard#performFinish()
109
	 */
127
	 */
110
	public boolean performFinish() {
128
	public boolean performFinish() {
(-)src/org/eclipse/hyades/test/ui/internal/wizard/DatapoolAttributeWizardPage.java (-2 / +8 lines)
Lines 36-42 Link Here
36
 * 
36
 * 
37
 * @author  Bianca Xue Jiang
37
 * @author  Bianca Xue Jiang
38
 * @author  Paul Slauenwhite
38
 * @author  Paul Slauenwhite
39
 * @version April 1, 2009
39
 * @version April 2, 2009
40
 * @since   March 3, 2005
40
 * @since   March 3, 2005
41
 */
41
 */
42
public class DatapoolAttributeWizardPage extends AttributeWizardPage {
42
public class DatapoolAttributeWizardPage extends AttributeWizardPage {
Lines 122-128 Link Here
122
				
122
				
123
				csvFileSelectionComposite.setVisible(isVisible);
123
				csvFileSelectionComposite.setVisible(isVisible);
124
				
124
				
125
				if(!isVisible){
125
				if(isVisible){
126
					csvFileSelectionComposite.getCSVFileText().setFocus();
127
				}
128
				else{
129
					
130
					itemDescriptionText.setFocus();
131
					
126
					csvFileSelectionComposite.init();
132
					csvFileSelectionComposite.init();
127
				}
133
				}
128
				
134
				
(-)src/org/eclipse/hyades/test/ui/internal/wizard/DatapoolExportSelectionPage.java (-237 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * $Id: DatapoolExportSelectionPage.java,v 1.8 2008/11/04 14:20:23 paules Exp $
8
 * 
9
 * Contributors:
10
 *     IBM Corporation - initial API and implementation
11
 *******************************************************************************/
12
package org.eclipse.hyades.test.ui.internal.wizard;
13
14
import org.eclipse.core.resources.IResource;
15
import org.eclipse.core.resources.ResourcesPlugin;
16
import org.eclipse.hyades.edit.datapool.IDatapool;
17
import org.eclipse.hyades.models.common.datapool.util.DatapoolEncryptManager;
18
import org.eclipse.hyades.models.common.util.ICommonConstants;
19
import org.eclipse.hyades.test.ui.datapool.internal.util.GridDataUtil;
20
import org.eclipse.hyades.test.ui.dialog.EObjectResourceContentProvider;
21
import org.eclipse.hyades.test.ui.dialog.EObjectResourceLabelProvider;
22
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
23
import org.eclipse.jface.viewers.ISelection;
24
import org.eclipse.jface.viewers.IStructuredSelection;
25
import org.eclipse.jface.viewers.StructuredViewer;
26
import org.eclipse.jface.viewers.TreeViewer;
27
import org.eclipse.jface.viewers.Viewer;
28
import org.eclipse.jface.viewers.ViewerSorter;
29
import org.eclipse.jface.wizard.WizardPage;
30
import org.eclipse.osgi.util.NLS;
31
import org.eclipse.swt.SWT;
32
import org.eclipse.swt.events.ModifyEvent;
33
import org.eclipse.swt.events.ModifyListener;
34
import org.eclipse.swt.events.SelectionEvent;
35
import org.eclipse.swt.events.SelectionListener;
36
import org.eclipse.swt.graphics.Image;
37
import org.eclipse.swt.layout.FormAttachment;
38
import org.eclipse.swt.layout.FormData;
39
import org.eclipse.swt.layout.FormLayout;
40
import org.eclipse.swt.layout.GridData;
41
import org.eclipse.swt.layout.GridLayout;
42
import org.eclipse.swt.widgets.Button;
43
import org.eclipse.swt.widgets.Composite;
44
import org.eclipse.swt.widgets.Group;
45
import org.eclipse.swt.widgets.Text;
46
import org.eclipse.swt.widgets.Tree;
47
48
/**
49
 * Datapool export selection page.
50
 * 
51
 * 
52
 * @author     Peter Sun
53
 * @author     Paul E. Slauenwhite
54
 * @version    October 31, 2008
55
 * @since      February 1, 2005
56
 * @deprecated As of TPTP V4.5.2, use {@link DatapoolSelectionPage}.
57
 */
58
public class DatapoolExportSelectionPage extends WizardPage implements SelectionListener {
59
	
60
	IDatapool datapool = null;
61
	private TreeViewer assetViewer;	
62
	Button filterButton = null;
63
	private EObjectResourceContentProvider contentProvider;
64
	private String[] fileExtensions;
65
	private Image fileImage;
66
	private Group group;
67
	private Text textArea;	
68
	private FormData formData;	
69
	private boolean isEncrypted = false;
70
	
71
	/**
72
	 * @param pageName
73
	 */
74
	protected DatapoolExportSelectionPage(String pageName) 
75
	{
76
		super(pageName);
77
		fileExtensions = getSupportedFileExtensions();
78
		setPageComplete(false);
79
	}
80
81
	/* (non-Javadoc)
82
	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
83
	 */
84
	public void createControl(Composite parent) 
85
	{
86
        Composite composite = new Composite(parent, SWT.NONE);		
87
		GridLayout layout = new GridLayout();
88
		composite.setLayout(layout);
89
		GridData gridData = GridDataUtil.createFill();
90
		composite.setLayoutData(gridData);
91
		
92
		filterButton = new Button(composite, SWT.CHECK);
93
		filterButton.setText(UiPluginResourceBundle.SHOW_FOLDERS); 
94
		filterButton.addSelectionListener(this);
95
		createViewer(composite);
96
		assetViewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
97
		((Tree)assetViewer.getControl()).addSelectionListener(this);
98
		((TreeViewer)assetViewer).expandToLevel(2);
99
		setControl(composite);
100
		
101
	}
102
	
103
	public IDatapool getDatapool()
104
	{
105
		return datapool;
106
	}
107
	
108
	/* (non-Javadoc)
109
	 * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
110
	 */
111
	public void widgetSelected(SelectionEvent e) 
112
	{
113
		if(e.widget == filterButton)						
114
		{
115
			contentProvider.setFilter((filterButton.getSelection() ? EObjectResourceContentProvider.SHOW_ALL : EObjectResourceContentProvider.FILTER_FOLDERS));
116
			ISelection selection = assetViewer.getSelection();				
117
			assetViewer.refresh();
118
			if(!selection.isEmpty())
119
				assetViewer.setSelection(selection, true);
120
		}
121
		
122
		if(e.widget == assetViewer.getControl())
123
		{
124
			setSelection();
125
		}
126
	}
127
128
	/* (non-Javadoc)
129
	 * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
130
	 */
131
	public void widgetDefaultSelected(SelectionEvent e) 
132
	{
133
		
134
	}
135
136
	protected StructuredViewer createViewer(Composite parent)
137
	{		
138
		Tree tree = new Tree(parent, SWT.SINGLE | SWT.FULL_SELECTION | SWT.BORDER);
139
		GridData gridData = GridDataUtil.createFill();
140
		gridData.heightHint = 150;
141
		tree.setLayoutData(gridData);
142
			
143
		contentProvider = new EObjectResourceContentProvider(fileExtensions);
144
		assetViewer = new TreeViewer(tree);
145
		assetViewer.setContentProvider(contentProvider);
146
		assetViewer.setLabelProvider(new EObjectResourceLabelProvider(true, fileImage));
147
148
		contentProvider.setFilter(EObjectResourceContentProvider.FILTER_FOLDERS);
149
150
		ViewerSorter sorter = new ViewerSorter()
151
		{
152
			public void sort(Viewer viewer, Object[] elements)
153
			{
154
				if(elements.length > 0)
155
					super.sort(viewer, elements);
156
			}
157
		
158
			public int category(Object element)
159
			{
160
				if(element instanceof IResource)
161
					return 0;
162
163
				return 10;
164
			}		
165
		};
166
		assetViewer.setSorter(sorter);
167
	
168
		group = new Group(parent,SWT.NULL);			
169
		group.setText(UiPluginResourceBundle.DatapoolExportWizard_password);
170
		group.setLayoutData(GridDataUtil.createHorizontalFill());
171
		group.setLayout(new FormLayout());
172
		group.setVisible(false);
173
		textArea = new Text(group, SWT.SINGLE | SWT.FULL_SELECTION | SWT.BORDER | SWT.PASSWORD);		
174
		formData = new FormData();
175
		formData.left = new FormAttachment(0,5);
176
		formData.top = new FormAttachment(0,5);		
177
		formData.bottom = new FormAttachment(80,-5);
178
		formData.width = 200;
179
		textArea.setLayoutData(formData);		
180
		textArea.addModifyListener(new ModifyListener(){
181
			public void modifyText(ModifyEvent e){
182
				if(textArea.getText().length()>0){										
183
					setPageComplete(true);
184
				}
185
			}
186
		});
187
		return assetViewer;
188
	}
189
	
190
	public Text getTextArea(){
191
		return textArea;
192
	}
193
	
194
	public boolean isEncrypted(){
195
		return isEncrypted;
196
	}
197
198
	private void setSelection()
199
	{
200
		ISelection selection = assetViewer.getSelection();
201
		if(selection != null && !selection.isEmpty())
202
		{ 
203
			Object selectedObject = ((IStructuredSelection)selection).getFirstElement();
204
			if(selectedObject instanceof IDatapool)
205
			{
206
				datapool = (IDatapool)selectedObject;
207
				if(datapool != null)
208
				{
209
					if(DatapoolEncryptManager.isDatapoolEncrypted(datapool)){
210
						isEncrypted = true;
211
						setMessage(NLS.bind(UiPluginResourceBundle.DatapoolExportWizard_encrypted,datapool.getName()), ERROR);
212
						group.setVisible(true);
213
						group.setText(NLS.bind(UiPluginResourceBundle.DatapoolExportWizard_password , datapool.getName()+ ".datapool"));
214
						textArea.setFocus();						
215
						
216
						setPageComplete(false);
217
					}else{		
218
						isEncrypted = false;
219
						setMessage(null);
220
						group.setVisible(false);						
221
						textArea.setText("");						
222
						
223
						setPageComplete(true);
224
						getContainer().updateButtons();
225
					}
226
				}
227
			}
228
		}
229
	}
230
			
231
	private String[] getSupportedFileExtensions()
232
	{
233
	    return new String[]{ICommonConstants.DATAPOOL_FILE_EXTENSION};
234
	}
235
	
236
	
237
}
(-)src/org/eclipse/hyades/test/ui/internal/wizard/DatapoolImportPageTwo.java (-2 / +38 lines)
Lines 33-39 Link Here
33
 * 
33
 * 
34
 * 
34
 * 
35
 * @author  Paul E. Slauenwhite
35
 * @author  Paul E. Slauenwhite
36
 * @version April 1, 2009
36
 * @version April 2, 2009
37
 * @since   October 31, 2008
37
 * @since   October 31, 2008
38
 */
38
 */
39
public class DatapoolImportPageTwo extends DatapoolSelectionPage {
39
public class DatapoolImportPageTwo extends DatapoolSelectionPage {
Lines 45-50 Link Here
45
	}
45
	}
46
	
46
	
47
	/* (non-Javadoc)
47
	/* (non-Javadoc)
48
     * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
49
     */
50
    public void setVisible(boolean visible) {
51
        
52
    	super.setVisible(visible);
53
        
54
    	if (visible){
55
    		
56
    		if(getSelectedDatapool() != null){
57
    			
58
    			if(isSelectedDatapoolEncrypted()){
59
        			encryptedDatapoolPasswordText.setFocus();
60
    			}
61
    			else{
62
    				datapoolSelectionViewer.getViewer().getTree().setFocus();
63
    			}
64
    		}    	
65
    		else {
66
    			useExistingDatapoolButton.setFocus();
67
    		}
68
        }
69
    }
70
    
71
	/* (non-Javadoc)
48
	 * @see org.eclipse.hyades.test.ui.internal.wizard.DatapoolSelectionPage#createControl(org.eclipse.swt.widgets.Composite)
72
	 * @see org.eclipse.hyades.test.ui.internal.wizard.DatapoolSelectionPage#createControl(org.eclipse.swt.widgets.Composite)
49
	 */
73
	 */
50
	public void createControl(Composite parent) {
74
	public void createControl(Composite parent) {
Lines 65-71 Link Here
65
			
89
			
66
	    	public void widgetSelected(SelectionEvent e) {
90
	    	public void widgetSelected(SelectionEvent e) {
67
	    		
91
	    		
68
	    		TestUIUtilities.setEnabled(exisitingDatapoolGroup, useExistingDatapoolButton.getSelection());
92
	    		boolean isEnabled = useExistingDatapoolButton.getSelection();
93
	    		
94
	    		TestUIUtilities.setEnabled(exisitingDatapoolGroup, isEnabled);
95
	    		
96
	    		if((isEnabled) && (getSelectedDatapool() != null)){
97
98
	    			if(isSelectedDatapoolEncrypted()){
99
	        			encryptedDatapoolPasswordText.setFocus();
100
	    			}
101
	    			else{
102
	    				datapoolSelectionViewer.getViewer().getTree().setFocus();
103
	    			}
104
	    		}    
69
	    		
105
	    		
70
	    		setPageComplete(validatePage());
106
	    		setPageComplete(validatePage());
71
			}
107
			}
(-)src/org/eclipse/hyades/test/ui/internal/wizard/DatapoolExportCSVFileLocationPage.java (-4 / +16 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 35-47 Link Here
35
import org.eclipse.swt.widgets.Text;
35
import org.eclipse.swt.widgets.Text;
36
36
37
/**
37
/**
38
 * This wizard page is the first page used in the Export Datapool wizard.
38
 * <p>This wizard page is the first page used in the Export Datapool wizard.
39
 * It allows the user to select a csv file and different export options.
39
 * It allows the user to select a CSV file and different export options.</p>
40
 * 
40
 * 
41
 * 
41
 * 
42
 * @author  Peter Sun
42
 * @author  Peter Sun
43
 * @author  Paul E. Slauenwhite
43
 * @author  Paul E. Slauenwhite
44
 * @version March 4, 2008
44
 * @version April 2, 2009
45
 * @since   February 1, 2005
45
 * @since   February 1, 2005
46
 */
46
 */
47
public class DatapoolExportCSVFileLocationPage extends WizardPage implements ModifyListener, SelectionListener {
47
public class DatapoolExportCSVFileLocationPage extends WizardPage implements ModifyListener, SelectionListener {
Lines 81-86 Link Here
81
        setPageComplete(false);
81
        setPageComplete(false);
82
    }
82
    }
83
83
84
    /* (non-Javadoc)
85
     * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
86
     */
87
    public void setVisible(boolean visible) {
88
        
89
    	super.setVisible(visible);
90
        
91
    	if (visible) {
92
    		csvFileText.setFocus();
93
        }
94
    }
95
    
84
    /**
96
    /**
85
     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
97
     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
86
     */
98
     */
(-)src/org/eclipse/hyades/test/ui/internal/wizard/DatapoolImportPageOne.java (-2 / +14 lines)
Lines 30-37 Link Here
30
 * 
30
 * 
31
 * 
31
 * 
32
 * @author  Paul E. Slauenwhite
32
 * @author  Paul E. Slauenwhite
33
 * @version April 1, 2009
33
 * @version April 2, 2009
34
 * @since   April 1, 2009
34
 * @since   April 2, 2009
35
 */
35
 */
36
public class DatapoolImportPageOne extends WizardPage {
36
public class DatapoolImportPageOne extends WizardPage {
37
37
Lines 41-46 Link Here
41
		super(pageName);
41
		super(pageName);
42
	}	
42
	}	
43
43
44
    /* (non-Javadoc)
45
     * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
46
     */
47
    public void setVisible(boolean visible) {
48
        
49
    	super.setVisible(visible);
50
        
51
    	if (visible) {
52
    		csvFileSelectionComposite.getCSVFileText().setFocus();
53
        }
54
    }
55
    
44
	/* (non-Javadoc)
56
	/* (non-Javadoc)
45
	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
57
	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
46
	 */
58
	 */
(-)src/org/eclipse/hyades/test/ui/internal/wizard/DatapoolExportWizard.java (-6 / +20 lines)
Lines 28-33 Link Here
28
import org.eclipse.hyades.test.ui.UiPlugin;
28
import org.eclipse.hyades.test.ui.UiPlugin;
29
import org.eclipse.hyades.test.ui.datapool.internal.util.CSVImportExportUtil;
29
import org.eclipse.hyades.test.ui.datapool.internal.util.CSVImportExportUtil;
30
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
30
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
31
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
31
import org.eclipse.hyades.test.ui.util.TestUIUtil;
32
import org.eclipse.hyades.test.ui.util.TestUIUtil;
32
import org.eclipse.jface.dialogs.ErrorDialog;
33
import org.eclipse.jface.dialogs.ErrorDialog;
33
import org.eclipse.jface.dialogs.IDialogConstants;
34
import org.eclipse.jface.dialogs.IDialogConstants;
Lines 39-44 Link Here
39
import org.eclipse.swt.widgets.Display;
40
import org.eclipse.swt.widgets.Display;
40
import org.eclipse.ui.IExportWizard;
41
import org.eclipse.ui.IExportWizard;
41
import org.eclipse.ui.IWorkbench;
42
import org.eclipse.ui.IWorkbench;
43
import org.eclipse.ui.PlatformUI;
44
import org.eclipse.ui.help.IWorkbenchHelpSystem;
42
45
43
/**
46
/**
44
 * <p>DatapoolExportWizard.java</p>
47
 * <p>DatapoolExportWizard.java</p>
Lines 46-58 Link Here
46
49
47
 * @author  Peter Sun
50
 * @author  Peter Sun
48
 * @author  Paul E. Slauenwhite
51
 * @author  Paul E. Slauenwhite
49
 * @version April 1, 2009
52
 * @version April 2, 2009
50
 * @since   February 1, 2005
53
 * @since   February 1, 2005
51
 */
54
 */
52
public class DatapoolExportWizard extends Wizard implements IExportWizard {
55
public class DatapoolExportWizard extends Wizard implements IExportWizard {
53
56
54
	private DatapoolSelectionPage datapoolSelectionPage = null;
57
	private DatapoolSelectionPage datapoolSelectionPage = null;
55
	private DatapoolExportCSVFileLocationPage csvFileLocationPage = null;
58
	private DatapoolExportCSVFileLocationPage csvFileLocationPage = null;
59
	private IStructuredSelection selection = null;
56
	
60
	
57
	public DatapoolExportWizard()
61
	public DatapoolExportWizard()
58
	{
62
	{
Lines 66-87 Link Here
66
	public void init(IWorkbench workbench, IStructuredSelection selection) 
70
	public void init(IWorkbench workbench, IStructuredSelection selection) 
67
	{
71
	{
68
		setWindowTitle(UiPluginResourceBundle.WIZ_EXP_DATAPOOL_TTL);
72
		setWindowTitle(UiPluginResourceBundle.WIZ_EXP_DATAPOOL_TTL);
73
		this.selection = selection;
69
	}
74
	}
70
75
71
	/**
76
	/**
72
	 * @see org.eclipse.jface.wizard.IWizard#createPageControls(Composite)
77
	 * @see org.eclipse.jface.wizard.IWizard#createPageControls(Composite)
73
	 */
78
	 */
74
	public void createPageControls(Composite pageContainer)
75
	{
76
		super.createPageControls(pageContainer);		
77
	}
78
79
79
	/* (non-Javadoc)
80
	/* (non-Javadoc)
80
	 * @see org.eclipse.jface.wizard.Wizard#addPages()
81
	 * @see org.eclipse.jface.wizard.Wizard#addPages()
81
	 */
82
	 */
82
	public void addPages(){
83
	public void addPages(){
83
		
84
		
84
		datapoolSelectionPage = new DatapoolSelectionPage("datapoolSelection");
85
		datapoolSelectionPage = new DatapoolSelectionPage("datapoolSelection", selection);
85
		datapoolSelectionPage.setTitle(UiPluginResourceBundle.WIZ_EXP_DATAPOOL_TTL);
86
		datapoolSelectionPage.setTitle(UiPluginResourceBundle.WIZ_EXP_DATAPOOL_TTL);
86
		datapoolSelectionPage.setDescription(UiPluginResourceBundle.WIZ_EXP_DATAPOOL_SEL_PG_DSC);
87
		datapoolSelectionPage.setDescription(UiPluginResourceBundle.WIZ_EXP_DATAPOOL_SEL_PG_DSC);
87
		addPage(datapoolSelectionPage);
88
		addPage(datapoolSelectionPage);
Lines 92-97 Link Here
92
		addPage(csvFileLocationPage);
93
		addPage(csvFileLocationPage);
93
	}
94
	}
94
95
96
	/* (non-Javadoc)
97
	 * @see org.eclipse.jface.wizard.Wizard#createPageControls(org.eclipse.swt.widgets.Composite)
98
	 */
99
	public void createPageControls(Composite parent){
100
		
101
		super.createPageControls(parent);
102
		
103
		//Set the context sensitive help:
104
		IWorkbenchHelpSystem workbenchHelpSystem = PlatformUI.getWorkbench().getHelpSystem();
105
		workbenchHelpSystem.setHelp(datapoolSelectionPage.getControl(), (UiPlugin.getID() + ContextIds.EXPORT_DATAPOOL_AS_CSV_FILE_WIZARD));
106
		workbenchHelpSystem.setHelp(csvFileLocationPage.getControl(), (UiPlugin.getID() + ContextIds.EXPORT_DATAPOOL_AS_CSV_FILE_WIZARD));
107
	}
108
	
95
	public boolean canFinish()
109
	public boolean canFinish()
96
	{
110
	{
97
		return csvFileLocationPage.isPageComplete() && datapoolSelectionPage.isPageComplete();
111
		return csvFileLocationPage.isPageComplete() && datapoolSelectionPage.isPageComplete();
(-)src/org/eclipse/hyades/test/ui/internal/wizard/DatapoolNewWizard.java (-1 / +18 lines)
Lines 28-40 Link Here
28
import org.eclipse.hyades.test.ui.UiPlugin;
28
import org.eclipse.hyades.test.ui.UiPlugin;
29
import org.eclipse.hyades.test.ui.datapool.internal.util.CSVImportExportUtil;
29
import org.eclipse.hyades.test.ui.datapool.internal.util.CSVImportExportUtil;
30
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
30
import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle;
31
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
31
import org.eclipse.hyades.test.ui.internal.util.TestUIUtilities;
32
import org.eclipse.hyades.test.ui.internal.util.TestUIUtilities;
32
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
33
import org.eclipse.hyades.ui.internal.wizard.HyadesNewWizard;
33
import org.eclipse.jface.dialogs.ErrorDialog;
34
import org.eclipse.jface.dialogs.ErrorDialog;
34
import org.eclipse.jface.dialogs.IDialogSettings;
35
import org.eclipse.jface.dialogs.IDialogSettings;
35
import org.eclipse.jface.dialogs.MessageDialog;
36
import org.eclipse.jface.dialogs.MessageDialog;
36
import org.eclipse.jface.window.Window;
37
import org.eclipse.jface.window.Window;
38
import org.eclipse.swt.widgets.Composite;
37
import org.eclipse.ui.PartInitException;
39
import org.eclipse.ui.PartInitException;
40
import org.eclipse.ui.PlatformUI;
41
import org.eclipse.ui.help.IWorkbenchHelpSystem;
38
42
39
/**
43
/**
40
 * <p>Extends the HyadesNewWizard to create the Hyades Generic DataPool.</p>
44
 * <p>Extends the HyadesNewWizard to create the Hyades Generic DataPool.</p>
Lines 44-50 Link Here
44
 * @author  Bianca Xue Jiang
48
 * @author  Bianca Xue Jiang
45
 * @author  Tony Wang
49
 * @author  Tony Wang
46
 * @author  Paul E. Slauenwhite
50
 * @author  Paul E. Slauenwhite
47
 * @version April 1, 2009
51
 * @version April 2, 2009
48
 * @since   February 1, 2005
52
 * @since   February 1, 2005
49
 */
53
 */
50
public class DatapoolNewWizard extends HyadesNewWizard {
54
public class DatapoolNewWizard extends HyadesNewWizard {
Lines 104-109 Link Here
104
		addPage(getAttributeWizardPage());		
108
		addPage(getAttributeWizardPage());		
105
	}
109
	}
106
	
110
	
111
	/* (non-Javadoc)
112
	 * @see org.eclipse.hyades.ui.internal.wizard.HyadesWizard#createPageControls(org.eclipse.swt.widgets.Composite)
113
	 */
114
	public void createPageControls(Composite parent){
115
		
116
		super.createPageControls(parent);
117
		
118
		//Set the context sensitive help:
119
		IWorkbenchHelpSystem workbenchHelpSystem = PlatformUI.getWorkbench().getHelpSystem();
120
		workbenchHelpSystem.setHelp(getLocationPage().getControl(), (UiPlugin.getID() + ContextIds.NEW_DATAPOOL_WIZARD));
121
		workbenchHelpSystem.setHelp(getAttributeWizardPage().getControl(), (UiPlugin.getID() + ContextIds.NEW_DATAPOOL_WIZARD));
122
	}
123
107
	/**
124
	/**
108
	 * @see org.eclipse.hyades.ui.test.internal.wizard.HyadesNewWizard#createObject(org.eclipse.core.resources.IFile)
125
	 * @see org.eclipse.hyades.ui.test.internal.wizard.HyadesNewWizard#createObject(org.eclipse.core.resources.IFile)
109
	 */
126
	 */
(-)src/org/eclipse/hyades/test/ui/internal/wizard/DatapoolSelectionPage.java (-7 / +29 lines)
Lines 38-52 Link Here
38
 * 
38
 * 
39
 * 
39
 * 
40
 * @author  Paul E. Slauenwhite
40
 * @author  Paul E. Slauenwhite
41
 * @version April 1, 2009
41
 * @version April 2, 2009
42
 * @since   October 31, 2008
42
 * @since   October 31, 2008
43
 */
43
 */
44
public class DatapoolSelectionPage extends WizardPage {
44
public class DatapoolSelectionPage extends WizardPage {
45
45
46
	private ProxyNodeSelectionViewer datapoolSelectionViewer = null;
46
	protected ProxyNodeSelectionViewer datapoolSelectionViewer = null;
47
	private Group encryptedDatapoolPasswordGroup = null;
47
	protected Group encryptedDatapoolPasswordGroup = null;
48
	private Text encryptedDatapoolPasswordText = null;	
48
	protected Text encryptedDatapoolPasswordText = null;	
49
	private IStructuredSelection selection = null;
49
	protected IStructuredSelection selection = null;
50
	private IDatapool selectedDatapool = null;
50
	private IDatapool selectedDatapool = null;
51
	private boolean isSelectedDatapoolEncrypted = false;
51
	private boolean isSelectedDatapoolEncrypted = false;
52
52
Lines 61-66 Link Here
61
		this.selection = selection;		
61
		this.selection = selection;		
62
	}
62
	}
63
	
63
	
64
    /* (non-Javadoc)
65
     * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
66
     */
67
    public void setVisible(boolean visible) {
68
        
69
    	super.setVisible(visible);
70
        
71
    	if (visible){
72
    		
73
    		if(getSelectedDatapool() != null){
74
    			
75
    			if(isSelectedDatapoolEncrypted()){
76
        			encryptedDatapoolPasswordText.setFocus();
77
    			}
78
    			else{
79
    				datapoolSelectionViewer.getViewer().getTree().setFocus();
80
    			}
81
    		}    	
82
    		else {
83
    			datapoolSelectionViewer.getFilterButton().setFocus();
84
    		}
85
        }
86
    }
87
64
	/* (non-Javadoc)
88
	/* (non-Javadoc)
65
	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
89
	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
66
	 */
90
	 */
Lines 134-141 Link Here
134
		//Force the validation of the selection:
158
		//Force the validation of the selection:
135
		datapoolSelectionViewer.setSelection();
159
		datapoolSelectionViewer.setSelection();
136
160
137
		setPageComplete(false);
138
139
		pane.layout(false, true);
161
		pane.layout(false, true);
140
	    				
162
	    				
141
		setControl(pane);
163
		setControl(pane);
(-)src/org/eclipse/hyades/test/ui/internal/resources/messages.properties (-7 / +7 lines)
Lines 310-316 Link Here
310
# Test Suite -> Test and Execution History -> Test Log
310
# Test Suite -> Test and Execution History -> Test Log
311
311
312
# Words
312
# Words
313
W_TST_SUITE                  = Test
313
W_TST_SUITE                  = Tests
314
314
315
W_DETAIL                     = Detail
315
W_DETAIL                     = Detail
316
W_EXECUTION                  = Execution
316
W_EXECUTION                  = Execution
Lines 391-398 Link Here
391
391
392
WIZ_DATAPOOL_CSV_PG_SEL		 	 = C&SV File:
392
WIZ_DATAPOOL_CSV_PG_SEL		 	 = C&SV File:
393
WIZ_DATAPOOL_CSV_PG_ENC		 	 = &Encoding:
393
WIZ_DATAPOOL_CSV_PG_ENC		 	 = &Encoding:
394
WIZ_DATAPOOL_CSV_PG_COL_HEADER	 = First r&ow contains variable names and optional suggested types.
394
WIZ_DATAPOOL_CSV_PG_COL_HEADER	 = First r&ow of the CSV file contains the variable names and optional suggested types.
395
WIZ_DATAPOOL_CSV_PG_ROW_HEADER	 = First &column contains equivalence class names and optional row numbers.
395
WIZ_DATAPOOL_CSV_PG_ROW_HEADER	 = First &column of the CSV file contains the equivalence class names and optional record numbers.
396
396
397
WIZ_DATAPOOL_CSV_FILE_OPEN		 = Select a CSV File:
397
WIZ_DATAPOOL_CSV_FILE_OPEN		 = Select a CSV File:
398
398
Lines 407-415 Link Here
407
WIZ_EXP_DATAPOOL_TTL			 = Export Datapool as CSV File
407
WIZ_EXP_DATAPOOL_TTL			 = Export Datapool as CSV File
408
WIZ_EXP_DATAPOOL_SEL_PG_DSC		 = Select the datapool to export to the CSV file.
408
WIZ_EXP_DATAPOOL_SEL_PG_DSC		 = Select the datapool to export to the CSV file.
409
WIZ_EXP_DATAPOOL_CSV_PG_DSC		 = Select the location and options of the exported CSV file.
409
WIZ_EXP_DATAPOOL_CSV_PG_DSC		 = Select the location and options of the exported CSV file.
410
WIZ_EXP_DATAPOOL_CSV_PG_VAR	 	 = E&xport variable names and suggested types in the first row.
410
WIZ_EXP_DATAPOOL_CSV_PG_VAR	 	 = E&xport the variable names and suggested types to the first row of the CSV file.
411
WIZ_EXP_DATAPOOL_CSV_PG_EC		 = Ex&port equivalence class names and row numbers in the first column.
411
WIZ_EXP_DATAPOOL_CSV_PG_EC		 = Ex&port the equivalence class names and record numbers to the first column of the CSV file.
412
WIZ_EXP_DATAPOOL_CSV_PG_TAG		 = Enc&lose cell values in tags.
412
WIZ_EXP_DATAPOOL_CSV_PG_TAG		 = Enc&lose cell values in XML tags.
413
413
414
WIZ_EXP_DATAPOOL_MSG_EXISTS		 = {0} already exists.\nDo you want to replace it?
414
WIZ_EXP_DATAPOOL_MSG_EXISTS		 = {0} already exists.\nDo you want to replace it?
415
415
Lines 604-610 Link Here
604
ENV_DESCRIPTION              = Description
604
ENV_DESCRIPTION              = Description
605
ADD_ENV_DESC_DLG             = Add Environment Setting
605
ADD_ENV_DESC_DLG             = Add Environment Setting
606
EDIT_ENV_DESC_DLG            = Edit Environment Setting
606
EDIT_ENV_DESC_DLG            = Edit Environment Setting
607
SHOW_FOLDERS                 = &Show Folders
607
SHOW_FOLDERS                 = &Show folders
608
608
609
#Test preference page
609
#Test preference page
610
DEFAULT_HOST_NAME            = Default &host name or IP address:
610
DEFAULT_HOST_NAME            = Default &host name or IP address:
(-)infopop/recorderUI.xml (-2 / +2 lines)
Lines 11-17 Link Here
11
<?NLS TYPE="org.eclipse.help.contexts"?>
11
<?NLS TYPE="org.eclipse.help.contexts"?>
12
<contexts>
12
<contexts>
13
13
14
<!-- Create New Test From Recording wizard: -->
14
<!-- New Test From Recording wizard: -->
15
<context id="recw0001">
15
<context id="recw0001">
16
<description>Create a new test from a new or existing recording of user interactions with an application.</description>
16
<description>Create a new test from a new or existing recording of user interactions with an application.</description>
17
<topic href="../org.eclipse.hyades.test.doc.user/tasks/tcreatetestfromrecording.htm" label="Creating a test from a recording"/>
17
<topic href="../org.eclipse.hyades.test.doc.user/tasks/tcreatetestfromrecording.htm" label="Creating a test from a recording"/>
Lines 19-25 Link Here
19
19
20
<!-- Recorder Control view: -->
20
<!-- Recorder Control view: -->
21
<context id="recv0001">
21
<context id="recv0001">
22
<description>View to control and monitor recorders.</description>
22
<description>Control and monitor recorders.</description>
23
<topic href="../org.eclipse.hyades.test.doc.user/concepts/crecordercontrolview.htm" label="Recorder Control View"/>
23
<topic href="../org.eclipse.hyades.test.doc.user/concepts/crecordercontrolview.htm" label="Recorder Control View"/>
24
</context>
24
</context>
25
25
(-)infopop/testDatapool.xml (-16 / +19 lines)
Lines 1-6 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
2
<!--
3
Copyright (c) 2005, 2008 IBM Corporation and others. 
3
Copyright (c) 2005, 2009 IBM Corporation and others. 
4
All rights reserved.   This program and the accompanying materials 
4
All rights reserved.   This program and the accompanying materials 
5
are made available under the terms of the Eclipse Public License v1.0 
5
are made available under the terms of the Eclipse Public License v1.0 
6
which accompanies this distribution, and is available at 
6
which accompanies this distribution, and is available at 
Lines 11-35 Link Here
11
<?NLS TYPE="org.eclipse.help.contexts"?>
11
<?NLS TYPE="org.eclipse.help.contexts"?>
12
<contexts>
12
<contexts>
13
13
14
<context id="dplo0001">
14
<!-- Datapool Editor: -->
15
<!--Datapool Definition Description-->
15
<context id="dpld0001">
16
<description>An overview of the datapool.</description>
16
<description>Edit the structure of datapools.</description>
17
<topic href="../org.eclipse.hyades.test.doc.user/tasks/teditdp.htm" label="Editing a datapool"/>
17
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapooleditor.htm" label="Datapool Editor"/>
18
<topic href="../org.eclipse.hyades.test.doc.user/tasks/taccessdp.htm" label="Accessing a datapool from a Hyades Test"/>
19
</context>
18
</context>
20
19
21
<context id="dplt0001">
20
<!-- New Datapool wizard: -->
22
<!--Datapool Data Table Description-->
21
<context id="dplw0001">
23
<description>Datapools contain data that tests can use when they run.  You can add Variables (columns), Records (rows) and Equivalence Classes (groups of related Records), and can then populate the table with data which wil be used by your Hyades test.</description>
22
<description>Create a new datapool.</description>
24
<topic href="../org.eclipse.hyades.test.doc.user/tasks/teditdp.htm" label="Editing a datapool"/>
23
<topic href="../org.eclipse.hyades.test.doc.user/tasks/tcreatedatapool.htm" label="Creating a datapool"/>
25
<topic href="../org.eclipse.hyades.test.doc.user/tasks/taccessdp.htm" label="Accessing a datapool from a Hyades Test"/>
26
</context>
24
</context>
27
25
28
<context id="dpld0001">
26
<!-- Import CSV File as Datapool wizard: -->
29
<!-- Datapool base dialog: -->
27
<context id="dplw0002">
30
<description>Edit the structure of the datapool.</description>
28
<description>Import a Comma-Separated Value (CSV) file into a new or existing new datapool.</description>
31
<topic href="../org.eclipse.hyades.test.doc.user/concepts/cdatapools.htm" label="Datapool structure"/>
29
<topic href="../org.eclipse.hyades.test.doc.user/tasks/cdatapoolimport.htm" label="Importing a Comma-Separated Value (CSV) file as a datapool"/>
32
<topic href="../org.eclipse.hyades.test.doc.user/tasks/teditdp.htm" label="Editing a datapool"/>
30
</context>
31
32
<!-- Export Datapool as CSV File wizard: -->
33
<context id="dplw0003">
34
<description>Export a datapool to a Comma-Separated Value (CSV) file.</description>
35
<topic href="../org.eclipse.hyades.test.doc.user/tasks/cdatapoolexport.htm" label="Exporting a datapool as a Comma-Separated Value (CSV) file"/>
33
</context>
36
</context>
34
37
35
</contexts>
38
</contexts>
(-)src/org/eclipse/hyades/test/ui/datapool/internal/dialog/DatapoolBaseDialog.java (-6 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 12-18 Link Here
12
package org.eclipse.hyades.test.ui.datapool.internal.dialog;
12
package org.eclipse.hyades.test.ui.datapool.internal.dialog;
13
13
14
import org.eclipse.hyades.test.ui.UiPlugin;
14
import org.eclipse.hyades.test.ui.UiPlugin;
15
import org.eclipse.hyades.test.ui.datapool.internal.util.ContextIds;
15
import org.eclipse.hyades.test.ui.internal.util.ContextIds;
16
import org.eclipse.jface.dialogs.IDialogConstants;
16
import org.eclipse.jface.dialogs.IDialogConstants;
17
import org.eclipse.jface.dialogs.TrayDialog;
17
import org.eclipse.jface.dialogs.TrayDialog;
18
import org.eclipse.swt.widgets.Button;
18
import org.eclipse.swt.widgets.Button;
Lines 22-34 Link Here
22
import org.eclipse.ui.PlatformUI;
22
import org.eclipse.ui.PlatformUI;
23
23
24
/**
24
/**
25
 * A base dialog for all other datapool dialogs with OK (default)
25
 * <p>A base dialog for all other datapool dialogs with OK (default)
26
 * and Cancel buttons.
26
 * and Cancel buttons.</p>
27
 * 
27
 * 
28
 * 
28
 * 
29
 * @author  Bianca Xue Jiang
29
 * @author  Bianca Xue Jiang
30
 * @author  Paul Slauenwhite
30
 * @author  Paul Slauenwhite
31
 * @version November 21, 2008
31
 * @version April 2, 2009
32
 * @since   January 27, 2005
32
 * @since   January 27, 2005
33
 */
33
 */
34
public class DatapoolBaseDialog extends TrayDialog {
34
public class DatapoolBaseDialog extends TrayDialog {
Lines 52-58 Link Here
52
	 */
52
	 */
53
	protected Control createDialogArea(Composite parent){
53
	protected Control createDialogArea(Composite parent){
54
		
54
		
55
		//Set the context sensitive help for the dialog:
55
		//Set the context sensitive help:
56
		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, UiPlugin.getID() + ContextIds.DATA_BASE_DIALOG);
56
		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, UiPlugin.getID() + ContextIds.DATA_BASE_DIALOG);
57
		
57
		
58
		return (super.createDialogArea(parent));
58
		return (super.createDialogArea(parent));
(-)src/org/eclipse/hyades/test/ui/internal/component/ProxyNodeSelectionViewer.java (-2 / +7 lines)
Lines 40-51 Link Here
40
 * 
40
 * 
41
 * 
41
 * 
42
 * @author  Paul E. Slauenwhite
42
 * @author  Paul E. Slauenwhite
43
 * @version April 1, 2009
43
 * @version April 2, 2009
44
 * @since   October 31, 2008
44
 * @since   October 31, 2008
45
 */
45
 */
46
public class ProxyNodeSelectionViewer {
46
public class ProxyNodeSelectionViewer {
47
	
47
	
48
	private TreeViewer assetViewer = null;
48
	private TreeViewer assetViewer = null;
49
	private Button filterButton = null;
49
	private ProxyNodeContentProvider contentProvider = null;
50
	private ProxyNodeContentProvider contentProvider = null;
50
	private List selectedProxyNodes = null;
51
	private List selectedProxyNodes = null;
51
	
52
	
Lines 74-79 Link Here
74
		}
75
		}
75
	}
76
	}
76
77
78
	public Button getFilterButton() {
79
		return filterButton;
80
	}
81
77
	public TreeViewer getViewer(){
82
	public TreeViewer getViewer(){
78
		return assetViewer;
83
		return assetViewer;
79
	}
84
	}
Lines 136-142 Link Here
136
			}
141
			}
137
		});
142
		});
138
		
143
		
139
		final Button filterButton = new Button(composite, SWT.CHECK);
144
		filterButton = new Button(composite, SWT.CHECK);
140
		filterButton.setText(UiPluginResourceBundle.SHOW_FOLDERS); 
145
		filterButton.setText(UiPluginResourceBundle.SHOW_FOLDERS); 
141
		filterButton.addSelectionListener(new SelectionAdapter(){
146
		filterButton.addSelectionListener(new SelectionAdapter(){
142
			
147
			
(-)src/org/eclipse/hyades/test/ui/datapool/internal/util/ContextIds.java (-59 lines)
Removed Link Here
1
/**********************************************************************
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
3
 * All rights reserved.   This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * $Id: ContextIds.java,v 1.3 2008/11/21 18:44:37 paules Exp $
8
 * 
9
 * Contributors: 
10
 * IBM - Initial API and implementation
11
 **********************************************************************/
12
package org.eclipse.hyades.test.ui.datapool.internal.util;
13
14
/**
15
 * Context IDs
16
 * 
17
 * 
18
 * @author  Paul Slauenwhite
19
 * @version November 21, 2008
20
 * @since   January 1, 2005
21
 */
22
public class ContextIds {
23
	
24
	// Added to support datapool editing (PBS 12/06/03)
25
	// datapool editor
26
	public static final String DATA_FORM = ".datf0001";	//$NON-NLS-1$
27
	public static final String DATA_TEXT_FORM = ".datf0002"; //$NON-NLS-1$		
28
	public static final String DATA_NAME_FORM = ".datf0003"; //$NON-NLS-1$
29
	
30
	public static final String DATA_TABLE_FORM = ".datbf0001"; //$NON-NLS-1$	
31
32
	//Datapool base dialog ID:
33
	public static final String DATA_BASE_DIALOG = ".dpld0001"; //$NON-NLS-1$	
34
35
	// insert column action
36
	public static final String INS_COL_ACT = ".ica0001"; //$NON-NLS-1$	
37
	// delete column action
38
	public static final String DEL_COL_ACT = ".dca0001"; //$NON-NLS-1$
39
	// edit column action
40
	public static final String EDIT_COL_ACT = ".eca0001"; //$NON-NLS-1$
41
	// insert row action
42
	public static final String INS_ROW_ACT = ".ira0001"; //$NON-NLS-1$
43
	// delete row action
44
	public static final String DEL_ROW_ACT = ".dra0001"; //$NON-NLS-1$
45
	// edit row action
46
	public static final String EDIT_ROW_ACT = ".era0001"; //$NON-NLS-1$
47
	// insert row group action
48
	public static final String INS_ROW_GRP_ACT = ".irga0001"; //$NON-NLS-1$
49
	// delete row group action
50
	public static final String DEL_ROW_GRP_ACT = ".drga0001"; //$NON-NLS-1$
51
	// edit row group action
52
	public static final String EDIT_ROW_GRP_ACT = ".erga0001"; //$NON-NLS-1$
53
	// cut group action
54
	public static final String CUT_ACT = ".cuta0001"; //$NON-NLS-1$
55
	// copy action
56
	public static final String COPY_ACT = ".cpya0001"; //$NON-NLS-1$
57
	// paste action
58
	public static final String PASTE_ACT = ".psta0001"; //$NON-NLS-1$
59
}
(-)plugin.properties (-2 / +2 lines)
Lines 118-127 Link Here
118
Shortcut.RunMenu=Test
118
Shortcut.RunMenu=Test
119
119
120
# Datapool and CSV import and export:
120
# Datapool and CSV import and export:
121
WIZARD_IMPORT_DATAPOOL_NAME        = CSV File as Datapool.
121
WIZARD_IMPORT_DATAPOOL_NAME        = CSV File as Datapool
122
WIZARD_IMPORT_DATAPOOL_DESCRIPTION = Import a CSV file as a datapool.
122
WIZARD_IMPORT_DATAPOOL_DESCRIPTION = Import a CSV file as a datapool.
123
123
124
WIZARD_EXPORT_DATAPOOL_NAME        = Datapool as CSV File.
124
WIZARD_EXPORT_DATAPOOL_NAME        = Datapool as CSV File
125
WIZARD_EXPORT_DATAPOOL_DESCRIPTION = Export a datapool as a CSV file.
125
WIZARD_EXPORT_DATAPOOL_DESCRIPTION = Export a datapool as a CSV file.
126
126
127
GENERATE_TEST_TOOLTIP        = Generate Test
127
GENERATE_TEST_TOOLTIP        = Generate Test
(-)tasks/tcreatetestdeployment.htm (-3 / +2 lines)
Lines 30-39 Link Here
30
<p>Test deployments are created with the <b>New Deployment</b> wizard:</p>
30
<p>Test deployments are created with the <b>New Deployment</b> wizard:</p>
31
31
32
<ol>
32
<ol>
33
	<li>Right-click in the Test Navigator and select <b>New</b> &gt; <b>Test Element...</b>.</li>
33
	<li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, and select <b>New</b> &gt; <b>Test Element...</b> &gt; <b>Test Assets</b> &gt; <b>Deployment</b>, and click <b>Next</b>.</li>
34
	<li>Select <b>Test Assets</b> &gt; <b>Deployment</b> and click <b>Next</b>.</li>
35
    <li>Select the parent folder and define the name of the test deployment and click <b>Next</b>.</li>
34
    <li>Select the parent folder and define the name of the test deployment and click <b>Next</b>.</li>
36
    <li>Optionally, provide a description for the test deployment and click <b>Next</b>.</li>
35
    <li>Provide a description for the test deployment and click <b>Next</b>.</li>
37
    <li>Select or create the associated test artifacts by clicking the <b>New...</b> button and 
36
    <li>Select or create the associated test artifacts by clicking the <b>New...</b> button and 
38
    selecting the test artifacts or creating a <a href="tcreateartifact.htm">new test artifact</a>.
37
    selecting the test artifacts or creating a <a href="tcreateartifact.htm">new test artifact</a>.
39
    Selected test artifacts can be removed (<b>Remove</b>), moved up (<b>Up</b>), or moved down (<b>Down</b>).</li>
38
    Selected test artifacts can be removed (<b>Remove</b>), moved up (<b>Up</b>), or moved down (<b>Down</b>).</li>
(-)tasks/trun.htm (-1 / +1 lines)
Lines 26-32 Link Here
26
26
27
<p>There are a number of options available to run a test.</p>
27
<p>There are a number of options available to run a test.</p>
28
28
29
<p>You can right-click on it in the Test Navigator and select <b>Run As</b> &gt; <b>Run</b> or
29
<p>You can right-click on it in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a> and select <b>Run As</b> &gt; <b>Run</b> or
30
 <b>Run As</b> &gt; <b>Test</b>. If the latter option is chosen,  TPTP will automatically run the selected test without invoking the launch configuration dialog.&nbsp;</p>
30
 <b>Run As</b> &gt; <b>Test</b>. If the latter option is chosen,  TPTP will automatically run the selected test without invoking the launch configuration dialog.&nbsp;</p>
31
31
32
<p>If the former option is selected, the launch configuration dialog will be opened and the 
32
<p>If the former option is selected, the launch configuration dialog will be opened and the 
(-)tasks/tcreatingaperformancetest.htm (-2 / +2 lines)
Lines 3-9 Link Here
3
3
4
<!-- 
4
<!-- 
5
/**********************************************************************
5
/**********************************************************************
6
 * Copyright (c) 2008 IBM Corporation.
6
 * Copyright (c) 2008, 2009 IBM Corporation.
7
 * All rights reserved.   This content
7
 * All rights reserved.   This content
8
 * is made available under the terms of the Eclipse Public License v1.0
8
 * is made available under the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
9
 * which accompanies this distribution, and is available at
Lines 37-43 Link Here
37
	<li>Click <b>File &gt; New &gt; Other</b>. The <b>New</b> dialog appears.</li>
37
	<li>Click <b>File &gt; New &gt; Other</b>. The <b>New</b> dialog appears.</li>
38
	<li>Expand the <b>Test</b> folder, then select <b>TPTP URL Test</b>.</li>
38
	<li>Expand the <b>Test</b> folder, then select <b>TPTP URL Test</b>.</li>
39
	<li>Click <b>Next</b>, select the location (the project created in step 1), and name the performance test suite, for example, <i>examplePerformanceTest</i>.</li>
39
	<li>Click <b>Next</b>, select the location (the project created in step 1), and name the performance test suite, for example, <i>examplePerformanceTest</i>.</li>
40
	<li>Click <b>Next</b> and optionally provide a description for the performance test suite. Click <b>Finish</b>.</li>
40
	<li>Click <b>Next</b> and provide a description for the performance test suite. Click <b>Finish</b>.</li>
41
    <li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new performance test suite is to be opened in the URL Test editor.</li>
41
    <li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new performance test suite is to be opened in the URL Test editor.</li>
42
</ol>
42
</ol>
43
</div>
43
</div>
(-)tasks/tgenerateexecutabletest.htm (-2 / +2 lines)
Lines 3-9 Link Here
3
<html lang="en-us" xml:lang="en-us">
3
<html lang="en-us" xml:lang="en-us">
4
<!-- 
4
<!-- 
5
/**********************************************************************
5
/**********************************************************************
6
 * Copyright (c) 2004, 2008 IBM Corporation.
6
 * Copyright (c) 2004, 2009 IBM Corporation.
7
 * All rights reserved.   This content
7
 * All rights reserved.   This content
8
 * is made available under the terms of the Eclipse Public License v1.0
8
 * is made available under the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
9
 * which accompanies this distribution, and is available at
Lines 45-51 Link Here
45
source code into an executable test.</p>
45
source code into an executable test.</p>
46
</div>
46
</div>
47
<div class="skipspace">To generate a test's source code:</div>
47
<div class="skipspace">To generate a test's source code:</div>
48
<ol><li class="skipspace"><span>In the Test Navigator, right-click the test to be run and select <span class="uicontrol">Generate</span>. </span> The <span class="uicontrol">JUnit Test Definition Code Generation</span> dialog
48
<ol><li class="skipspace"><span>In the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click the test to be run and select <span class="uicontrol">Generate</span>. </span> The <span class="uicontrol">JUnit Test Definition Code Generation</span> dialog
49
box opens.</li>
49
box opens.</li>
50
<li class="skipspace"><span>In the <span class="uicontrol">Source Folder</span> field, accept the default
50
<li class="skipspace"><span>In the <span class="uicontrol">Source Folder</span> field, accept the default
51
or click <span class="uicontrol">Browse</span> to select the source folder in a Java project in which
51
or click <span class="uicontrol">Browse</span> to select the source folder in a Java project in which
(-)tasks/tcreatetestfromrecording.htm (-2 / +2 lines)
Lines 29-35 Link Here
29
<p>Tests are created from new recordings with the <b>New Test From Recording</b> wizard:</p>
29
<p>Tests are created from new recordings with the <b>New Test From Recording</b> wizard:</p>
30
30
31
<ol>
31
<ol>
32
	<li>Right-click in the Test Navigator, select <b>New</b> &gt; <b>Test Element...</b> &gt; <b>Test From Recording</b>, and click <b>Next</b>.  Alternatively, click the <b>New Test From Recording</b> button in the toolbar of the <a href="../concepts/crecordercontrolview.htm">Recorder Control View</a>.</li>
32
	<li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, select <b>New</b> &gt; <b>Test Element...</b> &gt; <b>Test From Recording</b>, and click <b>Next</b>.  Alternatively, click the <b>New Test From Recording</b> button in the toolbar of the <a href="../concepts/crecordercontrolview.htm">Recorder Control View</a>.</li>
33
    <li>Select <b>Create the test from a new recording</b>.</li>
33
    <li>Select <b>Create the test from a new recording</b>.</li>
34
    <li>Select the recorder to record the new recording.  A description of the selected recorder is displayed below the list of recorders.</li>
34
    <li>Select the recorder to record the new recording.  A description of the selected recorder is displayed below the list of recorders.</li>
35
    <li>Optionally, click <b>Advanced &gt;&gt;</b> and select a different test generator to create the new test from the new recording.</li> 
35
    <li>Optionally, click <b>Advanced &gt;&gt;</b> and select a different test generator to create the new test from the new recording.</li> 
Lines 42-48 Link Here
42
<p>In addition, tests can be created from existing recordings with the <b>New Test From Recording</b> wizard:</p>
42
<p>In addition, tests can be created from existing recordings with the <b>New Test From Recording</b> wizard:</p>
43
43
44
<ol>
44
<ol>
45
	<li>Right-click in the Test Navigator, select <b>New</b> &gt; <b>Test Element...</b> &gt; <b>Test From Recording</b>, and click <b>Next</b>.  Alternatively, click the <b>New Test From Recording</b> button in the toolbar of the <a href="../concepts/crecordercontrolview.htm">Recorder Control View</a>.</li>
45
	<li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, select <b>New</b> &gt; <b>Test Element...</b> &gt; <b>Test From Recording</b>, and click <b>Next</b>.  Alternatively, click the <b>New Test From Recording</b> button in the toolbar of the <a href="../concepts/crecordercontrolview.htm">Recorder Control View</a>.</li>
46
    <li>Select <b>Test From Recording</b> and click <b>Next</b>.</li>
46
    <li>Select <b>Test From Recording</b> and click <b>Next</b>.</li>
47
    <li>Select <b>Create the test from an existing recording</b>.</li>
47
    <li>Select <b>Create the test from an existing recording</b>.</li>
48
    <li>Select the recorder that was used to record the existing recording.  A description of the selected recorder is displayed below the list of recorders.</li>
48
    <li>Select the recorder that was used to record the existing recording.  A description of the selected recorder is displayed below the list of recorders.</li>
(-)tasks/tcreatelocation.htm (-3 / +2 lines)
Lines 31-40 Link Here
31
<p>Test locations are created with the <b>New Location</b> wizard:</p>
31
<p>Test locations are created with the <b>New Location</b> wizard:</p>
32
32
33
<ol>
33
<ol>
34
	<li>Right-click in the Test Navigator and select <b>New</b> &gt; <b>Test Element...</b>.</li>
34
	<li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, and select <b>New</b> &gt; <b>Test Element...</b> &gt; <b>Test Assets</b> &gt; <b>Location</b>, and click <b>Next</b>.</li>
35
	<li>Select <b>Test Assets</b> &gt; <b>Location</b> and click <b>Next</b>.</li>
36
    <li>Select the parent folder and define the name of the test location and click <b>Next</b>.</li>
35
    <li>Select the parent folder and define the name of the test location and click <b>Next</b>.</li>
37
    <li>Optionally, provide a description for the test location and click <b>Next</b>.</li>
36
    <li>Provide a description for the test location and click <b>Next</b>.</li>
38
    <li>Enter the host name or IP address of the target host. By default, <i>localhost</i> is entered.  Test the 
37
    <li>Enter the host name or IP address of the target host. By default, <i>localhost</i> is entered.  Test the 
39
    connection to the target host by clicking the <b>Test Connection</b> link<sup>1</sup>.</li>
38
    connection to the target host by clicking the <b>Test Connection</b> link<sup>1</sup>.</li>
40
    <li>Click <b>Finish</b> to create the test location.</li>
39
    <li>Click <b>Finish</b> to create the test location.</li>
(-)tasks/tcreatetestreports.htm (-2 / +2 lines)
Lines 64-73 Link Here
64
64
65
<p>Generate a test report:</p>
65
<p>Generate a test report:</p>
66
<ol>
66
<ol>
67
  <li>Right-click on a test suite in the Test Navigator and select <b>Report... </b>.</li>
67
  <li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click on a test suite in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, and select <b>Report... </b>.</li>
68
  <li>Select one of the test report types and click <b>Next </b>.</li>
68
  <li>Select one of the test report types and click <b>Next </b>.</li>
69
  <li>Select the parent folder and define the name of the test report and click <b>Next</b>.</li>
69
  <li>Select the parent folder and define the name of the test report and click <b>Next</b>.</li>
70
  <li>Optionally, provide the report window (start and end data and time) for the test report.</li>
70
  <li>Provide the report window (start and end data and time) for the test report.</li>
71
  <li>Click <b>Finish </b> to generate the test report.</li>
71
  <li>Click <b>Finish </b> to generate the test report.</li>
72
  <li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new test report is to be opened in the internal Web Browser.</li>	
72
  <li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new test report is to be opened in the internal Web Browser.</li>	
73
</ol>
73
</ol>
(-)tasks/tcreateperformancetestreports.htm (-2 / +2 lines)
Lines 78-87 Link Here
78
78
79
<p>Generate a performance test report:</p>
79
<p>Generate a performance test report:</p>
80
<ol>
80
<ol>
81
  <li>Right-click on a performance test suite in the Test Navigator and select <b>Report... </b>.</li>
81
  <li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click on a performance test suite in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, and select <b>Report... </b>.</li>
82
  <li>Select one of the performance test report types and click <b>Next </b>.</li>
82
  <li>Select one of the performance test report types and click <b>Next </b>.</li>
83
  <li>Select the parent folder and define the name of the performance test report and click <b>Next</b>.</li>
83
  <li>Select the parent folder and define the name of the performance test report and click <b>Next</b>.</li>
84
  <li>Optionally, provide the report window (start and end data and time) for the performance test report.</li>
84
  <li>Provide the report window (start and end data and time) for the performance test report.</li>
85
  <li>Click <b>Finish </b> to generate the performance test report.</li>
85
  <li>Click <b>Finish </b> to generate the performance test report.</li>
86
  <li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new performance test report is to be opened in the internal Web Browser.</li>	
86
  <li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new performance test report is to be opened in the internal Web Browser.</li>	
87
</ol>
87
</ol>
(-)tasks/tcreatedp.htm (-99 lines)
Removed Link Here
1
<!DOCTYPE html
2
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html lang="en-us" xml:lang="en-us">
4
<!-- 
5
/**********************************************************************
6
 * Copyright (c) 2004, 2008 IBM Corporation.
7
 * All rights reserved.   This content
8
 * is made available under the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
10
 * http://www.eclipse.org/legal/epl-v10.html        
11
 * $Id: tcreatedp.htm,v 1.15 2008/07/17 19:07:12 paules Exp $
12
 *
13
 * Contributors:
14
 * IBM - Initial contribution
15
 **********************************************************************/  
16
 -->
17
<head>
18
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
19
<meta name="security" content="public" />
20
<meta name="Robots" content="index,follow" />
21
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
22
<meta name="DC.Type" content="task" />
23
<meta name="DC.Title" content="Creating a datapool" />
24
<meta name="abstract" content="Datapools contain data that tests can use when they run." />
25
<meta name="description" content="Datapools contain data that tests can use when they run." />
26
<meta name="DC.Relation" scheme="URI" content="../tasks/tdatapool.dita" />
27
<meta name="DC.Format" content="XHTML" />
28
<meta name="DC.Identifier" content="tcreatedp" />
29
<meta name="DC.Language" content="en-us" />
30
<link rel="stylesheet" type="text/css" href="../css/ibmdita.css" />
31
<link rel="stylesheet" type="text/css" href="../css/swg_info_common.css" />
32
<title>Creating a datapool</title>
33
</head>
34
<body><a name="tcreatedp"><!-- --></a>
35
36
<h1 class="topictitle1">Creating a datapool</h1>
37
<div><p>Datapools contain data that tests can use when they run.</p>
38
<div class="skipspace">To create a datapool, do the following.</div>
39
<ol><li class="skipspace"><span>Open the Test perspective.</span>
40
	<ul>
41
		<li>From the File menu, choose <b>Window &gt; Open Perspective &gt;
42
		Other</b>.</li>
43
		<li>Select <b>Test</b> and click <b>OK</b>. The Test Navigator
44
		appears.</li>
45
		</ul>
46
	</li>
47
<li class="skipspace"><span>In the Test Navigator, right-click a project
48
	and select <span class="uicontrol">New &gt; Test Elemen<b>t</b></span><b>...</b>. The <span
49
		class="uicontrol">New Test Element </span> dialog appears.</span></li>
50
	<li class="skipspace"><span>In the Wizards list box, expand the <span class="uicontrol">Test Assets</span> folder and
51
select <span class="uicontrol">Datapool</span>.</span></li>
52
<li class="skipspace"><span>Click <b>Next</b>. The <span class="uicontrol">New Datapool</span> dialog
53
appears.</span></li>
54
<li class="skipspace"><span>Choose the datapool project folder and datapool name. In the list of existing projects, select the project to store the datapool.  </span>  You can store datapools
55
in any kind of project (Java, Simple, etc.). You do not have to store datapools with the
56
	tests that use them. <span>In the <span class="uicontrol">Name</span>
57
	field, enter the name of the new datapool.</span> Click <b>Finish</b> to create an empty datapool with default settings or click <b>Next</b> to continue.</li>
58
	<li class="skipspace">Optionally, enter a description and initial dimensions for the datapool. Click <b>Next</b> to continue.</li>
59
	<li class="skipspace">Optionally, import data contained in an existing CSV file (comma-separated value text file).
60
	<ul>
61
		<li><span>In the <span class="uicontrol">CSV File</span> field, type
62
		the name of a CSV file or click <span class="uicontrol">Browse</span>
63
		to navigate to the file.</span></li>
64
		<li><span>If the data in the CSV file is encoded differently from what
65
		the local computer expects, select the encoding from the <span
66
			class="uicontrol">Import Encoding</span> drop down menu.</span></li>
67
		<li><span>The first row of the CSV file may contain column names. If
68
		it does, check the box beside <span class="uicontrol">First row
69
		contains variable names and suggested types</span>.</span> If this box is not checked, default
70
variable names and types such as Variable1::String are used. You can easily change the names using the datapool editor.</li>
71
		<li><span>If the first column of your CSV file contains </span>equivalence class names, check <span><span
72
			class="uicontrol">First column contains equivalence class names</span></span>. Equivalence classes group related data. The following example shows a CSV file with two equivalence
73
		classes, flowers and vegetables.<pre>,ModelNumber::String,Description::String,Price::Double
74
flowers,F0001,Orchid,5.99<br />flowers,F0002,Tulip,1.99<br />flowers,F0003,Yellow Carnation,6.99<br />flowers,F0004,White Rose,9.99<br />flowers,F0005,Geraniums,4.99<br />vegetables,F0006,Cabbage,0.99<br />vegetables,F0007,Lettuce,0.99<br />vegetables,F0008,Tomatoes,0.25<br />vegetables,F0009,Celery,0.35<br />vegetables,F0010,Cucumbers,0.4</pre>Note: if your CSV file does not include equivalence class names, all imported rows are grouped under a single equivalence class.</li>
75
	</ul>
76
	</li><li class="skipspace"><span>Click <span class="uicontrol">Finish</span>.</span> If you specified initial datapool dimensions, which may conflict with the CSV file dimensions, a dialog appears. Click <b>Yes</b> to use the dimensions of the CSV file. Click <b>No</b> to use the specified initial dimensions (and possibly truncate the CSV file data). The Datapool editor appears, showing the
77
	datapool's first equivalence class. <br />
78
	</li>
79
	<li class="skipspace">The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new datapool is to be opened in the Datapool editor.<br />
80
	</li>
81
	
82
</ol>
83
<div class="skipspace"><br />For instructions
84
on how to add data to or edit the new datapool, go to <a
85
	href="./teditdp.htm">Editing a datapool</a>.
86
</div>
87
</div>
88
89
<div>
90
<p>
91
<strong>Related concepts</strong><br />
92
	<a href="../samples/saccessdp.htm">Tutorial: Creating a datapool driven JUnit test application</a><br />
93
<br />
94
<strong>Related tasks</strong><br />
95
	<a href="../tasks/teditdp.htm">Editing a datapool</a><br />
96
</p>
97
</div>
98
</body>
99
</html>
(-)tasks/tptpJUnitTest_creatingManually.htm (-2 / +2 lines)
Lines 3-9 Link Here
3
3
4
<!-- 
4
<!-- 
5
/**********************************************************************
5
/**********************************************************************
6
 * Copyright (c) 2000, 2008 IBM Corporation.
6
 * Copyright (c) 2000, 2009 IBM Corporation.
7
 * All rights reserved.   This content
7
 * All rights reserved.   This content
8
 * is made available under the terms of the Eclipse Public License v1.0
8
 * is made available under the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
9
 * which accompanies this distribution, and is available at
Lines 42-48 Link Here
42
	</li>
42
	</li>
43
	<li>Click <b>Next</b>. The <b>New JUnit Test Definition</b> dialog launches.</li>
43
	<li>Click <b>Next</b>. The <b>New JUnit Test Definition</b> dialog launches.</li>
44
	<li>Enter the parent folder (<i>javaProject/src/junit/samples</i>) and Name (<i>JUnit_src</i>).</li>
44
	<li>Enter the parent folder (<i>javaProject/src/junit/samples</i>) and Name (<i>JUnit_src</i>).</li>
45
	<li>Optionally click <b>Next</b> and provide a description of the JUnit test definition.</li>
45
	<li>Click <b>Next</b> and provide a description of the JUnit test definition.</li>
46
	<li>Click on <b>Finish</b>.</li>
46
	<li>Click on <b>Finish</b>.</li>
47
	<li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new JUnit test suite is to be opened in the JUnit Test editor.</li>	
47
	<li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new JUnit test suite is to be opened in the JUnit Test editor.</li>	
48
</ol>
48
</ol>
(-)tasks/tcreateartifact.htm (-3 / +2 lines)
Lines 29-38 Link Here
29
<p>Test artifacts are created with the <b>New Artifact</b> wizard:</p>
29
<p>Test artifacts are created with the <b>New Artifact</b> wizard:</p>
30
30
31
<ol>
31
<ol>
32
	<li>Right-click in the Test Navigator and select <b>New</b> &gt; <b>Test Element...</b>.</li>
32
	<li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, and select <b>New</b> &gt; <b>Test Element...</b> &gt; <b>Test Assets</b> &gt; <b>Artifact</b>, and click <b>Next</b>.</li>
33
	<li>Select <b>Test Assets</b> &gt; <b>Artifact</b> and click <b>Next</b>.</li>
34
    <li>Select the parent folder and define the name of the test artifact and click <b>Next</b>.</li>
33
    <li>Select the parent folder and define the name of the test artifact and click <b>Next</b>.</li>
35
    <li>Optionally, provide a description for the test artifact and click <b>Next</b>.</li>
34
    <li>Provide a description for the test artifact and click <b>Next</b>.</li>
36
    <li>Select the associated test assets, such as test suites and datapools.</li>
35
    <li>Select the associated test assets, such as test suites and datapools.</li>
37
    <li>Click <b>Finish</b> to create the test artifact.</li>
36
    <li>Click <b>Finish</b> to create the test artifact.</li>
38
    <li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new test artifact is to be opened in the Artifact editor.</li>
37
    <li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new test artifact is to be opened in the Artifact editor.</li>
(-)tasks/t_openinglogs.html (-3 / +3 lines)
Lines 3-9 Link Here
3
<html lang="en-us" xml:lang="en-us">
3
<html lang="en-us" xml:lang="en-us">
4
<!-- 
4
<!-- 
5
/**********************************************************************
5
/**********************************************************************
6
 * Copyright (c) 2005, 2008 IBM Corporation.
6
 * Copyright (c) 2005, 2009 IBM Corporation.
7
 * All rights reserved.   This content
7
 * All rights reserved.   This content
8
 * is made available under the terms of the Eclipse Public License v1.0
8
 * is made available under the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
9
 * which accompanies this distribution, and is available at
Lines 34-47 Link Here
34
<body><a name="openinglogs"><!-- --></a>
34
<body><a name="openinglogs"><!-- --></a>
35
<h1 class="topictitle1">Opening a test log</h1>
35
<h1 class="topictitle1">Opening a test log</h1>
36
<div><p>To open a test log file, use the Open File window, or double-click
36
<div><p>To open a test log file, use the Open File window, or double-click
37
in the Test Navigator the file with the extension, <span class="filepath">.execution</span>.</p>
37
in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a> the file with the extension, <span class="filepath">.execution</span>.</p>
38
<ol><li><span>From the <span class="uicontrol">File</span> menu, click <span class="uicontrol">Open
38
<ol><li><span>From the <span class="uicontrol">File</span> menu, click <span class="uicontrol">Open
39
File</span>.</span></li>
39
File</span>.</span></li>
40
<li><span>Browse to and select the test log file to open. (Test log files
40
<li><span>Browse to and select the test log file to open. (Test log files
41
use the extension, <span class="filepath">.execution</span>.)</span></li>
41
use the extension, <span class="filepath">.execution</span>.)</span></li>
42
<li><span>Click <span class="uicontrol">OK</span>.</span></li>
42
<li><span>Click <span class="uicontrol">OK</span>.</span></li>
43
</ol>
43
</ol>
44
<div class="section">Alternatively, locate in the Test Navigator the test log file and
44
<div class="section">Alternatively, locate in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a> the test log file and
45
then double-click it.</div>
45
then double-click it.</div>
46
</div>
46
</div>
47
</body>
47
</body>
(-)tasks/topendp.htm (-50 lines)
Removed Link Here
1
<!DOCTYPE html
2
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html lang="en-us" xml:lang="en-us">
4
<!-- 
5
/**********************************************************************
6
 * Copyright (c) 2004, 2008 IBM Corporation.
7
 * All rights reserved.   This content
8
 * is made available under the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
10
 * http://www.eclipse.org/legal/epl-v10.html        
11
 * $Id: topendp.htm,v 1.11 2008/05/30 18:24:24 paules Exp $
12
 *
13
 * Contributors:
14
 * IBM - Initial contribution
15
 **********************************************************************/  
16
 -->
17
<head>
18
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
19
<meta name="security" content="public" />
20
<meta name="Robots" content="index,follow" />
21
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
22
<meta name="DC.Type" content="task" />
23
<meta name="DC.Title" content="Opening a datapool" />
24
<meta name="abstract" content="Inspect or modify the contents of a datapool." />
25
<meta name="description" content="Inspect or modify the contents of a datapool." />
26
<meta name="DC.Relation" scheme="URI" content="../tasks/tdatapool.dita" />
27
<meta name="DC.Format" content="XHTML" />
28
<meta name="DC.Identifier" content="topendp" />
29
<meta name="DC.Language" content="en-us" />
30
<link rel="stylesheet" type="text/css" href="../css/ibmdita.css" />
31
<link rel="stylesheet" type="text/css" href="../css/swg_info_common.css" />
32
<title>Opening a datapool</title>
33
</head>
34
<body><a name="topendp"><!-- --></a>
35
36
<h1 class="topictitle1">Opening a datapool</h1>
37
<div><p>Inspect or modify the contents of a datapool.</p>
38
<div class="skipspace"><p>To open a datapool for editing:</p>
39
</div>
40
<ol><li><span>Open the Test perspective.</span></li>
41
<li><span>In the Test Navigator, expand the Java project containing the datapool
42
to be edited.</span></li>
43
<li><span>From the list of test assets in the Test Navigator, double-click
44
the datapool: the datapool opens in the <span class="uicontrol">Equivalence Class</span> tab.</span></li>
45
<li><span>Along the bottom of the edit pane, click the <span class="uicontrol">Data Table</span> tab.</span></li>
46
</ol>
47
</div>
48
49
</body>
50
</html>
(-)tasks/teditdp.htm (-60 lines)
Removed Link Here
1
<!DOCTYPE html
2
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html lang="en-us" xml:lang="en-us">
4
<!-- 
5
/**********************************************************************
6
 * Copyright (c) 2004, 2008 IBM Corporation.
7
 * All rights reserved.   This content
8
 * is made available under the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
10
 * http://www.eclipse.org/legal/epl-v10.html        
11
 * $Id: teditdp.htm,v 1.16 2008/05/30 18:24:24 paules Exp $
12
 *
13
 * Contributors:
14
 * IBM - Initial contribution
15
 **********************************************************************/  
16
 -->
17
<head>
18
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
19
<meta name="security" content="public" />
20
<meta name="Robots" content="index,follow" />
21
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
22
<meta name="DC.Type" content="task" />
23
<meta name="DC.Title" content="Editing a datapool" />
24
<meta name="abstract" content="In a manner similar to editing a spreadsheet, you can add, modify or remove data from a datapool." />
25
<meta name="description" content="In a manner similar to editing a spreadsheet, you can add, modify or remove data from a datapool." />
26
<meta name="DC.Relation" scheme="URI" content="../tasks/tdatapool.dita" />
27
<meta name="DC.Format" content="XHTML" />
28
<meta name="DC.Identifier" content="teditdp" />
29
<meta name="DC.Language" content="en-us" />
30
<link rel="stylesheet" type="text/css" href="../css/ibmdita.css" />
31
<link rel="stylesheet" type="text/css" href="../css/swg_info_common.css" />
32
<title>Editing a datapool</title>
33
</head>
34
<body>
35
<div>
36
<h1 class="topictitle1">Editing a datapool</h1>
37
38
<p>The datapool editor is a grid similar to a spreadsheet.</p>
39
40
<p>In a manner similar to editing a spreadsheet, you can add, modify or remove data from a datapool.</p>
41
42
<p>When you right-click on the datapool editing grid, a context menu appears to add, edit, and remove a 
43
record or variable, and cut, copy, and paste the selected cell.</p>
44
45
<p>If you insert a variable, the name, type, and relative position of the new variable is required.  
46
In addition, you may encrypt the new variable, which requires a password.</p>
47
48
<p>The Datapool editor's overview tab allows you to edit variables and equivalence classes.</p> 
49
50
<p>
51
<strong>Related concepts</strong><br />
52
	<a href="../samples/saccessdp.htm">Tutorial: Creating a datapool driven JUnit test application</a><br />
53
<strong><br />
54
Related tasks</strong><br />
55
	<a href="../tasks/tcreatedp.htm">Creating a datapool</a><br />
56
</p>
57
58
</div>
59
</body>
60
</html>
(-)tasks/tdatapool.htm (-62 lines)
Removed Link Here
1
<!DOCTYPE html
2
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html lang="en-us" xml:lang="en-us">
4
<!-- 
5
/**********************************************************************
6
 * Copyright (c) 2000, 2008 IBM Corporation.
7
 * All rights reserved.   This content
8
 * is made available under the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
10
 * http://www.eclipse.org/legal/epl-v10.html        
11
 * $Id: tdatapool.htm,v 1.14 2008/05/30 18:24:25 paules Exp $
12
 *
13
 * Contributors:
14
 * IBM - Initial contribution
15
 **********************************************************************/  
16
 -->
17
<head>
18
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
19
<meta name="security" content="public" />
20
<meta name="Robots" content="index,follow" />
21
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
22
<meta name="DC.Type" content="task" />
23
<meta name="DC.Title" content="Providing tests with variable data" />
24
<meta name="abstract" content="If you associate a value in a test with a datapool column, the test substitutes column data for that value when it runs." />
25
<meta name="description" content="If you associate a value in a test with a datapool column, the test substitutes column data for that value when it runs." />
26
<meta name="DC.Relation" scheme="URI" content="../concepts/ccommontestingtasksandconcepts.dita" />
27
<meta name="DC.Relation" scheme="URI" content="../concepts/cdatapools.dita" />
28
<meta name="DC.Relation" scheme="URI" content="../tasks/tcreatedp.dita" />
29
<meta name="DC.Relation" scheme="URI" content="../tasks/topendp.dita" />
30
<meta name="DC.Relation" scheme="URI" content="../tasks/teditdp.dita" />
31
<meta name="DC.Relation" scheme="URI" content="../tasks/taccessdp.dita" />
32
<meta name="DC.Format" content="XHTML" />
33
<meta name="DC.Identifier" content="tdatapool" />
34
<meta name="DC.Language" content="en-us" />
35
<link rel="stylesheet" type="text/css" href="../css/ibmdita.css" />
36
<link rel="stylesheet" type="text/css" href="../css/swg_info_common.css" />
37
<title>Providing tests with variable data</title>
38
</head>
39
<body><a name="tdatapool"><!-- --></a>
40
41
<h1 class="topictitle1">Providing tests with variable data</h1>
42
<div><p>If you associate a value in a test with a datapool column, the
43
test substitutes column data for that value when it runs.</p>
44
</div>
45
46
<div>
47
<blockquote>
48
<div class="ulchildlink"><b><a href="../concepts/cdatapools.htm">Datapool structure</a></b><br />
49
Datapools provide variable data to your tests during execution.</div>
50
<div class="ulchildlink"><b><a href="../tasks/tcreatedp.htm">Creating a datapool</a></b><br />
51
Datapools contain data that tests can use when they run.</div>
52
<div class="ulchildlink"><b><a href="../tasks/topendp.htm">Opening a datapool</a></b><br />
53
Inspect or modify the contents of a datapool.</div>
54
<div class="ulchildlink"><b><a href="../tasks/teditdp.htm">Editing a datapool</a></b><br />
55
In a manner similar to editing a spreadsheet, you can add, modify or remove data from a datapool.</div>
56
<div class="ulchildlink"><b><a href="../samples/saccessdp.htm">Tutorial: Accessing a datapool from a JUnit test</a></b><br />
57
Create and access a datapool from an example test application.</div>
58
</blockquote>
59
60
</div>
61
</body>
62
</html>
(-)concepts/ccommontestingtasksandconcepts.htm (-2 / +2 lines)
Lines 3-9 Link Here
3
<html lang="en-us" xml:lang="en-us">
3
<html lang="en-us" xml:lang="en-us">
4
<!-- 
4
<!-- 
5
/**********************************************************************
5
/**********************************************************************
6
 * Copyright (c) 2004, 2008 IBM Corporation.
6
 * Copyright (c) 2004, 2009 IBM Corporation.
7
 * All rights reserved.   This content
7
 * All rights reserved.   This content
8
 * is made available under the terms of the Eclipse Public License v1.0
8
 * is made available under the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
9
 * which accompanies this distribution, and is available at
Lines 46-52 Link Here
46
46
47
<div>
47
<div>
48
<blockquote>
48
<blockquote>
49
<div class="ulchildlink"><b><a href="../tasks/tdatapool.htm">Providing tests with variable data</a></b><br />
49
<div class="ulchildlink"><b><a href="../tasks/tdatapoolsintro.htm">Providing tests with variable data</a></b><br />
50
If you associate a value in a test with a datapool column, the test substitutes column data for that value when it runs.</div>
50
If you associate a value in a test with a datapool column, the test substitutes column data for that value when it runs.</div>
51
<div class="ulchildlink"><b><a href="../tasks/tdeploymentintro.htm">Creating a test deployment</a></b><br />
51
<div class="ulchildlink"><b><a href="../tasks/tdeploymentintro.htm">Creating a test deployment</a></b><br />
52
This topic describes how to create a deployment for your test suite. You must create a deployment before you can run a test.</div>
52
This topic describes how to create a deployment for your test suite. You must create a deployment before you can run a test.</div>
(-)concepts/clocationeditor.htm (-4 / +4 lines)
Lines 26-36 Link Here
26
26
27
<h1>Location Editor</h1>
27
<h1>Location Editor</h1>
28
28
29
<p>Test locations are edited using the Location editor.  The editor contains three tabs:</p> 
29
<p>Test locations are edited using the Location .  The editor contains three tabs:</p> 
30
30
31
<h2>Overview</h2>
31
<h2>Overview</h2>
32
32
33
<p>This tab provides an overview of the test location.</p>
33
<p>This tab provides an overview of the test location, including its general information, property groups, Eclipse workbench properties, and general properties.</p>
34
34
35
<p>This tab contains the following sections:</p>
35
<p>This tab contains the following sections:</p>
36
36
Lines 65-71 Link Here
65
	</li>
65
	</li>
66
</ul>
66
</ul>
67
67
68
<p>[1] Test locations have a file name and logical name.  The logical name is used in the Test Navigator, dialogs, editors, and wizards to represent the test location.
68
<p>[1] Test locations have a file name and logical name.  The logical name is used in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, dialogs, editors, and wizards to represent the test location.
69
The file name represents the test location file (<i>*.location</i>) within the workspace.  When the test location is created, the logical name defaults to the file name 
69
The file name represents the test location file (<i>*.location</i>) within the workspace.  When the test location is created, the logical name defaults to the file name 
70
(excluding the <i>.location</i> file extension) and may be modified without modifying the file name.  The logical name allows customization of the test location name 
70
(excluding the <i>.location</i> file extension) and may be modified without modifying the file name.  The logical name allows customization of the test location name 
71
without affecting the file name within the workspace.</p>
71
without affecting the file name within the workspace.</p>
Lines 80-86 Link Here
80
dependencies on the target host.</p>
80
dependencies on the target host.</p>
81
81
82
<p>In addition, the <i>ROOTDIR</i> general property contains absolute path of the directory on the target host where 
82
<p>In addition, the <i>ROOTDIR</i> general property contains absolute path of the directory on the target host where 
83
the dependencies configured in <a href="../concepts/cartifacteditor.htm">Artifact editor</a> are deployed when a test suite is executed.  If the 
83
the dependencies configured in <a href="../concepts/cartifacteditor.htm">Artifact </a> are deployed when a test suite is executed.  If the 
84
<i>ROOTDIR</i> general property is not provided or invalid for the target host, the dependencies  are deployed to a temporary directory on the target host.</p>
84
<i>ROOTDIR</i> general property is not provided or invalid for the target host, the dependencies  are deployed to a temporary directory on the target host.</p>
85
85
86
<p>Note, the General Properties tab will only appear if one or more general properties are associated with the test location.</p>
86
<p>Note, the General Properties tab will only appear if one or more general properties are associated with the test location.</p>
(-)concepts/c_viewingtestresults.html (-1 / +1 lines)
Lines 40-46 Link Here
40
<div>
40
<div>
41
<ul class="ullinks">
41
<ul class="ullinks">
42
<li class="ulchildlink"><strong><a href="../tasks/t_openinglogs.html">Opening a test log</a></strong><br />
42
<li class="ulchildlink"><strong><a href="../tasks/t_openinglogs.html">Opening a test log</a></strong><br />
43
To open a test log file, use the Open File window, or double-click in the Test Navigator the file with the extension, <span class="filepath">.execution</span>.</li>
43
To open a test log file, use the Open File window, or double-click in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a> the file with the extension, <span class="filepath">.execution</span>.</li>
44
<li class="ulchildlink"><strong><a href="../tasks/t_viewingevents.html">Viewing events</a></strong><br />
44
<li class="ulchildlink"><strong><a href="../tasks/t_viewingevents.html">Viewing events</a></strong><br />
45
After a run, open the Test Log viewer to check the results for specific events, such as the test start and end, loop, invocation, message, or verdict. </li>
45
After a run, open the Test Log viewer to check the results for specific events, such as the test start and end, loop, invocation, message, or verdict. </li>
46
</ul>
46
</ul>
(-)concepts/cartifacteditor.htm (-3 / +3 lines)
Lines 26-36 Link Here
26
26
27
<h1>Artifact Editor</h1>
27
<h1>Artifact Editor</h1>
28
28
29
<p>Test artifacts are edited using the Artifact editor.  The editor contains three tabs:</p> 
29
<p>Test artifacts are edited using the Artifact Editor.  The editor contains three tabs:</p> 
30
30
31
<h2>Overview</h2>
31
<h2>Overview</h2>
32
32
33
<p>This tab provides an overview of the test artifact.</p>
33
<p>This tab provides an overview of the test artifact, including its general information, property groups, test assets, and general properties.</p>
34
34
35
<p>This tab contains the following sections:</p>
35
<p>This tab contains the following sections:</p>
36
36
Lines 61-67 Link Here
61
	</li>
61
	</li>
62
</ul>
62
</ul>
63
63
64
<p>[1] Test artifacts have a file name and logical name.  The logical name is used in the Test Navigator, dialogs, editors, and wizards to represent the test artifact.
64
<p>[1] Test artifacts have a file name and logical name.  The logical name is used in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, dialogs, editors, and wizards to represent the test artifact.
65
The file name represents the test artifact file (<i>*.artifact</i>) within the workspace.  When the test artifact is created, the logical name defaults to the file name 
65
The file name represents the test artifact file (<i>*.artifact</i>) within the workspace.  When the test artifact is created, the logical name defaults to the file name 
66
(excluding the <i>.artifact</i> file extension) and may be modified without modifying the file name.  The logical name allows customization of the test artifact name 
66
(excluding the <i>.artifact</i> file extension) and may be modified without modifying the file name.  The logical name allows customization of the test artifact name 
67
without affecting the file name within the workspace.</p>
67
without affecting the file name within the workspace.</p>
(-)concepts/cdatapools.htm (-91 lines)
Removed Link Here
1
<!DOCTYPE html
2
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html lang="en-us" xml:lang="en-us">
4
<head>
5
<!-- 
6
/**********************************************************************
7
 * Copyright (c) 2000, 2008 IBM Corporation.
8
 * All rights reserved.   This content
9
 * is made available under the terms of the Eclipse Public License v1.0
10
 * which accompanies this distribution, and is available at
11
 * http://www.eclipse.org/legal/epl-v10.html        
12
 * $Id: cdatapools.htm,v 1.18 2008/07/17 19:07:12 paules Exp $
13
 *
14
 * Contributors:
15
 * IBM - Initial contribution
16
 **********************************************************************/  
17
 -->
18
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
19
<meta name="security" content="public" />
20
<meta name="Robots" content="index,follow" />
21
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
22
<meta name="DC.Type" content="concept" />
23
<meta name="DC.Title" content="Datapool structure" />
24
<meta name="abstract" content="Datapools provide variable data to your tests during execution." />
25
<meta name="description" content="Datapools provide variable data to your tests during execution." />
26
<meta name="DC.Relation" scheme="URI" content="../tasks/tdatapool.dita" />
27
<meta name="DC.Format" content="XHTML" />
28
<meta name="DC.Identifier" content="cdatapools" />
29
<meta name="DC.Language" content="en-us" />
30
<link rel="stylesheet" type="text/css" href="../css/ibmdita.css" />
31
<link rel="stylesheet" type="text/css" href="../css/swg_info_common.css" />
32
<title>Datapool structure</title>
33
</head>
34
<body><a name="cdatapools"><!-- --></a>
35
36
<h1 class="topictitle1">Datapool structure</h1>
37
<div><p><span class="tx">Datapools provide variable data to your tests during execution. You can add Variables (columns), Records (rows) and
38
Equivalence Classes (groups of related Records), to define a datapool's structure. This section describes these structural elements. For information about populating a datapool and using the datapool API, see Tutorial: Creating a datapool driven
39
JUnit test application.</span></p>
40
<h3>Performance testing example</h3><p>Performance tests are based on user emulation. During a session with the
41
application-under-test, the tester uses a feature that real customers
42
will use, and from the recorded session a test is generated containing the
43
exact data that the tester entered. For example, to create a performance test
44
for a dialog in a web-based shopping application that prompts a shopper for
45
an account number, the tester engages the dialog by selecting an
46
item that is offered for sale, clicking a "pay now" button, and entering an
47
account number. During playback of the test, in which the tester might request
48
that hundreds of instances of the transaction be run simultaneously, it is
49
desirable that different account numbers (perhaps a combination of valid and
50
invalid numbers) are used for each of the instances. To supply variable data
51
for tests to use during playback, the tester creates datapools.</p>
52
<h3>Structural elements.</h3>
53
<p>Datapools contain three structural elements</p>
54
<ul><li><p>Equivalence class. A datapool subset containing a range of data that,
55
when submitted to a test, produces the equivalent pass/fail result. Equivalence classes group related data. A datapool
56
must contain one equivalence class. </p>
57
	<p>Note: you should use only one equivalence class for performance
58
	testing. A performance test can open a datapool in one of 3 modes,
59
	which determines how virtual users access the datapool: private, shared
60
	per machine, or segmented per machine. In the private and shared
61
	modes, equivalence classes are ignored but the segmented access mode
62
	requires that the datapool contain only 1 equivalence class. For this
63
	reason, we recommend that you add only a single equivalence class to
64
	datapools that you plan to use for performance testing.</p>
65
	</li>
66
<li><p>Record. A row of data. Rows are indexed by an equivalence class starting
67
with 0.</p>
68
</li>
69
<li><p>Variable. A named data column. Data resides in column cells and is
70
typically typed based on what is expected by the application-under-test.</p>
71
</li>
72
</ul>
73
74
<p>When you create a datapool, you have the option of initializing the new
75
datapool with data contained in an existing comma-separated value text file (CSV)
76
that you created with a spreadsheet editor or with some external or custom
77
tool. For datapools containing large amounts of data, this approach is recommended.
78
The datapool editor is suitable for entering small amounts of data and modifying
79
individual records but provides no means of generating large amounts of typed
80
data.
81
</p>
82
83
</div>
84
85
<div>
86
<p>
87
<strong>Related concepts</strong><br />
88
	<a href="../samples/saccessdp.htm">Tutorial: Creating a datapool driven JUnit test application</a></p>
89
</div>
90
</body>
91
</html>
(-)concepts/cEditingJUnitTests.htm (-2 / +2 lines)
Lines 2-8 Link Here
2
<html lang="en-us" xml:lang="en-us">
2
<html lang="en-us" xml:lang="en-us">
3
<!-- 
3
<!-- 
4
/**********************************************************************
4
/**********************************************************************
5
 * Copyright (c) 2008 IBM Corporation.
5
 * Copyright (c) 2008, 2009 IBM Corporation.
6
 * All rights reserved.   This content
6
 * All rights reserved.   This content
7
 * is made available under the terms of the Eclipse Public License v1.0
7
 * is made available under the terms of the Eclipse Public License v1.0
8
 * which accompanies this distribution, and is available at
8
 * which accompanies this distribution, and is available at
Lines 38-44 Link Here
38
      <br/>
38
      <br/>
39
	</li>
39
	</li>
40
	<li>
40
	<li>
41
	<a href="../samples/saccessdp.htm">Tutorial: Accessing a datapool from a JUnit test</a>
41
	<a href="../samples/saccessdatapool.htm">Tutorial: Accessing a datapool from a TPTP JUnit test</a>
42
	<br/>
42
	<br/>
43
	</li>
43
	</li>
44
</ul>
44
</ul>
(-)concepts/cdeployeditor.htm (-8 / +8 lines)
Lines 26-36 Link Here
26
26
27
<h1>Deployment Editor</h1>
27
<h1>Deployment Editor</h1>
28
28
29
<p>Test deployments are edited using the Deployment editor.  The editor contains three tabs:</p> 
29
<p>Test deployments are edited using the Deployment Editor.  The editor contains three tabs:</p> 
30
30
31
<h2>Overview</h2>
31
<h2>Overview</h2>
32
32
33
<p>This tab provides an overview of the test deployment.</p>
33
<p>This tab provides an overview of the test deployment, including its general information, artifacts, locations, and tests.</p>
34
34
35
<p>This tab contains the following sections:</p>
35
<p>This tab contains the following sections:</p>
36
36
Lines 41-63 Link Here
41
		<br/>
41
		<br/>
42
	</li>
42
	</li>
43
	<li>
43
	<li>
44
		<p><b>Test Artifacts</b></p>
44
		<p><b>Artifacts</b></p>
45
		<p>Contains links to the test artifacts in the Pairs tab.  Clicking a link or the More... button will open the Pairs tab.</p>
45
		<p>Contains links to the test artifacts in the Pairs tab.  Clicking a link or the More... button will open the Pairs tab.</p>
46
		<br/>
46
		<br/>
47
	</li>
47
	</li>
48
	<li>
48
	<li>
49
		<p><b>Test Locations</b></p>
49
		<p><b>Locations</b></p>
50
		<p>Contains links to the test locations in the Pairs tab.  Clicking a link or the More... button will open the Pairs tab.</p>
50
		<p>Contains links to the test locations in the Pairs tab.  Clicking a link or the More... button will open the Pairs tab.</p>
51
		<br/>
51
		<br/>
52
	</li>
52
	</li>
53
	<li>
53
	<li>
54
		<p><b>Test</b></p>
54
		<p><b>Tests</b></p>
55
		<p>Contains the test suites associated with the test artifacts.</p>
55
		<p>Contains the test suites associated with the test artifacts.</p>
56
		<br/>
56
		<br/>
57
	</li>
57
	</li>
58
</ul>
58
</ul>
59
59
60
<p>[1] Test deployments have a file name and logical name.  The logical name is used in the Test Navigator, dialogs, editors, and wizards to represent the test deployment.
60
<p>[1] Test deployments have a file name and logical name.  The logical name is used in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, dialogs, editors, and wizards to represent the test deployment.
61
The file name represents the test deployment file (<i>*.deploy</i>) within the workspace.  When the test deployment is created, the logical name defaults to the file name 
61
The file name represents the test deployment file (<i>*.deploy</i>) within the workspace.  When the test deployment is created, the logical name defaults to the file name 
62
(excluding the <i>.deploy</i> file extension) and may be modified without modifying the file name.  The logical name allows customization of the test deployment name 
62
(excluding the <i>.deploy</i> file extension) and may be modified without modifying the file name.  The logical name allows customization of the test deployment name 
63
without affecting the file name within the workspace.</p>
63
without affecting the file name within the workspace.</p>
Lines 75-81 Link Here
75
		<br/>
75
		<br/>
76
		<p>Test artifacts can be added to the list by clicking the <b>Add...</b> button and selecting the test artifacts or creating a <a href="../tasks/tcreateartifact.htm">new test artifact</a>.</p>
76
		<p>Test artifacts can be added to the list by clicking the <b>Add...</b> button and selecting the test artifacts or creating a <a href="../tasks/tcreateartifact.htm">new test artifact</a>.</p>
77
		<br/>
77
		<br/>
78
		<p>Selected test artifacts can be removed (<b>Remove</b>), moved up (<b>Up</b>), moved down (<b>Down</b>), or opened in the Artifact editor (<b>Open...</b>).</p>
78
		<p>Selected test artifacts can be removed (<b>Remove</b>), moved up (<b>Up</b>), moved down (<b>Down</b>), or opened in the Artifact Editor (<b>Open...</b>).</p>
79
		<br/>
79
		<br/>
80
	</li>
80
	</li>
81
	<li>
81
	<li>
Lines 84-90 Link Here
84
		<br/>
84
		<br/>
85
		<p>Test locations can be added to the list by clicking the <b>Add...</b> button and selecting the test locations or creating a <a href="../tasks/tcreatelocation.htm">new test location</a>.</p>
85
		<p>Test locations can be added to the list by clicking the <b>Add...</b> button and selecting the test locations or creating a <a href="../tasks/tcreatelocation.htm">new test location</a>.</p>
86
		<br/>
86
		<br/>
87
		<p>Selected test locations can be removed (<b>Remove</b>), moved up (<b>Up</b>), moved down (<b>Down</b>), or opened in the Location editor (<b>Open...</b>).</p>
87
		<p>Selected test locations can be removed (<b>Remove</b>), moved up (<b>Up</b>), moved down (<b>Down</b>), or opened in the Location Editor (<b>Open...</b>).</p>
88
		<br/>
88
		<br/>
89
	</li>
89
	</li>
90
	<li>
90
	<li>
(-)concepts/cedittest.htm (-4 / +4 lines)
Lines 3-9 Link Here
3
<html lang="en-us" xml:lang="en-us">
3
<html lang="en-us" xml:lang="en-us">
4
<!-- 
4
<!-- 
5
/**********************************************************************
5
/**********************************************************************
6
 * Copyright (c) 2004, 2008 IBM Corporation.
6
 * Copyright (c) 2004, 2009 IBM Corporation.
7
 * All rights reserved.   This content
7
 * All rights reserved.   This content
8
 * is made available under the terms of the Eclipse Public License v1.0
8
 * is made available under the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
9
 * which accompanies this distribution, and is available at
Lines 37-43 Link Here
37
<div><p>You can inspect and modify a test prior to compiling and running
37
<div><p>You can inspect and modify a test prior to compiling and running
38
it.</p>
38
it.</p>
39
<p>Note, the test is not yet executable. You can immediately make the test executable
39
<p>Note, the test is not yet executable. You can immediately make the test executable
40
by right-clicking it in the Test Navigator and selecting <span class="uicontrol">Generate</span>.
40
by right-clicking it in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a> and selecting <span class="uicontrol">Generate</span>.
41
Or you can first edit the test by right-clicking it and selecting <span class="uicontrol">Open</span>. </p>
41
Or you can first edit the test by right-clicking it and selecting <span class="uicontrol">Open</span>. </p>
42
<p> </p>
42
<p> </p>
43
<p>Open the performance test in the TPTP URL Test editor:</p>
43
<p>Open the performance test in the TPTP URL Test editor:</p>
Lines 51-59 Link Here
51
the test. Information appearing in boxes can be edited. The <span class="uicontrol">Name</span> box
51
the test. Information appearing in boxes can be edited. The <span class="uicontrol">Name</span> box
52
under <span class="uicontrol">TPTP URL Test</span> displays the name of the
52
under <span class="uicontrol">TPTP URL Test</span> displays the name of the
53
test. You can change the name. If you do, the
53
test. You can change the name. If you do, the
54
name displayed in the Test Navigator changes also but the filename containing
54
name displayed in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a> changes also but the filename containing
55
the test does not change. In this example, the test's name, as listed in the
55
the test does not change. In this example, the test's name, as listed in the
56
Test Navigator and displayed in the <span class="uicontrol">Name</span> box. The tester has decided
56
<a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a> and displayed in the <span class="uicontrol">Name</span> box. The tester has decided
57
to change the name to something more descriptive of the task that the test
57
to change the name to something more descriptive of the task that the test
58
emulates, <span class="uicontrol">searchEmployeeDB</span>.</p>
58
emulates, <span class="uicontrol">searchEmployeeDB</span>.</p>
59
<p>The <span class="uicontrol">Source Information</span> area displays the Java package
59
<p>The <span class="uicontrol">Source Information</span> area displays the Java package
(-)toc/junit_test_toc.xml (-1 / +1 lines)
Lines 31-37 Link Here
31
  	        <topic label="Mapping test methods to a TPTP JUnit test" href="tasks/tptpJUnitTest_testMethods.htm"/>
31
  	        <topic label="Mapping test methods to a TPTP JUnit test" href="tasks/tptpJUnitTest_testMethods.htm"/>
32
	      </topic>
32
	      </topic>
33
		  
33
		  
34
		  <topic label="Tutorial: Accessing a datapool from a JUnit test" href="samples/saccessdp.htm"/>
34
		  <link toc="toc/test_datapools_toc.xml"/>
35
      </topic>          
35
      </topic>          
36
      
36
      
37
      <topic label="Running a test" href="tasks/trun.htm"/>
37
      <topic label="Running a test" href="tasks/trun.htm"/>
(-)toc/test_datapools_toc.xml (-8 / +10 lines)
Lines 14-26 Link Here
14
 -->
14
 -->
15
<?NLS  TYPE="org.eclipse.help.toc"?>
15
<?NLS  TYPE="org.eclipse.help.toc"?>
16
<toc label="Providing tests with variable data">
16
<toc label="Providing tests with variable data">
17
	
17
	  	    
18
	<topic label="Providing tests with variable data" href="tasks/tdatapool.htm">
18
	<topic label="Providing tests with variable data" href="tasks/tdatapoolsintro.htm">
19
  	    
19
	  	    
20
  	    <topic label="Datapool structure" href="concepts/cdatapools.htm"/>
20
    	<topic label="Creating a datapool" href="tasks/tcreatedatapool.htm">
21
    	<topic label="Creating a datapool" href="tasks/tcreatedp.htm"/>
21
    		<topic label="Datapool Editor" href="concepts/cdatapooleditor.htm"/>
22
    	<topic label="Opening a datapool" href="tasks/topendp.htm"/>
22
    		<topic label="Importing a Comma-Separated Value (CSV) file as a datapool" href="tasks/cdatapoolimport.htm"/>
23
        <topic label="Editing a datapool" href="tasks/teditdp.htm"/>
23
    		<topic label="Exporting a datapool as a Comma-Separated Value (CSV) file" href="tasks/cdatapoolexport.htm"/>
24
	    <topic label="Tutorial: Accessing a datapool from a JUnit test" href="samples/saccessdp.htm"/>
24
    	</topic>
25
    	
26
	    <topic label="Tutorial: Accessing a datapool from a TPTP JUnit test" href="samples/saccessdatapool.htm"/>
25
	</topic>
27
	</topic>
26
</toc>
28
</toc>
(-)samples/saccessdp.htm (-425 lines)
Removed Link Here
1
<!DOCTYPE html
2
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html lang="en-us" xml:lang="en-us">
4
<!-- 
5
/**********************************************************************
6
 * Copyright (c) 2004, 2008 IBM Corporation.
7
 * All rights reserved. This content is made available under 
8
 * the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
10
 * http://www.eclipse.org/legal/epl-v10.html        
11
 * $Id: saccessdp.htm,v 1.17 2008/12/23 20:27:08 paules Exp $
12
 *
13
 * Contributors:
14
 * IBM - Initial contribution
15
 **********************************************************************/  
16
 -->
17
18
<head>
19
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
20
<meta name="security" content="public" />
21
<meta name="Robots" content="index,follow" />
22
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
23
<meta name="DC.Type" content="task" />
24
<meta name="DC.Title" content="Accessing a datapool from a Hyades test" />
25
<meta name="abstract" content="You can use a datapool from a Hyades test by making calls to the datapool API from a test's generated Java code." />
26
<meta name="description" content="You can use a datapool from a Hyades test by making calls to the datapool API from a test's generated Java code." />
27
<meta name="DC.Relation" scheme="URI" content="../tasks/tdatapool.dita" />
28
<meta name="DC.Format" content="XHTML" />
29
<meta name="DC.Identifier" content="taccessdp" />
30
<meta name="DC.Language" content="en-us" />
31
<link rel="stylesheet" type="text/css" href="../css/ibmdita.css" />
32
<link rel="stylesheet" type="text/css" href="../css/swg_info_common.css" />
33
<title>Tutorial: Accessing a datapool from a JUnit test</title>
34
</head>
35
<body>
36
37
<h1 class="topictitle1">Tutorial: Accessing a datapool from a JUnit test</h1>
38
<div>
39
<h2><br />
40
Objectives:</h2>
41
<p>To create and access a datapool from an example test application using the Eclipse Test and
42
Performance Tools Platform (TPTP). </p><h2>
43
Time required</h2>
44
<p>1 hour</p>
45
<h2><strong><a name="BeforeYouBegin">Before you begin</a></strong></h2>
46
<p><span>Before you start this tutorial,
47
you need to <span> </span></span></p>
48
<ol>
49
	<li>
50
	<span><span>Install Eclipse and the Eclipse Test and Performance Tools
51
	Platform (TPTP).</span></span></li>
52
	<li>Have a basic understanding of JUnit testing. For more information about JUnit testing, see <a
53
		href="http://www.junit.org">www.junit.org</a>.</li>
54
	<li>Configure and run the Agent Controller which corresponds to your TPTP version. For more information, see <a
55
		href="http://www.eclipse.org/tptp/home/downloads/installguide/HyadesDataCollection.html">
56
	Getting started with the Agent Controller</a>.<br />
57
	</li></ol>
58
<h2><br />
59
<strong>Description</strong></h2>
60
<p><span>In this tutorial,
61
you create and test an  application called MyShoppingCart. Using the Eclipse Test and Performance Tools Platform (TPTP), you develop JUnit tests and create a datapool to provide data to the test environment.<br /></span><br />
62
This tutorial guides you through the following procedures:</p>
63
<ol>
64
	<li><a href="#CreateUserApp">Creating a sample user application</a></li>
65
	<li><a href="#SetupTestApp" target="_self">Setting up a TPTP test
66
	suite</a></li>
67
	<li><a href="#CreateDatapool">Creating a datapool and initializing test
68
	data</a></li>
69
	<li><a href="#ModifyTestCasesDP">Modifying test cases to reference a
70
	datapool</a><br />
71
	</li>
72
</ol>
73
74
75
<h2><a name="CreateUserApp">Creating a sample user application</a></h2><br />
76
In this procedure, you develop the MyShoppingCart class. In subsequent procedures, you will use the  Eclipse Test and Performance Tools Platform to develop a corresponding test environment.<br /><ol>
77
	<li>Create a new Eclipse Java Project. <ul>
78
		<li>From the File menu choose <b>File &gt; New &gt; Project...</b> The
79
		New Project dialog appears.</li>
80
		<li>In the Wizards list, select <b>Java Project</b> and click <b>Next</b>.
81
		The Create a Java project page appears.</li>
82
		<li>Type <tt>datapoolExample</tt> for the Project name and click <b>Finish</b>.
83
		The datapoolExample project appears in the Navigator view.<br />
84
		</li>
85
	</ul>
86
	</li>
87
	<li>Create the MyShoppingCart class.<ul>
88
		<li>In the Navigator view, right-click the <b>datapoolExample</b>
89
		project and choose <b>New &gt; Class</b>. The New Java Class dialog
90
		appears.</li>
91
		<li>Type <tt>MyShoppingCart</tt> in the <b>Name</b> field.</li>
92
		<li>Clear the option to create the main method <b>public static void
93
		main(String[] args)</b>.</li>
94
		<li>Click Finish. The MyShoppingCart.java file appears in the Java
95
		editor.</li>
96
		<li>Type the following for the MyShoppingCart source:<pre>
97
import java.util.Hashtable;
98
99
public class MyShoppingCart {
100
101
	public Hashtable myFlowers;
102
	
103
	public MyShoppingCart() {
104
	    
105
		myFlowers = new Hashtable();
106
		myFlowers.put("Orchid", new Double(5.99));
107
		myFlowers.put("Tulip", new Double(1.99));
108
		myFlowers.put("Yellow Carnation", new Double(6.99));
109
		myFlowers.put("White Rose", new Double(9.99));
110
		myFlowers.put("Geraniums", new Double(4.99));		
111
	}
112
	
113
	public double itemCost(String itemName, int itemQuantity)
114
	{
115
	     Double price = (Double)myFlowers.get(itemName);
116
		
117
	     if (price != null) {
118
	    	 return price.doubleValue()*itemQuantity;
119
	     }
120
	     
121
	     return -1;	    	 	    	 	     		
122
	}
123
}</pre></li>
124
		<li>Save MyShoppingCart.java. From the File menu choose <b>File &gt;
125
		Save</b>.</li>
126
	</ul>
127
	</li>
128
</ol>
129
<h2><a name="SetupTestApp">Setting up a  TPTP test suite</a></h2>
130
<br /> In this procedure, you develop a test suite for the the MyShoppingCart class. Using the  Eclipse Test and Performance Tools Platform, you develop a JUnit
131
	test for the itemCost method.<br /><ol>
132
	<li>Open the Test Perspective.
133
	<ul>
134
		<li>From the File menu, choose <b>Window &gt; Open Perspective &gt;
135
		Other</b>.</li>
136
		<li>Select <b>Test</b> and click <b>OK</b>. The Test Navigator appears.</li>
137
	</ul>
138
	</li>
139
	<li>Create a new TPTP JUnit Test.<ul>
140
		<li>In the Test Navigator, right-click the datapoolExample project and choose <b>New
141
		&gt; Test Element...</b></li>
142
		<li>In the Test Element dialog, select <b>TPTP JUnit test</b> and click <b>Next</b>. The New Test Case dialog appears, prompting you to add JUnit libraries. Click <b>Yes</b> to add JUnit libraries.</li>
143
		<li> In the New JUnit Test Source Code page, type <b>MyShoppingCartTest</b> in the <b>Name</b> field. In the <b>Select how the test behavior is edited</b> section, choose the edit <b>In
144
		the test editor</b> option (the default).</li>
145
		<li>Click<b> Finish</b>. The TPTP JUnit Test editor appears, showing the
146
		MyShoppingCartTest test suite. The Overview tab includes a test description, Source Information, and a Test Methods listing. Currently, no test methods are defined. For this tutorial, the TPTP JUnit Test editor generates method stubs so the <b>Implement
147
		Test Behavior as code</b> option in the <b>Source Information</b> section should be cleared. For more information, see 
148
		<a href="../concepts/cJUnitTestEditor.htm">JUnit Test Suite Editor</a>.</li>
149
	</ul>
150
151
		</li>
152
	<li>Add the testItemCost and testMyShoppingCartConstructor methods.
153
	<ul>
154
		<li>In the Test Methods tab, click Add. A default  name appears for your test.</li>
155
		<li>Add the testItemCost method. In the Name field, type <b>testItemCost</b> for the new test name. In the Description field, type <b>Test
156
		for the MyShoppingCart.itemCost(String, int) method</b>.</li>
157
		<li>Add the testMyShoppingCartConstructor method. In the Test Methods tab, click Add. In the Name field, type <b>testMyShoppingCartConstructor</b> for the new test name. In the Description field, type <b>Test
158
		for the MyShoppingCart constructor</b>.</li>
159
	</ul>
160
	</li>
161
	<li>Configure the test execution behavior.
162
	<ul>
163
		<li>Add a test execution loop. In the Behavior tab, click <b>Add..
164
		&gt; Loop</b>. In the Name field, type <b>Loop_MyShoppingCart</b>. In
165
		the Number of Iterations field, type <b>1</b> (the default value).</li>
166
		<li>Add a testMyShoppingCartConstructor invocation.  Select
167
		Loop_MyShoppingCart and click <b>Add... &gt; invocation</b>. The Test Invocation
168
		dialog appears. Select Select <b>testMyShoppingCartConstructor</b> and
169
		click OK.</li>
170
		<li>Add a testItemCost invocation.  Select
171
		Loop_MyShoppingCart and click <b>Add... &gt; invocation</b>. The Test
172
		Invocation dialog appears. Select <b>testItemCost</b> and click OK.</li>
173
		<li>Save the test suite. From the File menu, choose <b>File &gt; Save</b>.
174
		<br />
175
		<img border="0" src="../images/testTutorial_Behavior.gif" width="534"
176
			height="407" alt=""/> <br />
177
		Note: the Save command causes the TPTP JUnit Test editor to create
178
		test method stubs in MyShoppingCartTest.java<i></i>.<br />
179
		</li>
180
	</ul>
181
	</li>
182
	<li>
183
	Enter code for the generated JUnit test methods testMyShoppingCartConstructor and testItemCost.<ul>
184
		<li>Open the Java Perspective. From the file menu choose <b>Window
185
		&gt; Open Perspective &gt; Other... &gt; Java</b>.</li>
186
		<li>Open MyShoppingCartTest.java. In the Navigator, open the datapoolExample project folder and double-click  MyShoppingCartTest.java. The MyShoppingCartTest.java contents appear in the Java editor, including code to setup and execute the test suite, and stub methods for  testMyShoppingCartConstructor and testItemCost.</li>
187
		<li>Type the following code for the testMyShoppingCartConstructor method.<pre>public void testMyShoppingCartConstructor()
188
throws Exception
189
{
190
	MyShoppingCart cart = new MyShoppingCart();
191
	Double priceOrchid = (Double)cart.myFlowers.get("Orchid");
192
	Double priceTulip = (Double)cart.myFlowers.get("Tulip");
193
	
194
	assertTrue(priceOrchid.doubleValue() == 5.99);
195
	assertTrue(priceTulip.doubleValue() == 1.99);
196
}</pre></li>
197
	<li>Type the following code for the testItemCost method.
198
<pre>public void testItemCost()
199
throws Exception
200
{
201
	MyShoppingCart cart = new MyShoppingCart();
202
	double priceForTwo = cart.itemCost("Orchid", 2);
203
	
204
	assertTrue(priceForTwo == 11.98);
205
}</pre>
206
</li><li>Save MyShoppingCartTest.java. From the file menu, choose <b>File
207
		&gt; Save</b>.</li></ul></li><li>Open the Test Perspective and create a test deployment. For an example, see <a href="../tasks/tdeploymentintro.htm">Creating a
208
	Test Deployment</a>.<br/></li>
209
	<li>
210
	Run the test using your custom deployment.<ul>
211
		<li>In the Test Navigator, right-click the MyShoppingCartTest test suite and choose <b>Run
212
		As &gt; Run...</b>.  The Run configuration dialog appears.</li>
213
		<li>In the Configurations pane, select <b>Test</b> and then click <b>New</b>.</li>
214
		<li>In the left pane of the Run configuration (<b>Select test to run</b>), expand datapoolExample and choose the MyShoppingCartTest test suite.</li>
215
		<li>In the right pane of the Run configuration, select the deployment you created section. </li>
216
		<li>In the Test Logs tab, clear the <b>Use defaults</b> option and
217
		select the datapoolExample project folder for the location.</li>
218
		<li>Click <b>Run</b> to launch the test.</li>
219
	</ul></li>
220
		<li>Double-click the MyShoppingCartTest test log, which appears in the Test Navigator. The MyShoppingCartTest test log appears. Select the Events tab to view the test details. You should see the following events: start of test suite, start of Loop_MyShoppingCart, test start, test verdict, test stop, second test start, second test verdict, second test stop, loop stop,  test suite verdict, and  test suite stop.<br />
221
		<img border="0" src="../images/testTutorial_JUnitSuccess.gif"
222
			width="666" height="420" alt=""/></li></ol><br />
223
<h2><a name="CreateDatapool">Creating a datapool and initializing test
224
data</a></h2>
225
<br />In this procedure, you create a simple datapool to store test data.  Using the datapool editor, you define a datapool's structural
226
	elements, including variables (columns), records (rows), and
227
	equivalence classes (groups of related records).<br /><ol>
228
	<li>Create a CSV (comma delimited) file including your test data. Typically, you can export data in a spreadsheet application or database to CSV format. In this tutorial, however, you type the data in a text editor.
229
	<ul>
230
		<li>Type the following in a text editor. <pre>
231
,ModelNumber::String,Description::String,Price::Double
232
flowers,F0001,Orchid,5.99
233
flowers,F0002,Tulip,1.99
234
flowers,F0003,Yellow Carnation,6.99
235
flowers,F0004,White Rose,9.99
236
flowers,F0005,Geraniums,4.99</pre>
237
</li><li>Save the file as flowerData.csv in a temporary external location.</li>
238
	</ul>
239
	</li>
240
241
	<li class="skipspace"><span>In Eclipse, open the Test perspective.</span>
242
	<ul>
243
		<li>From the File menu, choose <b>Window &gt; Open Perspective &gt;
244
		Other</b>.</li>
245
		<li>Select <b>Test</b> and click <b>OK</b>. The Test Navigator
246
		appears.</li>
247
	</ul>
248
	</li>
249
	<li class="skipspace"><span>In the Test Navigator, right-click a
250
	project and select <span class="uicontrol">New &gt; Test Elemen<b>t</b></span><b>...</b>
251
	The <span class="uicontrol">New Test Element </span> dialog appears.</span></li>
252
	<li class="skipspace"><span>In the Wizards list box, expand the <span
253
		class="uicontrol">Test Assets</span> folder and select <span
254
		class="uicontrol">Datapool</span>.</span></li>
255
	<li class="skipspace"><span>Click <b>Next</b>. The <span
256
		class="uicontrol">New Datapool</span> dialog appears.</span></li>
257
	<li class="skipspace"><span>Choose the datapool project folder and
258
	datapool name. In the list of existing projects, select the
259
	<b>datapoolExample</b> project. In the <span class="uicontrol">Name</span>
260
	field, type shoppingCartDatapool.</span> Click <b>Next</b> to
261
	continue and then <b>Next</b> again to open the CSV (comma delimited) file import page.</li>
262
	<li class="skipspace">Import  the
263
	CSV  file flowerData.csv.<ul>
264
		<li><span>In the <span class="uicontrol">CSV File</span> field, click <span class="uicontrol">Browse</span>
265
		and  navigate to flowerData.csv.</span></li>
266
		<li><span>Check the <span class="uicontrol">First row
267
		contains variable names and suggested types</span></span> option. The first row of flowerData.csv contains column headings and types.</li>
268
		<li>Check the <span><span class="uicontrol">First column contains
269
		equivalence class names</span></span> option.  Equivalence classes group related data. The first column of flowerData.csv specifies a single equivalence class called flowers.</li></ul>
270
	</li>
271
	<li class="skipspace"><span>Click <span class="uicontrol">Finish</span>.</span> If you specified initial datapool dimensions, which may conflict with the CSV file dimensions, a dialog appears. Click <b>Yes</b> to use the dimensions of the CSV file. Click <b>No</b> to use the specified initial dimensions (and possibly truncate the CSV file data).<span>
272
	</span>The Datapool editor appears, showing the data contained in the flowers equivalence class. <br />
273
	<img
274
		border="0" src="../images/testTutorial_datapoolAppears.gif"
275
		width="354" height="416" alt=""/> 
276
		<br />For detailed information about creating a datapool, see <a
277
		href="../tasks/tcreatedp.htm">Creating a datapool</a>.</li>
278
</ol>
279
<h2><a name="ModifyTestCasesDP"><br />
280
Modifying test cases to reference a
281
datapool</a></h2>
282
<br />In this procedure, you use the datapool API  to replace hard-coded test values with
283
	references to datapool columns.
284
285
<h3>Adding libraries required by the datapool API</h3>The datapool API requires various TPTP and  Eclipse Modeling Framework (EMF) libraries. In this procedure, you add the libraries to your Java build path.<br />
286
<ol>
287
	<li>Open the Java Perspective. From the file menu choose <b>Window &gt;
288
	Open Perspective &gt; Java</b>.</li>
289
	<li>Open the <b>datapoolExample</b> project properties. In the Navigator or Package Explorer window, right-click the <b>datapoolExample</b> project folder and choose <b>Properties</b>. The Properties for <b>datapoolExample</b> dialog appears.</li>
290
	<li>Add the following library JARs to the Java build path of the <b>datapoolExample</b> project:
291
292
	<p>
293
	<ul>
294
		<li><b><i>org.eclipse.tptp.platform.models_&lt;version&gt;/tptp-models.jar</i></b></li>
295
		<li><b><i>org.eclipse.tptp.platform.models.hierarchy_&lt;version&gt;/tptp-models-hierarchy.jar</i></b></li>
296
		<li><b><i>org.eclipse.emf.common_&lt;version&gt;.jar</i></b></li>
297
		<li><b><i>org.eclipse.emf.ecore_&lt;version&gt;.jar</i></b></li>
298
		<li><b><i>org.eclipse.emf.ecore.xmi_&lt;version&gt;.jar</i></b></li>
299
		<li><b><i>org.eclipse.equinox.common_&lt;version&gt;.jar</i></b></li>
300
	</ul>
301
 	</p>
302
 	
303
	<p>where <b><i>&lt;version&gt;</i></b> is the current version of the library JAR.</p>
304
305
	<p>Steps:</p>
306
	
307
	<ul>
308
		<li>In the left pane, select <b>Java Build Path</b>. </li>
309
		<li>In the right pane, select the <b>Libraries</b> tab. </li>
310
		<li>For each of the library JARs, complete the following steps:
311
	
312
		<ul>
313
			<li>If the library JAR is on the Java build path of the <b>datapoolExample</b> project, continue to the next library JAR.  Otherwise, continue to the next step.</li>
314
			<li>Click <b>Add External JARs...</b>.</li>
315
			<li>Navigate to the directory containing the library JAR and select the JAR file.  The library JAR is contained in the same directory as the dependencies under the <b>TPTP Libraries</b> or <b>JUnit 3</b> classpath container for the <b>datapoolExample</b> project. </li>
316
			<li>Click <b>Open</b>.</li>
317
		</ul>
318
		</li>
319
	</ul>
320
	</li>
321
	<li>Click <b>OK</b> to close the Properties dialog.</li>
322
</ol><h3><br />
323
Using the datapool API</h3>In this procedure,  you modify the MyShoppingCartTest class and testMyShoppingCartConstructor method to utilize the <span>
324
shoppingCartDatapool</span>.
325
<br />
326
<ol>
327
	<li>If required, open the Java Perspective. From the file menu choose <b>Window &gt;
328
	Open Perspective &gt; Java</b>.</li>
329
	<li>Open MyShoppingCartTest.java. In the Navigator, open the
330
	datapoolExample project folder and double-click
331
	MyShoppingCartTest.java. The MyShoppingCartTest.java contents
332
	appear in the Java editor.</li>
333
	<li>Add the following import statements to the MyShoppingCartTest class.<pre>import org.eclipse.hyades.execution.runtime.datapool.IDatapool;
334
import org.eclipse.hyades.execution.runtime.datapool.IDatapoolFactory;
335
import org.eclipse.hyades.execution.runtime.datapool.IDatapoolIterator;
336
import org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl;</pre></li>
337
	<li>Declare an IDatapoolIterator class instance. This class instance will be initialized in your set up code and used in test methods.<pre>public class MyShoppingCartTest extends HyadesTestCase {
338
	
339
	IDatapoolIterator dpIterator;
340
	
341
	//...</pre></li>
342
	<li>Modify the setUp method to initialize your datapool. In a TPTP JUnit test environment, the setUp method provides a common fixture. You can use setUp to initialize common test variables. <b>Note:</b> specify your fully qualified workspace path in place of <b>&lt;workspace&gt;</b> in the java.io.File constructor.<pre>protected void setUp() throws Exception {
343
	// Initialize the datapool factory
344
	IDatapoolFactory dpFactory = new Common_DatapoolFactoryImpl();
345
		
346
	// Load the shoppingCartDatapool datapool 
347
	IDatapool datapool = dpFactory.load(
348
			new java.io.File(&quot;<b>&lt;workspace&gt;</b>\\datapoolExample\\shoppingCartDatapool.datapool&quot;),
349
			false);
350
		   
351
	// Create an iterator to traverse the datapool
352
	dpIterator = dpFactory.open(datapool,&quot;org.eclipse.hyades.datapool.iterator.DatapoolIteratorSequentialPrivate&quot;);
353
	
354
	// Initialize the datapool to traverse the first equivalence class.
355
	dpIterator.dpInitialize(datapool,0);
356
}</pre><b>Notes: </b>
357
	<ul>
358
		<li>The second parameter in the IDatapoolFactory load method indicates if the datapool instance is shared. If true the datapool cache is checked for an existing copy of the datapool. If false, the datapool is a private instance. Modifying a shared datapool instance may affect other users, and is only recommended for confined environments.</li>
359
		<li>If you want to programmatically edit a datapool import org.eclipse.hyades.edit.datapool.</li>
360
		<li>The second parameter in the IDatapoolFactory open method represents the type of iterator. For shared datapools use DatapoolIteratorSequentialPrivate.</li>
361
	</ul>
362
	</li><li>Modify the testMyShoppingCartConstructor method to utilize  the <span>
363
	shoppingCartDatapool</span>.
364
<pre>public void testMyShoppingCartConstructor()
365
throws Exception
366
{
367
	MyShoppingCart cart = new MyShoppingCart();
368
		
369
	// Traverse through datapool...
370
	// Test if constructor initializes each flower record appropriately
371
	while(!dpIterator.dpDone())
372
	{
373
		String Description = dpIterator.dpCurrent().getCell(&quot;Description&quot;).getStringValue();
374
		double datapoolPrice = dpIterator.dpCurrent().getCell(&quot;Price&quot;).getDoubleValue();
375
		
376
		// Test if the flower is accounted for in the application
377
		Double applicationPrice;
378
		assertNotNull(applicationPrice = (Double)cart.myFlowers.get(Description));
379
		
380
		// Test that the application price equals the price in the datapool 
381
		assertTrue(applicationPrice.doubleValue() == datapoolPrice);
382
		
383
		dpIterator.dpNext();
384
	}
385
}</pre></li><li>Save MyShoppingCartTest.java. From the file menu, choose <b>File
386
	&gt; Save</b>.</li>
387
	<li>Add the datapool to your testArtifact.
388
		<ul>
389
			<li>Open the Test Perspective. In the Test Navigator, double-click testDeployment to open it in the editor.</li>
390
			<li>In the <b>Pairs</b> tab, select testAsset and click <b>Open...</b></li>
391
		<li>In the <b>Test Assets</b> tab, click <b>Add...</b>. Select the datapool and click <b>OK</b>. Save the asset.</li>
392
	</ul>
393
	</li>
394
	<li>Run the test using your custom deployment.<ul>
395
		<li>Open the Test Perspective. In the Test Navigator, right-click the MyShoppingCartTest test suite and choose <b>Run
396
		As &gt; Run...</b>.  The Run configuration dialog appears.</li>
397
		<li>In the left pane of the Run configuration, choose the MyShoppingCartTest test suite.</li>
398
		<li>In the right pane of the Run configuration, select the deployment you created in the <a
399
			href="#BeforeYouBegin">Before You Begin</a> section. </li>
400
		<li>In the Test Logs tab, clear the <b>Use defaults option</b> and
401
		select the datapoolExample project folder for the location.</li>
402
		<li>Click <b>Run</b> to launch the test.</li>
403
	</ul></li>
404
	<b>Notes: </b>
405
	<ul>		
406
		<li>If the deployment you select contains any encrypted datapools, a dialog will be shown after you have launched the test to require the password for each encrypted datapool that contained in the deployment.</li>		
407
	</ul>
408
		<li>Double-click the new MyShoppingCartTest test log, which appears in the Test Navigator. The MyShoppingCartTest test log appears. Select the Events tab to view the test result details.</li></ol>
409
</div><div><p>
410
<br />
411
<b>Related concepts</b>
412
<br />
413
<a href="../concepts/ccommontestingtasksandconcepts.htm">Common testing
414
tasks and concepts</a><br />
415
<br />
416
<b>Related tasks</b> <br />
417
<a href="../tasks/tdeploymentintro.htm">Creating a Test Deployment</a><br />
418
<a href="../tasks/tdatapool.htm">Providing tests with variable data</a>
419
<br />
420
<a href="../tasks/tptpJUnitTest_creatingManually.htm">Creating a JUnit
421
test manually</a><br />
422
 </p>
423
</div>
424
</body>
425
</html>
(-)samples/saccessdatapool.htm (+419 lines)
Added Link Here
1
<!DOCTYPE html
2
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html lang="en-us" xml:lang="en-us">
4
<!-- 
5
/**********************************************************************
6
 * Copyright (c) 2009 IBM Corporation.
7
 * All rights reserved. This content is made available under 
8
 * the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
10
 * http://www.eclipse.org/legal/epl-v10.html        
11
 * $Id$
12
 *
13
 * Contributors:
14
 * IBM - Initial contribution
15
 **********************************************************************/  
16
 -->
17
18
<head>
19
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
20
<meta name="security" content="public" />
21
<meta name="Robots" content="index,follow" />
22
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
23
<meta name="DC.Type" content="task" />
24
<meta name="DC.Title" content="Accessing a datapool from a Hyades test" />
25
<meta name="abstract" content="You can use a datapool from a Hyades test by making calls to the datapool API from a test's generated Java code." />
26
<meta name="description" content="You can use a datapool from a Hyades test by making calls to the datapool API from a test's generated Java code." />
27
<meta name="DC.Relation" scheme="URI" content="../tasks/tdatapool.dita" />
28
<meta name="DC.Format" content="XHTML" />
29
<meta name="DC.Identifier" content="taccessdp" />
30
<meta name="DC.Language" content="en-us" />
31
<link rel="stylesheet" type="text/css" href="../css/ibmdita.css" />
32
<link rel="stylesheet" type="text/css" href="../css/swg_info_common.css" />
33
<title>Tutorial: Accessing a datapool from a TPTP JUnit test</title>
34
</head>
35
<body>
36
37
<h1 class="topictitle1">Tutorial: Accessing a datapool from a TPTP JUnit test</h1>
38
<div>
39
<h2><br />
40
Objectives:</h2>
41
<p>To create and access a datapool from an example test application using the Eclipse Test and
42
Performance Tools Platform (TPTP). </p><h2>
43
Time required</h2>
44
<p>1 hour</p>
45
<h2><strong><a name="BeforeYouBegin">Before you begin</a></strong></h2>
46
<p><span>Before you start this tutorial,
47
you need to <span> </span></span></p>
48
<ol>
49
	<li>
50
	<span><span>Install Eclipse and the Eclipse Test and Performance Tools
51
	Platform (TPTP).</span></span></li>
52
	<li>Have a basic understanding of JUnit testing. For more information about JUnit testing, see <a
53
		href="http://www.junit.org">www.junit.org</a>.</li>
54
	<li>Configure and run the Agent Controller which corresponds to your TPTP version. For more information, see <a
55
		href="http://www.eclipse.org/tptp/home/downloads/installguide/HyadesDataCollection.html">
56
	Getting started with the Agent Controller</a>.<br />
57
	</li></ol>
58
<h2><br />
59
<strong>Description</strong></h2>
60
<p><span>In this tutorial,
61
you create and test an  application called MyShoppingCart. Using the Eclipse Test and Performance Tools Platform (TPTP), you develop JUnit tests and create a datapool to provide data to the test environment.<br /></span><br />
62
This tutorial guides you through the following procedures:</p>
63
<ol>
64
	<li><a href="#CreateUserApp">Creating a sample user application</a></li>
65
	<li><a href="#SetupTestApp" target="_self">Setting up a TPTP test
66
	suite</a></li>
67
	<li><a href="#CreateDatapool">Creating a datapool and initializing test
68
	data</a></li>
69
	<li><a href="#ModifyTestCasesDP">Modifying test cases to reference a
70
	datapool</a><br />
71
	</li>
72
</ol>
73
74
75
<h2><a name="CreateUserApp">Creating a sample user application</a></h2><br />
76
In this procedure, you develop the MyShoppingCart class. In subsequent procedures, you will use the  Eclipse Test and Performance Tools Platform to develop a corresponding test environment.<br /><ol>
77
	<li>Create a new Eclipse Java Project. <ul>
78
		<li>From the File menu choose <b>File &gt; New &gt; Project...</b> The
79
		New Project dialog appears.</li>
80
		<li>In the Wizards list, select <b>Java Project</b> and click <b>Next</b>.
81
		The Create a Java project page appears.</li>
82
		<li>Type <tt>datapoolExample</tt> for the Project name and click <b>Finish</b>.
83
		The datapoolExample project appears in the Navigator view.<br />
84
		</li>
85
	</ul>
86
	</li>
87
	<li>Create the MyShoppingCart class.<ul>
88
		<li>In the Navigator view, right-click the <b>datapoolExample</b>
89
		project and choose <b>New &gt; Class</b>. The New Java Class dialog
90
		appears.</li>
91
		<li>Type <tt>MyShoppingCart</tt> in the <b>Name</b> field.</li>
92
		<li>Clear the option to create the main method <b>public static void
93
		main(String[] args)</b>.</li>
94
		<li>Click Finish. The MyShoppingCart.java file appears in the Java
95
		editor.</li>
96
		<li>Type the following for the MyShoppingCart source:<pre>
97
import java.util.Hashtable;
98
99
public class MyShoppingCart {
100
101
	public Hashtable myFlowers;
102
	
103
	public MyShoppingCart() {
104
	    
105
		myFlowers = new Hashtable();
106
		myFlowers.put("Orchid", new Double(5.99));
107
		myFlowers.put("Tulip", new Double(1.99));
108
		myFlowers.put("Yellow Carnation", new Double(6.99));
109
		myFlowers.put("White Rose", new Double(9.99));
110
		myFlowers.put("Geraniums", new Double(4.99));		
111
	}
112
	
113
	public double itemCost(String itemName, int itemQuantity)
114
	{
115
	     Double price = (Double)myFlowers.get(itemName);
116
		
117
	     if (price != null) {
118
	    	 return price.doubleValue()*itemQuantity;
119
	     }
120
	     
121
	     return -1;	    	 	    	 	     		
122
	}
123
}</pre></li>
124
		<li>Save MyShoppingCart.java. From the File menu choose <b>File &gt;
125
		Save</b>.</li>
126
	</ul>
127
	</li>
128
</ol>
129
<h2><a name="SetupTestApp">Setting up a  TPTP test suite</a></h2>
130
<br /> In this procedure, you develop a test suite for the the MyShoppingCart class. Using the  Eclipse Test and Performance Tools Platform, you develop a JUnit
131
	test for the itemCost method.<br /><ol>
132
	<li>Open the Test Perspective.
133
	<ul>
134
		<li>From the File menu, choose <b>Window &gt; Open Perspective &gt;
135
		Other</b>.</li>
136
		<li>Select <b>Test</b> and click <b>OK</b>. The <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a> appears.</li>
137
	</ul>
138
	</li>
139
	<li>Create a new TPTP JUnit Test.<ul>
140
		<li>In the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click the datapoolExample project and choose <b>New
141
		&gt; Test Element...</b></li>
142
		<li>In the Test Element dialog, select <b>TPTP JUnit test</b> and click <b>Next</b>. The New Test Case dialog appears, prompting you to add JUnit libraries. Click <b>Yes</b> to add JUnit libraries.</li>
143
		<li> In the New JUnit Test Source Code page, type <b>MyShoppingCartTest</b> in the <b>Name</b> field. In the <b>Select how the test behavior is edited</b> section, choose the edit <b>In
144
		the test editor</b> option (the default).</li>
145
		<li>Click<b> Finish</b>. The TPTP JUnit Test editor appears, showing the
146
		MyShoppingCartTest test suite. The Overview tab includes a test description, Source Information, and a Test Methods listing. Currently, no test methods are defined. For this tutorial, the TPTP JUnit Test editor generates method stubs so the <b>Implement
147
		Test Behavior as code</b> option in the <b>Source Information</b> section should be cleared. For more information, see 
148
		<a href="../concepts/cJUnitTestEditor.htm">JUnit Test Suite Editor</a>.</li>
149
	</ul>
150
151
		</li>
152
	<li>Add the testItemCost and testMyShoppingCartConstructor methods.
153
	<ul>
154
		<li>In the Test Methods tab, click Add. A default  name appears for your test.</li>
155
		<li>Add the testItemCost method. In the Name field, type <b>testItemCost</b> for the new test name. In the Description field, type <b>Test
156
		for the MyShoppingCart.itemCost(String, int) method</b>.</li>
157
		<li>Add the testMyShoppingCartConstructor method. In the Test Methods tab, click Add. In the Name field, type <b>testMyShoppingCartConstructor</b> for the new test name. In the Description field, type <b>Test
158
		for the MyShoppingCart constructor</b>.</li>
159
	</ul>
160
	</li>
161
	<li>Configure the test execution behavior.
162
	<ul>
163
		<li>Add a test execution loop. In the Behavior tab, click <b>Add..
164
		&gt; Loop</b>. In the Name field, type <b>Loop_MyShoppingCart</b>. In
165
		the Number of Iterations field, type <b>1</b> (the default value).</li>
166
		<li>Add a testMyShoppingCartConstructor invocation.  Select
167
		Loop_MyShoppingCart and click <b>Add... &gt; invocation</b>. The Test Invocation
168
		dialog appears. Select Select <b>testMyShoppingCartConstructor</b> and
169
		click OK.</li>
170
		<li>Add a testItemCost invocation.  Select
171
		Loop_MyShoppingCart and click <b>Add... &gt; invocation</b>. The Test
172
		Invocation dialog appears. Select <b>testItemCost</b> and click OK.</li>
173
		<li>Save the test suite. From the File menu, choose <b>File &gt; Save</b>.
174
		<br />
175
		<img border="0" src="../images/testTutorial_Behavior.gif" width="534"
176
			height="407" alt=""/> <br />
177
		Note: the Save command causes the TPTP JUnit Test editor to create
178
		test method stubs in <i>MyShoppingCartTest.java</i>.<br />
179
		</li>
180
	</ul>
181
	</li>
182
	<li>
183
	Enter code for the generated JUnit test methods testMyShoppingCartConstructor and testItemCost.<ul>
184
		<li>Open the Java Perspective. From the file menu choose <b>Window
185
		&gt; Open Perspective &gt; Other... &gt; Java</b>.</li>
186
		<li>Open MyShoppingCartTest.java. In the Navigator, open the datapoolExample project folder and double-click  MyShoppingCartTest.java. The MyShoppingCartTest.java contents appear in the Java editor, including code to setup and execute the test suite, and stub methods for  testMyShoppingCartConstructor and testItemCost.</li>
187
		<li>Type the following code for the testMyShoppingCartConstructor method.<pre>public void testMyShoppingCartConstructor()
188
throws Exception
189
{
190
	MyShoppingCart cart = new MyShoppingCart();
191
	Double priceOrchid = (Double)cart.myFlowers.get("Orchid");
192
	Double priceTulip = (Double)cart.myFlowers.get("Tulip");
193
	
194
	assertTrue(priceOrchid.doubleValue() == 5.99);
195
	assertTrue(priceTulip.doubleValue() == 1.99);
196
}</pre></li>
197
	<li>Type the following code for the testItemCost method.
198
<pre>public void testItemCost()
199
throws Exception
200
{
201
	MyShoppingCart cart = new MyShoppingCart();
202
	double priceForTwo = cart.itemCost("Orchid", 2);
203
	
204
	assertTrue(priceForTwo == 11.98);
205
}</pre>
206
</li><li>Save MyShoppingCartTest.java. From the file menu, choose <b>File
207
		&gt; Save</b>.</li></ul></li><li>Open the Test Perspective and create a test deployment. For an example, see <a href="../tasks/tdeploymentintro.htm">Creating a
208
	Test Deployment</a>.<br/></li>
209
	<li>
210
	Run the test using your custom deployment.<ul>
211
		<li>In the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click the MyShoppingCartTest test suite and choose <b>Run
212
		As &gt; Run...</b>.  The Run configuration dialog appears.</li>
213
		<li>In the Configurations pane, select <b>Test</b> and then click <b>New</b>.</li>
214
		<li>In the left pane of the Run configuration (<b>Select test to run</b>), expand datapoolExample and choose the MyShoppingCartTest test suite.</li>
215
		<li>In the right pane of the Run configuration, select the deployment you created section. </li>
216
		<li>In the Test Logs tab, clear the <b>Use defaults</b> option and
217
		select the datapoolExample project folder for the location.</li>
218
		<li>Click <b>Run</b> to launch the test.</li>
219
	</ul></li>
220
		<li>Double-click the MyShoppingCartTest test log, which appears in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>. The MyShoppingCartTest test log appears. Select the Events tab to view the test details. You should see the following events: start of test suite, start of Loop_MyShoppingCart, test start, test verdict, test stop, second test start, second test verdict, second test stop, loop stop,  test suite verdict, and  test suite stop.<br />
221
		<img border="0" src="../images/testTutorial_JUnitSuccess.gif"
222
			width="666" height="420" alt=""/></li></ol><br />
223
<h2><a name="CreateDatapool">Creating a datapool and initializing test
224
data</a></h2>
225
<br />In this procedure, you create a simple datapool to store test data.  Using the datapool editor, you define a datapool's structural
226
	elements, including variables (columns), records (rows), and
227
	equivalence classes (groups of related records).<br /><ol>
228
	<li>Create a CSV (comma delimited) file including your test data. Typically, you can export data in a spreadsheet application or database to CSV format. In this tutorial, however, you type the data in a text editor.
229
	<ul>
230
		<li>Type the following in a text editor. <pre>
231
,ModelNumber::String,Description::String,Price::Double
232
flowers,F0001,Orchid,5.99
233
flowers,F0002,Tulip,1.99
234
flowers,F0003,Yellow Carnation,6.99
235
flowers,F0004,White Rose,9.99
236
flowers,F0005,Geraniums,4.99</pre>
237
</li><li>Save the file as flowerData.csv in a temporary external location.</li>
238
	</ul>
239
	</li>
240
241
	<li class="skipspace"><span>In Eclipse, open the Test perspective.</span>
242
	<ul>
243
		<li>From the File menu, choose <b>Window &gt; Open Perspective &gt;
244
		Other</b>.</li>
245
		<li>Select <b>Test</b> and click <b>OK</b>. The <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>
246
		appears.</li>
247
	</ul>
248
	</li>
249
	<li class="skipspace"><span>In the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click a
250
	project and select <span class="uicontrol">New &gt; Test Elemen<b>t</b></span><b>...</b>
251
	The <span class="uicontrol">New Test Element </span> dialog appears.</span></li>
252
	<li class="skipspace"><span>In the Wizards list box, expand the <span
253
		class="uicontrol">Test Assets</span> folder and select <span
254
		class="uicontrol">Datapool</span>.</span></li>
255
	<li class="skipspace"><span>Click <b>Next</b>. The <span
256
		class="uicontrol">New Datapool</span> dialog appears.</span></li>
257
	<li class="skipspace"><span>Choose the datapool project folder and
258
	datapool name. In the list of existing projects, select the
259
	<b>datapoolExample</b> project. In the <span class="uicontrol">Name</span>
260
	field, type shoppingCartDatapool.</span> Click <b>Next</b> to
261
	continue and then <b>Next</b> again to open the CSV (comma delimited) file import page.</li>
262
	<li class="skipspace">Import  the
263
	CSV  file flowerData.csv.<ul>
264
		<li><span>In the <span class="uicontrol">CSV File</span> field, click <span class="uicontrol">Browse</span>
265
		and  navigate to flowerData.csv.</span></li>
266
		<li><span>Check the <span class="uicontrol">First row
267
		contains variable names and suggested types</span></span> option. The first row of flowerData.csv contains column headings and types.</li>
268
		<li>Check the <span><span class="uicontrol">First column contains
269
		equivalence class names</span></span> option.  Equivalence classes group related data. The first column of flowerData.csv specifies a single equivalence class called flowers.</li></ul>
270
	</li>
271
	<li class="skipspace"><span>Click <span class="uicontrol">Finish</span>.</span> If you specified initial datapool dimensions, which may conflict with the CSV file dimensions, a dialog appears. Click <b>Yes</b> to use the dimensions of the CSV file. Click <b>No</b> to use the specified initial dimensions (and possibly truncate the CSV file data).<span>
272
	</span>The Datapool editor appears, showing the data contained in the flowers equivalence class. <br />
273
	<img
274
		border="0" src="../images/testTutorial_datapoolAppears.gif"
275
		width="354" height="416" alt=""/> 
276
		<br />For detailed information about creating a datapool, see <a
277
		href="../tasks/tcreatedatapool.htm">Creating a datapool</a>.</li>
278
</ol>
279
<h2><a name="ModifyTestCasesDP"><br />
280
Modifying test cases to reference a
281
datapool</a></h2>
282
<br />In this procedure, you use the datapool API  to replace hard-coded test values with
283
	references to datapool columns.
284
285
<h3>Adding libraries required by the datapool API</h3>The datapool API requires various TPTP and  Eclipse Modeling Framework (EMF) libraries. In this procedure, you add the libraries to your Java build path.<br />
286
<ol>
287
	<li>Open the Java Perspective. From the file menu choose <b>Window &gt;
288
	Open Perspective &gt; Java</b>.</li>
289
	<li>Open the <b>datapoolExample</b> project properties. In the Navigator or Package Explorer window, right-click the <b>datapoolExample</b> project folder and choose <b>Properties</b>. The Properties for <b>datapoolExample</b> dialog appears.</li>
290
	<li>Add the following library JARs to the Java build path of the <b>datapoolExample</b> project:
291
292
	<p>
293
	<ul>
294
		<li><b><i>org.eclipse.tptp.platform.models_&lt;version&gt;/tptp-models.jar</i></b></li>
295
		<li><b><i>org.eclipse.tptp.platform.models.hierarchy_&lt;version&gt;/tptp-models-hierarchy.jar</i></b></li>
296
		<li><b><i>org.eclipse.emf.common_&lt;version&gt;.jar</i></b></li>
297
		<li><b><i>org.eclipse.emf.ecore_&lt;version&gt;.jar</i></b></li>
298
		<li><b><i>org.eclipse.emf.ecore.xmi_&lt;version&gt;.jar</i></b></li>
299
		<li><b><i>org.eclipse.equinox.common_&lt;version&gt;.jar</i></b></li>
300
	</ul>
301
 	</p>
302
 	
303
	<p>where <b><i>&lt;version&gt;</i></b> is the current version of the library JAR.</p>
304
305
	<p>Steps:</p>
306
	
307
	<ul>
308
		<li>In the left pane, select <b>Java Build Path</b>. </li>
309
		<li>In the right pane, select the <b>Libraries</b> tab. </li>
310
		<li>For each of the library JARs, complete the following steps:
311
	
312
		<ul>
313
			<li>If the library JAR is on the Java build path of the <b>datapoolExample</b> project, continue to the next library JAR.  Otherwise, continue to the next step.</li>
314
			<li>Click <b>Add External JARs...</b>.</li>
315
			<li>Navigate to the directory containing the library JAR and select the JAR file.  The library JAR is contained in the same directory as the dependencies under the <b>TPTP Libraries</b> or <b>JUnit 3</b> classpath container for the <b>datapoolExample</b> project. </li>
316
			<li>Click <b>Open</b>.</li>
317
		</ul>
318
		</li>
319
	</ul>
320
	</li>
321
	<li>Click <b>OK</b> to close the Properties dialog.</li>
322
</ol><h3><br />
323
Using the datapool API</h3>In this procedure,  you modify the MyShoppingCartTest class and testMyShoppingCartConstructor method to utilize the <span>
324
shoppingCartDatapool</span>.
325
<br />
326
<ol>
327
	<li>If required, open the Java Perspective. From the file menu choose <b>Window &gt;
328
	Open Perspective &gt; Java</b>.</li>
329
	<li>Open MyShoppingCartTest.java. In the Navigator, open the
330
	datapoolExample project folder and double-click
331
	MyShoppingCartTest.java. The MyShoppingCartTest.java contents
332
	appear in the Java editor.</li>
333
	<li>Add the following import statements to the MyShoppingCartTest class.<pre>import org.eclipse.hyades.execution.runtime.datapool.IDatapool;
334
import org.eclipse.hyades.execution.runtime.datapool.IDatapoolFactory;
335
import org.eclipse.hyades.execution.runtime.datapool.IDatapoolIterator;
336
import org.eclipse.hyades.models.common.datapool.impl.Common_DatapoolFactoryImpl;</pre></li>
337
	<li>Declare an IDatapoolIterator class instance. This class instance will be initialized in your set up code and used in test methods.<pre>public class MyShoppingCartTest extends HyadesTestCase {
338
	
339
	IDatapoolIterator dpIterator;
340
	
341
	//...</pre></li>
342
	<li>Modify the setUp method to initialize your datapool. In a TPTP JUnit test environment, the setUp method provides a common fixture. You can use setUp to initialize common test variables. <b>Note:</b> specify your fully qualified workspace path in place of <b>&lt;workspace&gt;</b> in the java.io.File constructor.<pre>protected void setUp() throws Exception {
343
	// Initialize the datapool factory
344
	IDatapoolFactory dpFactory = new Common_DatapoolFactoryImpl();
345
		
346
	// Load the shoppingCartDatapool datapool 
347
	IDatapool datapool = dpFactory.load(
348
			new java.io.File(&quot;<b>&lt;workspace&gt;</b>\\datapoolExample\\shoppingCartDatapool.datapool&quot;),
349
			false);
350
		   
351
	// Create an iterator to traverse the datapool
352
	dpIterator = dpFactory.open(datapool,&quot;org.eclipse.hyades.datapool.iterator.DatapoolIteratorSequentialPrivate&quot;);
353
	
354
	// Initialize the datapool to traverse the first equivalence class.
355
	dpIterator.dpInitialize(datapool,0);
356
}</pre><b>Notes: </b>
357
	<ul>
358
		<li>The second parameter in the IDatapoolFactory load method indicates if the datapool instance is shared. If true the datapool cache is checked for an existing copy of the datapool. If false, the datapool is a private instance. Modifying a shared datapool instance may affect other users, and is only recommended for confined environments.</li>
359
		<li>If you want to programmatically edit a datapool import org.eclipse.hyades.edit.datapool.</li>
360
		<li>The second parameter in the IDatapoolFactory open method represents the type of iterator. For shared datapools use DatapoolIteratorSequentialPrivate.</li>
361
	</ul>
362
	</li><li>Modify the testMyShoppingCartConstructor method to utilize  the <span>
363
	shoppingCartDatapool</span>.
364
<pre>public void testMyShoppingCartConstructor()
365
throws Exception
366
{
367
	MyShoppingCart cart = new MyShoppingCart();
368
		
369
	// Traverse through datapool...
370
	// Test if constructor initializes each flower record appropriately
371
	while(!dpIterator.dpDone())
372
	{
373
		String Description = dpIterator.dpCurrent().getCell(&quot;Description&quot;).getStringValue();
374
		double datapoolPrice = dpIterator.dpCurrent().getCell(&quot;Price&quot;).getDoubleValue();
375
		
376
		// Test if the flower is accounted for in the application
377
		Double applicationPrice;
378
		assertNotNull(applicationPrice = (Double)cart.myFlowers.get(Description));
379
		
380
		// Test that the application price equals the price in the datapool 
381
		assertTrue(applicationPrice.doubleValue() == datapoolPrice);
382
		
383
		dpIterator.dpNext();
384
	}
385
}</pre></li><li>Save MyShoppingCartTest.java. From the file menu, choose <b>File
386
	&gt; Save</b>.</li>
387
	<li>Add the datapool to your testArtifact.
388
		<ul>
389
			<li>Open the Test Perspective. In the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, double-click testDeployment to open it in the editor.</li>
390
			<li>In the <b>Pairs</b> tab, select testAsset and click <b>Open...</b></li>
391
		<li>In the <b>Test Assets</b> tab, click <b>Add...</b>. Select the datapool and click <b>OK</b>. Save the asset.</li>
392
	</ul>
393
	</li>
394
	<li>Run the test using your custom deployment.<ul>
395
		<li>Open the Test Perspective. In the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click the MyShoppingCartTest test suite and choose <b>Run
396
		As &gt; Run...</b>.  The Run configuration dialog appears.</li>
397
		<li>In the left pane of the Run configuration, choose the MyShoppingCartTest test suite.</li>
398
		<li>In the right pane of the Run configuration, select the deployment you created in the <a
399
			href="#BeforeYouBegin">Before You Begin</a> section. </li>
400
		<li>In the Test Logs tab, clear the <b>Use defaults option</b> and
401
		select the datapoolExample project folder for the location.</li>
402
		<li>Click <b>Run</b> to launch the test.</li>
403
	</ul></li>
404
	<b>Notes: </b>
405
	<ul>		
406
		<li>If the deployment you select contains any encrypted datapools, a dialog will be shown after you have launched the test to require the password for each encrypted datapool that contained in the deployment.</li>		
407
	</ul>
408
		<li>Double-click the new MyShoppingCartTest test log, which appears in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>. The MyShoppingCartTest test log appears. Select the Events tab to view the test result details.</li></ol>
409
</div>
410
411
<p>
412
<b>Related tasks</b><br/>
413
<a href="../concepts/cjunitintro.htm">Testing with JUnit</a><br />
414
<a href="../tasks/tdatapoolsintro.htm">Providing tests with variable data</a><br />
415
<a href="../tasks/tdeploymentintro.htm">Creating a test deployment</a><br />
416
</p>
417
418
</body>
419
</html>
(-)tasks/tcreatedatapool.htm (+94 lines)
Added Link Here
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
2
<html lang="en-us" xml:lang="en-us">
3
<!-- 
4
/**********************************************************************
5
 * Copyright (c) 2009 IBM Corporation.
6
 * All rights reserved.   This content
7
 * is made available under the terms of the Eclipse Public License v1.0
8
 * which accompanies this distribution, and is available at
9
 * http://www.eclipse.org/legal/epl-v10.html        
10
 * $Id$
11
 *
12
 * Contributors:
13
 * IBM - Initial contribution
14
 **********************************************************************/  
15
 -->
16
<head>
17
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
18
<link rel="StyleSheet" href="../css/book.css" type="text/css" />
19
20
<title>Creating a datapool</title>
21
</head>
22
23
<body>
24
25
<h1>Creating a datapool</h1>
26
27
<p>Datapools provide variable test data to tests during execution.  Test data (for example, input and output data) is stored in a 
28
datapool and substituted in the test during execution.  Test data can be added, modified, 
29
and deleted from the datapool and substituted in the test during execution without any 
30
modifications to the test.</p>
31
32
<p>Datapools contain three structural elements:</p>
33
34
<ul>
35
	<li><b>Equivalence class:</b> A subset of related test data in the datapool with an associated name that produces the equivalent pass/fail result for a test.  A datapool contains at least one equivalence class.</li>
36
	<br/>
37
	<br/>
38
	<li><b>Variable:</b> A column of test data within each equivalence class with an associated name and type.</li>
39
	<br/>
40
	<br/>
41
	<li><b>Record:</b> A slice or row of test data within an equivalence class with one or more variables.</li>
42
</ul>
43
44
<p>Datapools are created with the <b>New Datapool</b> wizard:</p>
45
46
<ol>
47
	<li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, select <b>New</b> &gt; <b>Test Element...</b> &gt; <b>Test Assets</b> &gt; <b>Datapool</b>, and click <b>Next</b>.</li>
48
    <li>Select the parent folder and define the name of the datapool and click <b>Next</b>.</li>
49
    <li>Provide a description for the datapool.</li>
50
    <li>Provide the dimensions for the datapool.  The dimensions represent the number of variables (or columns) and records (or rows) in each equivalence class of the datapool.</li>
51
    <li>Test data can be created and edited in a 
52
Comma-Separated Value (CSV) file editor (for example, Microsoft® Excel®) and imported into a new or existing datapool.  When working with large 
53
quantities of data, this approach is recommended.  To import test data from a Comma-Separated Value (CSV) file into the datapool, select <b>Import CSV file into the new datapool</b>:
54
    	<ul>
55
    		<li>Provide or select (click <b>Browse...</b>) the path to the Comma-Separated Value (CSV) file.</li>
56
    		<li>Select the encoding of the Comma-Separated Value (CSV) file.  This encoding is used to read the Comma-Separated Value (CSV) file.</li>
57
    		<li>Select <b>First row of the CSV file contains the variable names and optional suggested types</b> if the first row of the Comma-Separated Value (CSV) file contains the variable names and optional suggested types.  That is, the first row of the Comma-Separated Value (CSV) file contains: 
58
    			<br/><br/>
59
    			<p><i>&lt;variable 1 name&gt;[::&lt;variable 1 type&gt;],&lt;variable 2 name&gt;[::&lt;variable 2 type&gt;]...&lt;variable n name&gt;[::&lt;variable n type&gt;]</i></p>
60
    			<br/>
61
    		</li>
62
    		<li>Select <b>First column of the CSV file contains the equivalence class names and optional row numbers</b> if the first column of the CSV file contains the equivalence class names and optional row numbers.  That is, the first column of the Comma-Separated Value (CSV) file contains:
63
		    	<br/><br/>
64
		    	<p><i>&lt;equivalence class 1 name&gt;[::0]</i></p>
65
				<p><i>&lt;equivalence class 2 name&gt;[::1]</i></p>
66
				<p><i>...</i></p>
67
				<p><i>&lt;equivalence class n name&gt;[::&lt;n&gt;]</i></p>
68
				<br/>    
69
    		</li>
70
    	</ul>
71
    </li>
72
    <li>Click <b>Finish</b> to create the datapool.</li>
73
    <li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new datapool is to be opened in the Datapool editor.</li>
74
</ol>
75
76
<p>
77
<b>Related concepts</b><br/>
78
<a href="../concepts/cdatapooleditor.htm">Datapool Editor</a><br/>
79
</p>
80
81
<p>
82
<b>Related tasks</b><br/>
83
<a href="cdatapoolimport.htm">Importing a Comma-Separated Value (CSV) file as a Datapool</a><br/>
84
<a href="cdatapoolexport.htm">Exporting a Datapool as a Comma-Separated Value (CSV) file</a><br/>
85
</p>
86
87
<p>
88
<b>Related samples</b><br/>
89
<a href="../samples/saccessdatapool.htm">Tutorial: Accessing a datapool from a TPTP JUnit test</a><br/>
90
</p>
91
92
</body>
93
94
</html>
(-)tasks/tdatapoolsintro.htm (+56 lines)
Added Link Here
1
<!DOCTYPE html
2
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html lang="en-us" xml:lang="en-us">
4
<!-- 
5
/**********************************************************************
6
 * Copyright (c) 2009 IBM Corporation.
7
 * All rights reserved.   This content
8
 * is made available under the terms of the Eclipse Public License v1.0
9
 * which accompanies this distribution, and is available at
10
 * http://www.eclipse.org/legal/epl-v10.html        
11
 * $Id$
12
 *
13
 * Contributors:
14
 * IBM - Initial contribution
15
 **********************************************************************/  
16
 -->
17
<head>
18
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
19
<link rel="StyleSheet" href="../css/book.css" type="text/css" />
20
21
<title>Providing tests with variable data</title>
22
</head>
23
24
<body>
25
26
<h1>Providing tests with variable data</h1>
27
28
<p>This section describes providing tests with variable test data from a datapool.</p>
29
30
<ul>
31
	<li>
32
		<a href="tcreatedatapool.htm">Creating a datapool</a>
33
		<p>Datapools provide variable test data to tests during execution.</p>
34
		<br/>
35
	</li>
36
	<li>
37
		<a href="../samples/saccessdatapool.htm">Tutorial: Accessing a datapool from a TPTP JUnit test</a>
38
		<p>Tutorial to demonstrate using datapools with <a href="../concepts/cjunitintro.htm">TPTP JUnit tests</a>.</p>
39
		<br/>
40
	</li>
41
</ul>
42
43
<p>
44
<b>Related concepts</b><br/>
45
<a href="../concepts/cdatapooleditor.htm">Datapool Editor</a><br/>
46
</p>
47
48
<p>
49
<b>Related tasks</b><br/>
50
<a href="cdatapoolimport.htm">Importing a Comma-Separated Value (CSV) file as a Datapool</a><br/>
51
<a href="cdatapoolexport.htm">Exporting a Datapool as a Comma-Separated Value (CSV) file</a><br/>
52
</p>
53
54
</body>
55
56
</html>
(-)concepts/cdatapooleditor.htm (+131 lines)
Added Link Here
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
2
<html lang="en-us" xml:lang="en-us">
3
<!-- 
4
/**********************************************************************
5
 * Copyright (c) 2009 IBM Corporation.
6
 * All rights reserved. This content is made available under 
7
 * the terms of the Eclipse Public License v1.0
8
 * which accompanies this distribution, and is available at
9
 * http://www.eclipse.org/legal/epl-v10.html        
10
 * $Id$
11
 *
12
 * Contributors:
13
 * IBM - Initial contribution
14
 **********************************************************************/  
15
 -->
16
17
<head>
18
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
19
<link rel="StyleSheet" href="../css/book.css" type="text/css" />
20
21
<title>Datapool Editor</title>
22
</head>
23
24
<body>
25
26
<h1>Datapool Editor</h1>
27
28
<p>Datapools are edited using the Datapool Editor.  The editor contains the following tabs:</p> 
29
30
<h2>Overview</h2>
31
32
<p>This tab provides an overview of the datapool, including its general information, variables, and equivalence classes.</p>
33
34
<p>This tab contains the following sections:</p>
35
36
<ul>
37
	<li>
38
		<p><b>General Information</b></p>
39
		<p>Contains the datapool's name, description, and file path within the workspace.  The datapool's name<sup>1</sup> and description are editable.</p>
40
		<br/>
41
	</li>
42
	<li>
43
		<p><b>Variables</b></p>
44
		<p>Contains the variables associated with the datapool.</p>
45
		<br/>
46
		<p>Variables can be added to the list by clicking the <b>Add</b> button.</p>
47
		<br/>
48
		<p>Selected variables can be removed (<b>Remove</b>), moved up (<b>Up</b>), or moved down (<b>Down</b>).</p>
49
		<br/>
50
		<p>Variable names can be edited by double-clicking the variable or selecting the variable and pressing <b>F2</b>.</p>
51
		<br/>
52
	</li>
53
	<li>
54
		<p><b>Equivalence Classes</b></p>
55
		<p>Contains the equivalence classes associated with the datapool.</p>
56
		<br/>
57
		<p>Equivalence classes can be added to the list by clicking the <b>Add</b> button.</p>
58
		<br/>
59
		<p>Selected equivalence classes can be removed (<b>Remove</b>), moved up (<b>Up</b>), moved down (<b>Down</b>), or opened in the associated tab (<b>Open...</b>).</p>
60
		<br/>
61
		<p>Equivalence class names can be edited by double-clicking the equivalence class or selecting the equivalence class and pressing <b>F2</b>.</p>
62
		<br/>
63
	</li>
64
</ul>
65
66
<p>[1] Datapools have a file name and logical name.  The logical name is used in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a> of the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, dialogs, editors, and wizards to represent the datapool.
67
The file name represents the datapool file (<i>*.datapool</i>) within the workspace.  When the datapool is created, the logical name defaults to the file name 
68
(excluding the <i>.artifact</i> file extension) and may be modified without modifying the file name.  The logical name allows customization of the datapool name 
69
without affecting the file name within the workspace.</p>
70
71
<h2>Equivalence Classes<sup>2</sup></h2>
72
73
<p>This tab contains the datapool table with the variables (or columns) for the datapool, records (or rows) for the equivalence class, and cells for the records:</p>
74
75
<ul>
76
	<li>
77
		<p><b>Variables</b></p>
78
79
		<p>Each variable has an associated name and type (for example, String, Number, Boolean, Enumeration, and Complex) that are used in the variable column name (for example, 
80
		<i>&lt;variable name&gt;::&lt;variable type&gt;</i>) in the datapool table.  Each variable is positioned in the datapool table relative to the other variables 
81
		in the datapool.  Variables may be encrypted for sensitive data, such as user identifiers.  Variables are encrypted with a password for the datapool.</p>
82
		<br/>
83
		<p>Variables can be inserted (right-click on the datapool table and select <b>Insert Variable...</b>), removed (right-click a variable column in the datapool table and 
84
		select <b>Remove Variable</b>), and edited (right-click a variable column in the datapool table and select <b>Edit Variable...</b> or select the variable column name 
85
		in the datapool table).</p>
86
		<br/>
87
	</li>
88
	<li>
89
		<p><b>Records</b></p>
90
91
		<p>Each record has an associated number that is used in the first column in the datapool table.  Each record is positioned in the datapool table relative to the other records in the equivalence class.</p>
92
		<br/>
93
		<p>Records can be inserted (right-click on the datapool table and select <b>Insert Record</b>), removed (right-click the record number in the first column in the datapool table and 
94
		select <b>Remove Record</b>), and edited (right-click the record number in the first column in the datapool table and select <b>Edit Record...</b>).</p>
95
		<br/>
96
		<p>Individual selected records (click the record number in the first column in the datapool table) or multiple selected records (hold <b>Ctrl</b> and click the record numbers in the first 
97
		column in the datapool table) can be cut (right-click and select <b>Cut</b>, <b>Ctrl+X</b>, or select <b>Edit</b> &gt; <b>Cut</b> from the file menu),
98
		copied (right-click and select <b>Copy</b>, <b>Ctrl+C</b>, or select <b>Edit</b> &gt; <b>Copy</b> from the file menu), and deleted (press <b>Delete</b>).  Copied records can be pasted
99
		(right-click the record number in the first column in the datapool table and select <b>Paste</b>, <b>Ctrl+V</b>, or select <b>Edit</b> &gt; <b>Paste</b> from the file menu).</p>
100
		<br/>
101
	</li>
102
	<li>
103
		<p><b>Cells</b></p>
104
105
		<p>Cells can be edited by double-clicking the cell in the datapool table.</p>
106
		<br/>
107
		<p>Individual selected cells can be cut (right-click and select <b>Cut</b>, <b>Ctrl+X</b>, or select <b>Edit</b> &gt; <b>Cut</b> from the file menu),
108
		copied (right-click and select <b>Copy</b>, <b>Ctrl+C</b>, or select <b>Edit</b> &gt; <b>Copy</b> from the file menu), and deleted (press <b>Delete</b>).  Copied cells or the system clipboard can be pasted
109
		(right-click the cell and select <b>Paste</b>, <b>Ctrl+V</b>, or select <b>Edit</b> &gt; <b>Paste</b> from the file menu).  Finally, cells can be searched and replaced (<b>Ctrl+F</b> or select <b>Edit</b> 
110
		&gt; <b>Find/Replace</b> from the file menu).</p>
111
		<br/>
112
	</li>
113
</ul>
114
115
<p>[2] Each equivalence class has an associated tab named <i>&lt;Equivalence Class Name&gt;</i>.</p>
116
117
<p>
118
<b>Related tasks</b><br/>
119
<a href="../tasks/tcreatedatapool.htm">Creating a datapool</a><br/>
120
<a href="../tasks/cdatapoolimport.htm">Importing a Comma-Separated Value (CSV) file as a Datapool</a><br/>
121
<a href="../tasks/cdatapoolexport.htm">Exporting a Datapool as a Comma-Separated Value (CSV) file</a><br/>
122
</p>
123
124
<p>
125
<b>Related samples</b><br/>
126
<a href="../samples/saccessdatapool.htm">Tutorial: Accessing a datapool from a TPTP JUnit test</a><br/>
127
</p>
128
129
</body>
130
131
</html>
(-)tasks/cdatapoolimport.htm (+102 lines)
Added Link Here
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
2
<html lang="en-us" xml:lang="en-us">
3
<!-- 
4
/**********************************************************************
5
 * Copyright (c) 2009 IBM Corporation.
6
 * All rights reserved.   This content
7
 * is made available under the terms of the Eclipse Public License v1.0
8
 * which accompanies this distribution, and is available at
9
 * http://www.eclipse.org/legal/epl-v10.html        
10
 * $Id$
11
 *
12
 * Contributors:
13
 * IBM - Initial contribution
14
 **********************************************************************/  
15
 -->
16
<head>
17
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
18
<link rel="StyleSheet" href="../css/book.css" type="text/css" />
19
20
<title>Importing a Comma-Separated Value (CSV) file as a datapool</title>
21
</head>
22
23
<body>
24
25
<h1>Importing a Comma-Separated Value (CSV) file as a datapool</h1>
26
27
<p>Test data in a Comma-Separated Value (CSV) file can be imported into a new or existing datapool.  Test data can be created and edited in a 
28
Comma-Separated Value (CSV) file editor (for example, Microsoft® Excel®) and imported into a new or existing datapool.  This is the recommended
29
approach when working with large quantities of data.</p>
30
31
<p>Import test data from a Comma-Separated Value (CSV) file into a new datapool with the <b>Import CSV File as Datapool</b> wizard:</p>
32
33
<ol>
34
	<li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, and select <b>Import...</b>.</li>
35
	<li>Select <b>Test</b> &gt; <b>CSV File as Datapool</b>, and click <b>Next</b>.</li>
36
    <li>Provide or select (click <b>Browse...</b>) the path to the Comma-Separated Value (CSV) file.</li>
37
    <li>Select the encoding of the Comma-Separated Value (CSV) file.  This encoding is used to read the Comma-Separated Value (CSV) file.</li>
38
    <li>Select <b>First row of the CSV file contains the variable names and optional suggested types</b> if the first row of the Comma-Separated Value (CSV) file contains the variable names and optional suggested types.  That is, the first row of the Comma-Separated Value (CSV) file contains: 
39
    	<br/><br/>
40
    	<p><i>&lt;variable 1 name&gt;[::&lt;variable 1 type&gt;],&lt;variable 2 name&gt;[::&lt;variable 2 type&gt;]...&lt;variable n name&gt;[::&lt;variable n type&gt;]</i></p>
41
    	<br/>
42
    </li>
43
    <li>Select <b>First column of the CSV file contains the equivalence class names and optional record numbers</b> if the first column of the Comma-Separated Value (CSV) file contains the equivalence class names and optional record numbers.  That is, the first column of the Comma-Separated Value (CSV) file contains:
44
    	<br/><br/>
45
    	<p><i>&lt;equivalence class 1 name&gt;[::0]</i></p>
46
		<p><i>&lt;equivalence class 2 name&gt;[::1]</i></p>
47
		<p><i>...</i></p>
48
		<p><i>&lt;equivalence class n name&gt;[::&lt;n&gt;]</i></p>
49
		<br/>    
50
    </li>
51
	<li>Click <b>Next</b> and click <b>Next</b>.</li>
52
    <li>Select the parent folder and define the name of the new datapool.</li>
53
    <li>Click <b>Finish</b> to import test data from the Comma-Separated Value (CSV) file into the new datapool.</li>
54
    <li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the new datapool is to be opened in the Datapool editor.</li>
55
</ol>
56
57
<p>Import test data from a Comma-Separated Value (CSV) file into an existing datapool with the <b>Import CSV File as Datapool</b> wizard:</p>
58
59
<ol>
60
	<li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, select <b>Import</b>.</li>
61
	<li>Select <b>Test</b> &gt; <b>CSV File as Datapool</b>, and click <b>Next</b>.</li>
62
    <li>Provide or select (click <b>Browse...</b>) the path to the Comma-Separated Value (CSV) file.</li>
63
    <li>Select the encoding of the Comma-Separated Value (CSV) file.  This encoding is used to read the Comma-Separated Value (CSV) file.</li>
64
    <li>Select <b>First row of the CSV file contains the variable names and optional suggested types</b> if the first row of the Comma-Separated Value (CSV) file contains the variable names and optional suggested types.  That is, the first row of the Comma-Separated Value (CSV) file contains: 
65
    	<br/><br/>
66
    	<p><i>&lt;variable 1 name&gt;[::&lt;variable 1 type&gt;],&lt;variable 2 name&gt;[::&lt;variable 2 type&gt;]...&lt;variable n name&gt;[::&lt;variable n type&gt;]</i></p>
67
    	<br/>
68
    </li>
69
    <li>Select <b>First column of the CSV file contains the equivalence class names and optional record numbers</b> if the first column of the Comma-Separated Value (CSV) file contains the equivalence class names and optional record numbers.  That is, the first column of the Comma-Separated Value (CSV) file contains:
70
    	<br/><br/>
71
    	<p><i>&lt;equivalence class 1 name&gt;[::0]</i></p>
72
		<p><i>&lt;equivalence class 2 name&gt;[::1]</i></p>
73
		<p><i>...</i></p>
74
		<p><i>&lt;equivalence class n name&gt;[::&lt;n&gt;]</i></p>
75
		<br/>    
76
    </li>
77
	<li>Click <b>Next</b>.</li>
78
    <li>Select <b>Append to an existing datapool</b> to append the test data imported from a Comma-Separated Value (CSV) to an existing datapool.</li>
79
    <li>Select an existing datapool from the list of datapool.  Select <b>Show folders</b> to show the list of datapools in the workspace project structure.  If the selected datapool contains an encrypted variable, provide the password for the selected datapool.</li>
80
    <li>Click <b>Finish</b> to import test data from the Comma-Separated Value (CSV) file into the existing datapool.</li>
81
    <li>The <b>Confirm Open Editor</b> dialog may appear (see the <b>Window</b> &gt; <b>Preferences...</b> &gt; <b>Test</b> &gt; <b>Open Editor</b> preference), confirming if the existing datapool is to be opened in the Datapool editor.</li>
82
</ol>
83
84
<p>
85
<b>Related concepts</b><br/>
86
<a href="../concepts/cdatapooleditor.htm">Datapool Editor</a><br/>
87
</p>
88
89
<p>
90
<b>Related tasks</b><br/>
91
<a href="../tasks/tcreatedatapool.htm">Creating a datapool</a><br/>
92
<a href="cdatapoolexport.htm">Exporting a Datapool as a Comma-Separated Value (CSV) file</a><br/>
93
</p>
94
95
<p>
96
<b>Related samples</b><br/>
97
<a href="../samples/saccessdatapool.htm">Tutorial: Accessing a datapool from a TPTP JUnit test</a><br/>
98
</p>
99
100
</body>
101
102
</html>
(-)tasks/cdatapoolexport.htm (+79 lines)
Added Link Here
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
2
<html lang="en-us" xml:lang="en-us">
3
<!-- 
4
/**********************************************************************
5
 * Copyright (c) 2009 IBM Corporation.
6
 * All rights reserved.   This content
7
 * is made available under the terms of the Eclipse Public License v1.0
8
 * which accompanies this distribution, and is available at
9
 * http://www.eclipse.org/legal/epl-v10.html        
10
 * $Id$
11
 *
12
 * Contributors:
13
 * IBM - Initial contribution
14
 **********************************************************************/  
15
 -->
16
<head>
17
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
18
<link rel="StyleSheet" href="../css/book.css" type="text/css" />
19
20
<title>Exporting a datapool as a Comma-Separated Value (CSV) file</title>
21
</head>
22
23
<body>
24
25
<h1>Exporting a datapool as a Comma-Separated Value (CSV) file</h1>
26
27
<p>Test data in a datapool can be exported to a Comma-Separated Value (CSV) file.  Test data can exported from a datapool, edited in a 
28
Comma-Separated Value (CSV) file editor (for example, Microsoft® Excel®), and re-imported into a new or existing datapool.  This is the recommended
29
approach when working with large quantities of data.</p>
30
31
<p>Export test data from a datapool to a Comma-Separated Value (CSV) file with the <b>Export Datapool as CSV File</b> wizard:</p>
32
33
<ol>
34
	<li>Open the <a href='javascript:executeCommand("org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.hyades.ui.perspective.TestPerspective)")'>Test Perspective</a>, right-click in the <a href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.hyades.test.ui.TestNavigator)")'>Test Navigator</a>, and select <b>Export...</b>.</li>
35
	<li>Select <b>Test</b> &gt; <b>Datapool as CSV File</b>, and click <b>Next</b>.</li>
36
    <li>Select an existing datapool from the list of datapool.  Select <b>Show folders</b> to show the list of datapools in the workspace project structure.  If the selected datapool contains an encrypted variable, provide the password for the selected datapool.</li>
37
	<li>Click <b>Next</b>.</li>
38
    <li>Provide or select (click <b>Browse...</b>) the path to the new Comma-Separated Value (CSV) file.</li>
39
    <li>Select the encoding of the Comma-Separated Value (CSV) file.  This encoding is used to write the Comma-Separated Value (CSV) file.</li>
40
    <li>Select <b>Export the variable names and suggested types to the first row of the CSV file</b> if the first row of the Comma-Separated Value (CSV) file will contain the variable names and suggested types.  That is, the first row of the Comma-Separated Value (CSV) file will contain: 
41
    	<br/><br/>
42
    	<p><i>&lt;variable 1 name&gt;[::&lt;variable 1 type&gt;],&lt;variable 2 name&gt;[::&lt;variable 2 type&gt;]...&lt;variable n name&gt;[::&lt;variable n type&gt;]</i></p>
43
    	<br/>
44
    </li>
45
    <li>Select <b>Export the equivalence class names and record numbers to the first column of the CSV file</b> if the first column of the Comma-Separated Value (CSV) file will contain the equivalence class names and record numbers.  That is, the first column of the Comma-Separated Value (CSV) will contain:
46
    	<br/><br/>
47
    	<p><i>&lt;equivalence class 1 name&gt;[::0]</i></p>
48
		<p><i>&lt;equivalence class 2 name&gt;[::1]</i></p>
49
		<p><i>...</i></p>
50
		<p><i>&lt;equivalence class n name&gt;[::&lt;n&gt;]</i></p>
51
		<br/>    
52
    </li>
53
    <li>Select <b>Enclose cell values in XML tags</b> if the cell values of the Comma-Separated Value (CSV) file will be enclosed in XML tags.  That is, the cell values of the Comma-Separated Value (CSV) will contain:
54
    	<br/><br/>
55
    	<p>&lt;Literal&gt;<i>&lt;cell value&gt;</i>&lt;/Literal&gt;</p>
56
		<br/>    
57
    </li>
58
    <li>Click <b>Finish</b> to export test data from the datapool to the new Comma-Separated Value (CSV) file .</li>
59
</ol>
60
61
<p>
62
<b>Related concepts</b><br/>
63
<a href="../concepts/cdatapooleditor.htm">Datapool Editor</a><br/>
64
</p>
65
66
<p>
67
<b>Related tasks</b><br/>
68
<a href="../tasks/tcreatedatapool.htm">Creating a datapool</a><br/>
69
<a href="cdatapoolimport.htm">Importing a Comma-Separated Value (CSV) file as a datapool</a><br/>
70
</p>
71
72
<p>
73
<b>Related samples</b><br/>
74
<a href="../samples/saccessdatapool.htm">Tutorial: Accessing a datapool from a TPTP JUnit test</a><br/>
75
</p>
76
77
</body>
78
79
</html>

Return to bug 257266