You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by li...@apache.org on 2012/09/26 09:22:07 UTC
svn commit: r1390300 - in /incubator/ooo/trunk/test/testgui/source/bvt/gui:
BasicFunctionTest.java FileTypeTest.java
Author: liuzhe
Date: Wed Sep 26 07:22:06 2012
New Revision: 1390300
URL: http://svn.apache.org/viewvc?rev=1390300&view=rev
Log:
Close app after testing
Modified:
incubator/ooo/trunk/test/testgui/source/bvt/gui/BasicFunctionTest.java
incubator/ooo/trunk/test/testgui/source/bvt/gui/FileTypeTest.java
Modified: incubator/ooo/trunk/test/testgui/source/bvt/gui/BasicFunctionTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/bvt/gui/BasicFunctionTest.java?rev=1390300&r1=1390299&r2=1390300&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/bvt/gui/BasicFunctionTest.java (original)
+++ incubator/ooo/trunk/test/testgui/source/bvt/gui/BasicFunctionTest.java Wed Sep 26 07:22:06 2012
@@ -31,7 +31,9 @@ import static testlib.gui.AppTool.*;
import static testlib.gui.UIMap.*;
import java.awt.Rectangle;
+import java.io.File;
+import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
@@ -55,6 +57,11 @@ public class BasicFunctionTest {
app.clean();
}
+ @AfterClass
+ public static void afterClass() throws Exception {
+ app.close();
+ }
+
@Before
public void before() {
app.close();
@@ -62,6 +69,22 @@ public class BasicFunctionTest {
}
@Test
+ public void smokeTest() {
+ File smoketestOutput = new File(aoo.getUserInstallation(), "user/temp");
+ prepareData("TestExtension.oxt");
+ // Open sample file smoketestdoc.sxw
+ open(prepareData("smoketestdoc.sxw"));
+ writer.waitForEnabled(10, 2);
+ // Run test cases
+ app.dispatch("vnd.sun.star.script:Standard.Global.StartTestWithDefaultOptions?language=Basic&location=document", 120);
+ String smoketestlog = FileUtil.readFileAsString(new File(smoketestOutput, "smoketest.log"));
+ String testclosurelog = FileUtil.readFileAsString(new File(smoketestOutput, "testclosure.log"));
+ log.info(smoketestlog + "\n" + testclosurelog);
+ assertTrue("No Error", !smoketestlog.contains("error") && !testclosurelog.contains("error"));
+
+ }
+
+ @Test
public void testExportAsPDF() throws Exception {
String file = prepareData("bvt/pdf.odt");
String exportTo1 = getPath("temp/1.pdf");
Modified: incubator/ooo/trunk/test/testgui/source/bvt/gui/FileTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/bvt/gui/FileTypeTest.java?rev=1390300&r1=1390299&r2=1390300&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/bvt/gui/FileTypeTest.java (original)
+++ incubator/ooo/trunk/test/testgui/source/bvt/gui/FileTypeTest.java Wed Sep 26 07:22:06 2012
@@ -55,7 +55,12 @@ public class FileTypeTest {
public static void beforeClass() throws Exception {
app.clean();
}
-
+
+ @AfterClass
+ public static void afterClass() throws Exception {
+ app.close();
+ }
+
@Before
public void before() {
app.close();