Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


Dear people,

I've updated several test scripts and intended to make them more reliable. I
have tested them in SUSE Linux. Could you help review the patches and if
possible help run relevant cases in various platforms. Thank you all for
concerning and help!

The belowing is the outline and details in the patch

* 0001-use-uno-to-invoke-File-Digital-Signature-dialog.patch

    Old method to callout the dialog by count menu item number. This is always
    failed here with Gdoc extension installed, which adds a menu item.
    
* 0003-more-stable-export-graphic-test.patch

    do not verify exported SVG content, instead just verify the exported
    file is existed. Because the difference against OO.o is, SVG will be
    rendered by Libreoffice Draw directly instead of imported as
    ASCII with Writer (which was used by the old script to verify the
    content).

    So at this point we lose some verification points which were used in old
    script, which got the svg content verification involveds. Is it really
    necessary? If necessary, do you have some ideas to verify this without
    using Writer to open the SVG?

    Also the patch replace an inexisted testing picture to an existed one

* 0004-use-uno-slot-to-click-File-Save-as-in-Base.patch

    Reason is the same as 0001.

* 0005-slideshow-test-case-update.patch

  1. give a more safe coordination for drawing rectangle in the slide page

     otherwise the testtool may accidently 'click insert chart
     icon in the slide page' when trying to 'drawing a rectangle'

  2. use uno slot to call Slide Show -> Custom Slide Show. just because I
  think it should be better :)

Best wishes,
Yifan
From e4a82c917aa75467b671b43b6ff916a39c55af79 Mon Sep 17 00:00:00 2001
From: Yifan J <yfjiang@novell.com>
Date: Mon, 20 Dec 2010 13:37:10 +0800
Subject: [PATCH 1/5] use uno to invoke File->Digital Signature dialog.

influenced case:
f_security_dialogs.bas
f_security_certified_docs.bas
---
 testautomation/global/sid/e_all.sid                |    1 +
 .../tools/includes/optional/t_security_tools.inc   |   13 ++-----------
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/testautomation/global/sid/e_all.sid b/testautomation/global/sid/e_all.sid
index 4c7800b..1a8a0b7 100644
--- a/testautomation/global/sid/e_all.sid
+++ b/testautomation/global/sid/e_all.sid
@@ -35,6 +35,7 @@ FileSendDocumentAsPDF SID_MAIL_SENDDOCASPDF
 FileVersions SID_VERSION
 FileReload SID_RELOAD SID_LASTVERSIONDOC
 FileProperties SID_DOCINFO
+FileDigitalSignatures .uno:Signature
 FileTemplatesOrganize SID_ORGANIZER
 FileTemplatesSave SID_DOCTEMPLATE
 FileTemplatesEdit SID_OPENTEMPLATE
diff --git a/testautomation/global/tools/includes/optional/t_security_tools.inc 
b/testautomation/global/tools/includes/optional/t_security_tools.inc
index 28625be..6952f7e 100755
--- a/testautomation/global/tools/includes/optional/t_security_tools.inc
+++ b/testautomation/global/tools/includes/optional/t_security_tools.inc
@@ -144,17 +144,8 @@ function hOpenDigitalSignaturesDialog() as boolean
     '///+<li>Open the file-menu</li>
     call hUseMenu()
     call hMenuSelectNr( FILE_MENU_POSITION )
-                                                                                
-    '///+<li>Select &quot;Digital signatures...&quot;</li>
-    try
-        if ( gApplication = "MATH" ) then
-            call hMenuSelectNr( SIGNATURES_MENU_POSITION_MATH )
-        else
-            call hMenuSelectNr( SIGNATURES_MENU_POSITION_OTHER )
-        endif
-    catch
-        warnlog( CFN & "Failed to execute menuitem <Digital Signature...>" )
-    endcatch
+
+    FileDigitalSignatures
 
     ' At this stage either the digital signatures dialog or the messagebox
     ' <The document needs to be saved> is open. In the latter case the function
-- 
1.7.3.1

From a3ceca8961e973c99a4d8fe68aec2913655350f2 Mon Sep 17 00:00:00 2001
From: Yifan J <yfjiang@novell.com>
Date: Fri, 24 Dec 2010 15:33:22 +0800
Subject: [PATCH 3/5] more stable export graphic test.

influenced cases:
/testautomation/graphics/optional/d_export_graphic_a.bas
/testautomation/graphics/optional/d_export_graphic_b.bas

