View | Details | Raw Unified | Return to issue 120758
Collapse All | Expand All

(-)testgui/source/testcase/gui/svt/sc/OperationOnNewSC.java (-1 / +1 lines)
Lines 88-94 Link Here
88
				{ "2" }, { "3" }, { "1" }, { "2" }, { "3" } };
88
				{ "2" }, { "3" }, { "1" }, { "2" }, { "3" } };
89
		String pic = prepareData("svt/Sunset.jpg");
89
		String pic = prepareData("svt/Sunset.jpg");
90
90
91
		for(int i = 0; i < 1000; i++)
91
		for(int i = 0; i < 500; i++)
92
		{
92
		{
93
			// Data Sort
93
			// Data Sort
94
			app.dispatch("private:factory/scalc");
94
			app.dispatch("private:factory/scalc");
(-)testgui/source/testcase/gui/svt/sc/OperationOnSampleFile.java (-1 / +1 lines)
Lines 88-94 Link Here
88
		String pic = prepareData("svt/Sunset.jpg");
88
		String pic = prepareData("svt/Sunset.jpg");
89
		String [][] inputStr = { { "Area", "Item", "Count" }, { "1", "2", "3" },
89
		String [][] inputStr = { { "Area", "Item", "Count" }, { "1", "2", "3" },
90
				{ "4", "5", "6" }, { "7", "8", "9" }, { "10", "11", "12" }};	
90
				{ "4", "5", "6" }, { "7", "8", "9" }, { "10", "11", "12" }};	
91
		for(int i = 0; i < 1000; i++)
91
		for(int i = 0; i < 500; i++)
92
		{
92
		{
93
			app.dispatch(".uno:Open");
93
			app.dispatch(".uno:Open");
94
			submitOpenDlg(file);
94
			submitOpenDlg(file);
(-)testgui/source/testcase/gui/svt/sc/SwitchFilesContainingChart.java (+162 lines)
Line 0 Link Here
1
/**************************************************************
2
 * 
3
 * Licensed to the Apache Software Foundation (ASF) under one
4
 * or more contributor license agreements.  See the NOTICE file
5
 * distributed with this work for additional information
6
 * regarding copyright ownership.  The ASF licenses this file
7
 * to you under the Apache License, Version 2.0 (the
8
 * "License"); you may not use this file except in compliance
9
 * with the License.  You may obtain a copy of the License at
10
 * 
11
 *   http://www.apache.org/licenses/LICENSE-2.0
12
 * 
13
 * Unless required by applicable law or agreed to in writing,
14
 * software distributed under the License is distributed on an
15
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
 * KIND, either express or implied.  See the License for the
17
 * specific language governing permissions and limitations
18
 * under the License.
19
 * 
20
 *************************************************************/
21
22
/**
23
 * 
24
 */
25
26
package testcase.gui.svt.sc;
27
28
import static org.openoffice.test.common.Testspace.prepareData;
29
import static org.openoffice.test.vcl.Tester.sleep;
30
import static org.openoffice.test.vcl.Tester.typeKeys;
31
import static testlib.gui.AppUtil.submitOpenDlg;
32
import static testlib.gui.UIMap.ActiveMsgBox;
33
import static testlib.gui.UIMap.app;
34
import static testlib.gui.UIMap.calc;
35
36
import java.io.FileOutputStream;
37
import java.io.PrintStream;
38
import java.util.HashMap;
39
40
import org.junit.After;
41
import org.junit.Before;
42
import org.junit.Rule;
43
import org.junit.Test;
44
import org.openoffice.test.OpenOffice;
45
import org.openoffice.test.common.SystemUtil;
46
import org.openoffice.test.common.Testspace;
47
48
import testlib.gui.Log;
49
50
public class SwitchFilesContainingChart {
51
	@Rule
52
	public Log LOG = new Log();
53
	
54
	private PrintStream result = null;
55
	
56
	private String pid = null;
57
	
58
	/**
59
	 * @throws java.lang.Exception
60
	 */
61
	@Before
62
	public void setUp() throws Exception {
63
		OpenOffice.killAll();
64
		app.start();
65
		result = new PrintStream(new FileOutputStream(Testspace.getFile("output/svt_sc_switchFiles.csv")));
66
		HashMap<String, Object> proccessInfo = SystemUtil.findProcess(".*(soffice\\.bin|soffice.*-env).*");
67
		pid = (String)proccessInfo.get("pid");
68
		result.println("Iterator,Time,Memory(KB),CPU(%)");
69
		LOG.info("Result will be saved to " + Testspace.getPath("output/svt_sc_switchFiles.csv"));
70
	}
71
72
	@After
73
	public void tearDown() throws Exception {
74
		app.close();
75
		result.close();
76
	}
77
	
78
	@Test
79
	public void SwitchFileContainingChart() throws Exception {
80
		String file1 = prepareData("svt/sc_chart edit mod close_1.ods");
81
		String file2 = prepareData("svt/sc_chart edit mod close_2.ods");
82
		String file3 = prepareData("svt/sc_chart edit mod close_3.ods");
83
		String file4 = prepareData("svt/sc_chart edit mod close_4.ods");
84
		String file5 = prepareData("svt/sc_chart edit mod close_5.ods");
85
		String file6 = prepareData("svt/sc_chart edit mod close_6.ods");
86
		
87
		for(int i = 0; i < 500; i++)
88
		{
89
			app.dispatch(".uno:Open");
90
			submitOpenDlg(file1);
91
			calc.waitForExistence(20, 2);
92
			sleep(2);
93
			
94
			app.dispatch(".uno:Open");
95
			submitOpenDlg(file2);
96
			calc.waitForExistence(20, 2);
97
			sleep(2);
98
			
99
			app.dispatch(".uno:Open");
100
			submitOpenDlg(file3);
101
			calc.waitForExistence(20, 2);
102
			sleep(2);
103
			
104
			app.dispatch(".uno:Open");
105
			submitOpenDlg(file4);
106
			calc.waitForExistence(20, 2);
107
			sleep(2);
108
			
109
			app.dispatch(".uno:Open");
110
			submitOpenDlg(file5);
111
			calc.waitForExistence(20, 2);
112
			sleep(2);
113
			
114
			app.dispatch(".uno:Open");
115
			submitOpenDlg(file6);
116
			calc.waitForExistence(20, 2);
117
		
118
			sleep(2);
119
			
120
			selectCertainFile(2);
121
			sleep(2);
122
			selectCertainFile(6);
123
			sleep(2);
124
			selectCertainFile(8);
125
			sleep(2);
126
			
127
			closeAlldocuments();
128
			sleep(5);
129
			
130
			HashMap<String, Object> perfData = SystemUtil.getProcessPerfData(pid);
131
			String record = i + "," + System.currentTimeMillis() + "," + perfData.get("rss") + "," + perfData.get("pcpu");
132
			LOG.info("Record: " + record);
133
			result.println(record);
134
			result.flush();
135
			
136
			sleep(3);
137
		}
138
		
139
	
140
	}
141
	
142
	public void selectCertainFile(int k){
143
		calc.menuItem("Window").select();
144
		k += 5;
145
		for(int i=0;i<k;i++){
146
		    typeKeys("<down>");   
147
		}
148
		typeKeys("<enter>");
149
		sleep(2);
150
//		DocWindow.scEdit.doubleClick(atPoint(438,131));
151
	}
152
	
153
	public void closeAlldocuments(){
154
		for(int index=3;index<9;index++){
155
			//SelectActivedocument(4);
156
			calc.menuItem("File->Close").select();
157
			sleep(2);
158
		}
159
		
160
	}
161
162
}
(-)testgui/source/testcase/gui/svt/sd/DragOLEObject.java (+123 lines)
Line 0 Link Here
1
/**************************************************************
2
 * 
3
 * Licensed to the Apache Software Foundation (ASF) under one
4
 * or more contributor license agreements.  See the NOTICE file
5
 * distributed with this work for additional information
6
 * regarding copyright ownership.  The ASF licenses this file
7
 * to you under the Apache License, Version 2.0 (the
8
 * "License"); you may not use this file except in compliance
9
 * with the License.  You may obtain a copy of the License at
10
 * 
11
 *   http://www.apache.org/licenses/LICENSE-2.0
12
 * 
13
 * Unless required by applicable law or agreed to in writing,
14
 * software distributed under the License is distributed on an
15
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
 * KIND, either express or implied.  See the License for the
17
 * specific language governing permissions and limitations
18
 * under the License.
19
 * 
20
 *************************************************************/
21
22
/**
23
 * 
24
 */
25
26
package testcase.gui.svt.sd;
27
28
import static org.openoffice.test.common.Testspace.prepareData;
29
import static org.openoffice.test.vcl.Tester.sleep;
30
import static testlib.gui.AppUtil.submitOpenDlg;
31
import static testlib.gui.UIMap.ActiveMsgBox;
32
import static testlib.gui.UIMap.app;
33
import static testlib.gui.UIMap.impress;
34
35
import java.io.FileOutputStream;
36
import java.io.PrintStream;
37
import java.util.HashMap;
38
39
import org.junit.After;
40
import org.junit.Before;
41
import org.junit.Rule;
42
import org.junit.Test;
43
import org.openoffice.test.OpenOffice;
44
import org.openoffice.test.common.SystemUtil;
45
import org.openoffice.test.common.Testspace;
46
47
import testlib.gui.Log;
48
49
public class DragOLEObject {
50
	
51
	@Rule
52
	public Log LOG = new Log();
53
	
54
	private PrintStream result = null;
55
	
56
	private String pid = null;
57
	
58
	/**
59
	 * @throws java.lang.Exception
60
	 */
61
	@Before
62
	public void setUp() throws Exception {
63
		OpenOffice.killAll();
64
		app.start();
65
		result = new PrintStream(new FileOutputStream(Testspace.getFile("output/svt_sd_dragOLE.csv")));
66
		HashMap<String, Object> proccessInfo = SystemUtil.findProcess(".*(soffice\\.bin|soffice.*-env).*");
67
		pid = (String)proccessInfo.get("pid");
68
		result.println("Iterator,Time,Memory(KB),CPU(%)");
69
		LOG.info("Result will be saved to " + Testspace.getPath("output/svt_sd_dragOLE.csv"));
70
	}
71
72
	@After
73
	public void tearDown() throws Exception {
74
		app.close();
75
		result.close();
76
	}
77
	
78
	@Test
79
	public void DragOLEObject() throws Exception {
80
		String file = prepareData("svt/DragOLESample.odp");
81
		for(int i = 0; i < 500; i++)
82
		{
83
			app.dispatch(".uno:Open");
84
			submitOpenDlg(file);
85
			impress.waitForExistence(10, 2);
86
			sleep(5);
87
			
88
			impress.click(0.2, 0.2);
89
			sleep(5);
90
			impress.menuItem("Edit->Copy").select();
91
			sleep(5);
92
			impress.menuItem("Edit->Paste").select();
93
			sleep(5);
94
			
95
			impress.click(0.2, 0.5);
96
			sleep(5);
97
			impress.menuItem("Edit->Copy").select();
98
			sleep(5);
99
			impress.menuItem("Edit->Paste").select();
100
			sleep(5);
101
			
102
			impress.click(0.2, 0.8);
103
			sleep(5);
104
			impress.menuItem("Edit->Copy").select();
105
			sleep(5);
106
			impress.menuItem("Edit->Paste").select();
107
			sleep(5);
108
			
109
			impress.menuItem("File->Close").select();
110
			ActiveMsgBox.no();
111
			sleep(2);
112
			
113
			HashMap<String, Object> perfData = SystemUtil.getProcessPerfData(pid);
114
			String record = i + "," + System.currentTimeMillis() + "," + perfData.get("rss") + "," + perfData.get("pcpu");
115
			LOG.info("Record: " + record);
116
			result.println(record);
117
			result.flush();
118
			
119
			sleep(3);
120
		}
121
	}
122
123
}
(-)testgui/source/testcase/gui/svt/sd/OperationOnNewSD.java (-1 / +1 lines)
Lines 81-87 Link Here
81
	public void operationOnNewSW() throws Exception {
81
	public void operationOnNewSW() throws Exception {
82
		String externalFile = prepareData("svt/sd_plain_50p.odp");
82
		String externalFile = prepareData("svt/sd_plain_50p.odp");
83
		String pic = prepareData("svt/Sunset.jpg");
83
		String pic = prepareData("svt/Sunset.jpg");
84
		for(int i = 0; i < 1000; i++)
84
		for(int i = 0; i < 500; i++)
85
		{
85
		{
86
//			Create a new SD
86
//			Create a new SD
87
			app.dispatch("private:factory/simpress?slot=6686");
87
			app.dispatch("private:factory/simpress?slot=6686");
(-)testgui/source/testcase/gui/svt/sd/SwitchDiffViewsOnOdpFile.java (+114 lines)
Line 0 Link Here
1
/**************************************************************
2
 * 
3
 * Licensed to the Apache Software Foundation (ASF) under one
4
 * or more contributor license agreements.  See the NOTICE file
5
 * distributed with this work for additional information
6
 * regarding copyright ownership.  The ASF licenses this file
7
 * to you under the Apache License, Version 2.0 (the
8
 * "License"); you may not use this file except in compliance
9
 * with the License.  You may obtain a copy of the License at
10
 * 
11
 *   http://www.apache.org/licenses/LICENSE-2.0
12
 * 
13
 * Unless required by applicable law or agreed to in writing,
14
 * software distributed under the License is distributed on an
15
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
 * KIND, either express or implied.  See the License for the
17
 * specific language governing permissions and limitations
18
 * under the License.
19
 * 
20
 *************************************************************/
21
22
/**
23
 * 
24
 */
25
26
package testcase.gui.svt.sd;
27
28
import static org.openoffice.test.common.Testspace.prepareData;
29
import static testlib.gui.AppUtil.submitOpenDlg;
30
import static testlib.gui.UIMap.*;
31
32
import java.io.FileOutputStream;
33
import java.io.PrintStream;
34
import java.util.HashMap;
35
36
import org.junit.After;
37
import org.junit.Before;
38
import org.junit.Rule;
39
import org.junit.Test;
40
import org.openoffice.test.OpenOffice;
41
import org.openoffice.test.common.SystemUtil;
42
import org.openoffice.test.common.Testspace;
43
import static org.openoffice.test.vcl.Tester.*;
44
45
import testlib.gui.Log;
46
47
public class SwitchDiffViewsOnOdpFile {
48
	@Rule
49
	public Log LOG = new Log();
50
	
51
	private PrintStream result = null;
52
	
53
	private String pid = null;
54
	
55
	/**
56
	 * @throws java.lang.Exception
57
	 */
58
	@Before
59
	public void setUp() throws Exception {
60
		OpenOffice.killAll();
61
		app.start();
62
		result = new PrintStream(new FileOutputStream(Testspace.getFile("output/svt_sd_switchViews.csv")));
63
		HashMap<String, Object> proccessInfo = SystemUtil.findProcess(".*(soffice\\.bin|soffice.*-env).*");
64
		pid = (String)proccessInfo.get("pid");
65
		result.println("Iterator,Time,Memory(KB),CPU(%)");
66
		LOG.info("Result will be saved to " + Testspace.getPath("output/svt_sd_switchViews.csv"));
67
	}
68
69
	@After
70
	public void tearDown() throws Exception {
71
		app.close();
72
		result.close();
73
	}
74
	
75
	@Test
76
	public void switchDiffViewsOnOdpFile() throws Exception {
77
		String file = prepareData("svt/complex.odp");
78
		for(int i = 0; i < 500; i++)
79
		{
80
			app.dispatch(".uno:Open");
81
			submitOpenDlg(file);
82
			impress.waitForExistence(10, 2);
83
			sleep(5);
84
			
85
			impress.menuItem("View->Outline").select();
86
			sleep(2);
87
			ImpressOutline.menuItem("View->Slide Sorter").select();
88
			sleep(10);
89
			ImpressSlideSorter.menuItem("View->Notes Page").select();
90
			sleep(2);
91
			ImpressHandoutView.menuItem("View->Master->Slide Master").select();
92
			sleep(2);
93
			impress.menuItem("View->Master->Notes Master").select();
94
			sleep(2);
95
			
96
			ImpressHandoutView.menuItem("View->Normal").select();
97
			sleep(2);
98
			
99
			impress.menuItem("File->Close").select();
100
			ActiveMsgBox.no();
101
			sleep(2);
102
			
103
			HashMap<String, Object> perfData = SystemUtil.getProcessPerfData(pid);
104
			String record = i + "," + System.currentTimeMillis() + "," + perfData.get("rss") + "," + perfData.get("pcpu");
105
			LOG.info("Record: " + record);
106
			result.println(record);
107
			result.flush();
108
			
109
			sleep(3);
110
			
111
		}
112
	}
113
114
}
(-)testgui/source/testcase/gui/svt/sw/OperationOnNewSW.java (-2 / +2 lines)
Lines 70-76 Link Here
70
		HashMap<String, Object> proccessInfo = SystemUtil.findProcess(".*(soffice\\.bin|soffice.*-env).*");
70
		HashMap<String, Object> proccessInfo = SystemUtil.findProcess(".*(soffice\\.bin|soffice.*-env).*");
71
		pid = (String)proccessInfo.get("pid");
71
		pid = (String)proccessInfo.get("pid");
72
		result.println("Iterator,Time,Memory(KB),CPU(%)");
72
		result.println("Iterator,Time,Memory(KB),CPU(%)");
73
		LOG.info("Result will be saved to " + Testspace.getPath("output/longrun.csv"));
73
		LOG.info("Result will be saved to " + Testspace.getPath("output/svt_sw_new.csv"));
74
	}
74
	}
75
75
76
	@After
76
	@After
Lines 81-87 Link Here
81
	
81
	
82
	@Test
82
	@Test
83
	public void operationOnNewSW() throws Exception {
83
	public void operationOnNewSW() throws Exception {
84
		for(int i = 0; i < 1000; i++)
84
		for(int i = 0; i < 500; i++)
85
		{
85
		{
86
			startcenter.menuItem("File->New->Text Document").select();
86
			startcenter.menuItem("File->New->Text Document").select();
87
			
87
			
(-)testgui/source/testcase/gui/svt/sw/OperationOnSample1.java (-1 / +1 lines)
Lines 86-92 Link Here
86
	@Test
86
	@Test
87
	public void operationOnSample1() throws Exception{
87
	public void operationOnSample1() throws Exception{
88
		String file = prepareData("svt/ScenarioDesign.odt");
88
		String file = prepareData("svt/ScenarioDesign.odt");
89
		for(int i = 0; i < 1000; i++)
89
		for(int i = 0; i < 500; i++)
90
		{
90
		{
91
			System.out.println("This is the " + i + " round");
91
			System.out.println("This is the " + i + " round");
92
			app.dispatch(".uno:Open");
92
			app.dispatch(".uno:Open");
(-)testgui/source/testcase/gui/svt/sw/OperationOnSample2.java (-1 / +1 lines)
Lines 88-94 Link Here
88
		String file = prepareData("svt/complex.odt");
88
		String file = prepareData("svt/complex.odt");
89
		String pic = prepareData("svt/Sunset.jpg");
89
		String pic = prepareData("svt/Sunset.jpg");
90
		
90
		
91
		for(int i = 0; i < 1000; i++)
91
		for(int i = 0; i < 500; i++)
92
		{
92
		{
93
			System.out.println("This is the " + i + " round");
93
			System.out.println("This is the " + i + " round");
94
			app.dispatch(".uno:Open");
94
			app.dispatch(".uno:Open");
(-)testgui/source/testlib/gui/UIMap.java (+2 lines)
Lines 469-475 Link Here
469
	//Fontwork
469
	//Fontwork
470
	public static final VclDialog FontworkGalleryDlg = dialog("svx:ModalDialog:RID_SVX_MDLG_FONTWORK_GALLERY");
470
	public static final VclDialog FontworkGalleryDlg = dialog("svx:ModalDialog:RID_SVX_MDLG_FONTWORK_GALLERY");
471
	
471
	
472
	public static final VclWindow ImpressHandoutView = window(".uno:NotesMode");
472
	
473
	
473
	
474
	
475
	
474
476
475
}
477
}

Return to issue 120758