1. do not verify exported SVG xml content, just verify
the exported file is existed. Because SVG will be rendered
by Draw directly instead of ASCII import mode (which was
used by the old script to verify the content).

2. replace an inexisted testing picture to an
existed one
---
 .../optional/includes/global/export_graphic_2.inc  |   32 --------------------
 .../optional/includes/impress/i_slideshow2.inc     |    4 +-
 2 files changed, 2 insertions(+), 34 deletions(-)

diff --git a/testautomation/graphics/optional/includes/global/export_graphic_2.inc 
b/testautomation/graphics/optional/includes/global/export_graphic_2.inc
index 5e0a2f3..be5ed49 100644
--- a/testautomation/graphics/optional/includes/global/export_graphic_2.inc
+++ b/testautomation/graphics/optional/includes/global/export_graphic_2.inc
@@ -613,38 +613,6 @@ testcase tSVG
         '------------------------\
         if ( dir(OutputGrafikTBO+sExt) <> "") then
             Printlog "Ok :-) Saved as: '" & OutputGrafikTBO+sExt & "'"
-            '------------------------\
-            if (iSprache <> 82) then
-                hCloseDocument ()
-                sleep 5
-                sTextFilter = "Text"
-
-                hFileOpenWithFilter (OutputGrafikTBO+sExt, sTextFiltername, FALSE)
-                printlog "if dialog 'AsciiFilterOptionen' comes up, say OK"
-                Kontext "AsciiFilterOptionen"
-                '-------------------------------\
-                If AsciiFilterOptionen.Exists(3) then
-                    AsciiFilterOptionen.OK
-                else
-                    warnlog "No ASCII filter Options Dialog?"
-                endif
-                '-------------------------------/
-                sTemp = gApplication
-                gApplication = "WRITER"
-                sleep 5 ' wait for document to be loaded
-                bTemp = hFindeImDokument ("<!DOCTYPE svg PUBLIC " & chr(34)& "-//W3C//DTD SVG 
1.1//EN" & chr(34)&" " & chr(34)&"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"; & 
chr(34)&">",true)
-                '-------------------------------\
-                if (bTemp = TRUE) then
-                    Printlog "OK"
-                else
-                    warnlog "DOCTYPE not found in svg file :-("
-                endif
-                '-------------------------------/
-                gApplication = sTemp
-            else
-                qaerrorlog "disabled for 82: #111017#"
-            endif
-            '--------------------------/
         else
             warnlog "File didn't get saved :-("
         endif
diff --git a/testautomation/graphics/optional/includes/impress/i_slideshow2.inc 
b/testautomation/graphics/optional/includes/impress/i_slideshow2.inc
index 9857622..6cce18f 100644
--- a/testautomation/graphics/optional/includes/impress/i_slideshow2.inc
+++ b/testautomation/graphics/optional/includes/impress/i_slideshow2.inc
@@ -909,7 +909,7 @@ testcase tSlideshowBackgroundAllSlides
     Dim Background$ as string
     Dim i as integer
     Dim Zaehler as integer
-    Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\emoticons\grin.gif")
+    Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\www-back\chocolate.jpg")
     Datei$ = ConvertPath (gOfficePath + "user\work\background.odp")
 
     '/// Create a new document ///'
@@ -962,7 +962,7 @@ testcase tSlideshowBackgroundSelectedSlide
     Dim Background$ as string
     Dim i as integer
     Dim Zaehler as integer
-    Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\emoticons\grin.gif")
+    Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\www-back\chocolate.jpg")
     Datei$ = ConvertPath (gOfficePath + "user\work\background.odp")
 
     '/// Create a new document ///'
-- 
1.7.3.1

From 835cba4e4c469fc9b0d4c14036c27f99b2186639 Mon Sep 17 00:00:00 2001
From: Yifan J <yfjiang@novell.com>
Date: Fri, 24 Dec 2010 15:38:42 +0800
Subject: [PATCH 4/5] use uno slot to click File->Save(as) in Base.

influenced case:
testautomation/dbaccess/optional/dba_db_hsqldb.bas
---
 testautomation/dbaccess/tools/querytools.inc |   11 +++--------
 testautomation/dbaccess/tools/tabletools.inc |    9 ++++-----
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/testautomation/dbaccess/tools/querytools.inc 
b/testautomation/dbaccess/tools/querytools.inc
index d594875..de13247 100755
--- a/testautomation/dbaccess/tools/querytools.inc
+++ b/testautomation/dbaccess/tools/querytools.inc
@@ -258,10 +258,7 @@ function fSaveQueryDesign(sName as String)
     
     sleep(1)
     Kontext "QueryDesignTable"
-        QueryDesignTable.UseMenu
-        
-        hMenuSelectNr(1) ' the file menu
-        hMenuSelectNr(6) ' the save
+        DatabaseSave
                 
     Kontext "DatabaseTableSaveAs"
         TableName.setText(sName)
@@ -278,11 +275,9 @@ function fSaveSQLQueryDesign(sName as String)
     '/// <u>parameter:</u>  the name of query   
     
     sleep(1)
+
     Kontext "QueryEditWindow"
-        QueryEditWindow.UseMenu
-        
-        hMenuSelectNr(1) ' the file menu
-        hMenuSelectNr(6) ' the save
+        DatabaseSaveAs
                 
     Kontext "DatabaseTableSaveAs"
         TableName.setText(sName)
diff --git a/testautomation/dbaccess/tools/tabletools.inc 
b/testautomation/dbaccess/tools/tabletools.inc
index 2c5afff..7a2b508 100755
--- a/testautomation/dbaccess/tools/tabletools.inc
+++ b/testautomation/dbaccess/tools/tabletools.inc
@@ -342,13 +342,12 @@ function fCreateTable(aFieldTypeContent(),sTableName,optional 
sCatalog,optional
         Description.TypeKeys "<RETURN>" , TRUE
         printlog "-------------------------------"
     next 
+
     sleep(1)    
+
     Kontext "TableDesignTable"         
-        TableDesignTable.usemenu
-        MenuSelect MenuGetItemId (1)
-        sleep(1)
-        menuselect MenuGetItemId (7)
-        sleep(1)    
+        DatabaseSaveas
+
     Kontext "DatabaseTableSaveAs"
         printlog "save table as "+ sTableName
         TableName.setText sTableName
-- 
1.7.3.1

From 85546db260d285837440ad5c54f3e85bc7161a0c Mon Sep 17 00:00:00 2001
From: Yifan J <yfjiang@novell.com>
Date: Fri, 24 Dec 2010 16:31:00 +0800
Subject: [PATCH 5/5] slideshow test case update.

influenced case:
i_sildeshow.bas

1. give more safe coordination for drawing rectangle

otherwise the testtool may 'click insert chart
icon in the slide page' by accident when trying
to 'drawing a rectangle'

2. use uno slot to Call Slide Show -> Custom Slide Show...
---
 testautomation/global/sid/e_all.sid                |    2 +-
 .../optional/includes/impress/i_slideshow3.inc     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testautomation/global/sid/e_all.sid b/testautomation/global/sid/e_all.sid
index 1a8a0b7..d7215aa 100644
--- a/testautomation/global/sid/e_all.sid
+++ b/testautomation/global/sid/e_all.sid
@@ -790,7 +790,7 @@ SlideShowAnimation .uno:CustomAnimation
 SlideShowSlideTransition .uno:SlideChangeWindow
 SlideShowHideSlide SID_HIDE_SLIDE
 SlideShowShowSlide SID_SHOW_SLIDE 
-SlideShowCustomSlideshow SID_CUSTOMSHOW_DLG
+SlideShowCustomSlideshow .uno:CustomShowDialog
 SlideShowCustomAnimation .uno:CustomAnimation
 
 ' ***********************************
diff --git a/testautomation/graphics/optional/includes/impress/i_slideshow3.inc 
b/testautomation/graphics/optional/includes/impress/i_slideshow3.inc
index 025e91b..200c7e3 100644
--- a/testautomation/graphics/optional/includes/impress/i_slideshow3.inc
+++ b/testautomation/graphics/optional/includes/impress/i_slideshow3.inc
@@ -582,7 +582,7 @@ testcase tExtrasIndividuellePraesentation
       Kontext "NavigatorDraw"
       Naechste.Click                        '/// switch to next slide ///'
       Kontext "DocumentImpress"
-      hRechteckErstellen (50,50,60,60)        '/// create rectangle ///'
+      hRechteckErstellen (30,30,40,40)        '/// create rectangle ///'
       Printlog "  - Created rectangles on all slides"
    else
       Warnlog "  No Navigator"
-- 
1.7.3.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.