summaryrefslogtreecommitdiff
path: root/smoketestoo_native
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-02-08 12:59:01 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-02-08 12:59:01 +0100
commit2af2e7681a5e6c9a5cf854741454fce8c4696afa (patch)
treea6ab9660a0c155dd339a05ea9a0f8c495a36926b /smoketestoo_native
parent2b35c388bb80f1d7739afec38dbc842240babbdd (diff)
debuglevels: also log errors during the test's glue code (well, assertions, at least)
Diffstat (limited to 'smoketestoo_native')
-rwxr-xr-x[-rw-r--r--]smoketestoo_native/data/Global.xml365
-rw-r--r--smoketestoo_native/data/Test_10er.xml178
-rw-r--r--smoketestoo_native/data/Test_DB.xml31
-rw-r--r--smoketestoo_native/data/Test_Ext.xml26
4 files changed, 339 insertions, 261 deletions
diff --git a/smoketestoo_native/data/Global.xml b/smoketestoo_native/data/Global.xml
index 5da3617fad9b..a412b9d2259c 100644..100755
--- a/smoketestoo_native/data/Global.xml
+++ b/smoketestoo_native/data/Global.xml
@@ -28,7 +28,7 @@
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Global" script:language="StarBasic">REM ***** BASIC *****
-const cMaxErrorStates = 13
+const cMaxErrorStates = 14
const cCoGreen = 4057917, cCoRed = 16711680, cCoGrey = 12632256
const cParagraphBreak = 0
@@ -38,12 +38,14 @@ global const cExtensionFileName = &quot;TestExtension.oxt&quot;
global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocSaveOpen50 = 3, cDocClose = 4
global const cDBService = 0, cDBOpen = 1, cDBInsert = 2, cDBDelete = 3, cDBSeek = 4, cDBClose = 5
global const cEXTService = 0, cEXTInstall = 1, cEXTUninstall = 2
+global const cOtherSetupDoc = 0, cOtherWriteStatus = 1
global const cLogfileFailed = 255
global const cStWriter = 0, cStCalc = 1, cStPraesentation = 2, cStZeichnen = 3
global const cStHTML = 6, cStChart = 4, cStJava = 7
global const cStMath = 5, cStDataBase = 9
global const cStExtension = 11
+global const cStTestGlue = 12
global const cStNone = -1
global const cFlt8 = 0, cFlt50 = 32, cFltNewDoc = 64, cFltXML = 128
@@ -52,9 +54,10 @@ global const frmWriter = 1, frmCalc = 2, frmImpress = 4
global const frmMath = 5, frmChart = 7, frmHyperText = 8, frmDraw = 9
global const frmDataBase = 10, frmJava = 13
global const frmExtension = 14
+global const frmTestGlue = 15
-Global g_CurrentDocTest As Integer
-Global g_CurrentTestCase As Integer
+Global gCurrentDocTest As Integer
+Global gCurrentTestCase As Integer
global const cLogUnknown = 0, cLogFalse = 1, cLogTrue = 2
@@ -94,6 +97,7 @@ Global const cOptionsDialogName = &quot;OptionsDlg&quot;, cTest10Modul = &quot;S
Global const cDlgCancel = 1, cDlgOk = 0, cDlgStartTest = 2
global gErrorState (cMaxErrorStates, 5) as integer
+Global gTestCaseAnnotations( cMaxErrorStates, 5 ) As String
global gOutputDoc as Object
global gOutputDocNotUno as Object
@@ -112,20 +116,21 @@ global sExtensionURL as string
Dim gDlgState as Integer
Sub SetGlobalDoc
- gOutPutDoc = ThisComponent
+ gOutputDoc = ThisComponent
end Sub
Sub ClearStatus
for j% = 0 to cMaxErrorStates
for i% = 0 to 5
- gErrorState (j%, i%) = cLogUnknown
+ gErrorState (j%, i%) = cLogUnknown
+ gTestCaseAnnotations( J%, i% ) = ""
next i%
next j%
end Sub
Sub ClearAllText
call SetGlobalDoc
- call ClearDoc (gOutPutDoc)
+ call ClearDoc (gOutputDoc)
call ClearStatus
end Sub
@@ -134,11 +139,18 @@ Sub AssertionHandler( sMessage as String )
End Sub
Sub Main
- CaptureAssertions( &quot;AssertionHandler&quot; )
+ CaptureAssertions( &quot;AssertionHandler&quot; )
+
+ gCurrentDocTest = frmTestGlue
+ gCurrentTestCase = cOtherSetupDoc
call SetGlobalDoc
+
+ Dim bWasModified as Boolean
+ bWasModified = gOutputDoc.isModified()
+
if bShowTable then
- call ClearDoc (gOutPutDoc)
+ call ClearDoc (gOutputDoc)
end If
call ClearStatus
@@ -146,6 +158,8 @@ Sub Main
Call Test_10er.Main
if bShowTable then
+ gCurrentDocTest = frmTestGlue
+ gCurrentTestCase = cOtherWriteStatus
call CreateStatusTable2
call CreateStatusTable
call CreateDocState
@@ -153,7 +167,9 @@ Sub Main
gOutputDoc.CurrentController.ViewCursor.JumpToFirstPage
end if
- CaptureAssertions( &quot;&quot; )
+ gOutputDoc.setModified( bWasModified )
+
+ CaptureAssertions( &quot;&quot; )
End Sub
Sub CreateStatusTable
@@ -167,26 +183,26 @@ Sub CreateStatusTable
tableHeaders(cStHTML) = &quot;HTML&quot;
tableHeaders(cStJava) = &quot;Java&quot;
- dim tableRows(4) as string
- tableRows(cDocNew) = &quot;new&quot;
- tableRows(cDocSaveOpen8) = &quot;V8.0&quot;
- tableRows(cDocSaveOpenXML) = &quot;XML&quot;
- tableRows(cDocSaveOpen50) = &quot;V5.0&quot;
- tableRows(cDocClose) = &quot;close&quot;
+ dim tableRows(4) as string
+ tableRows(cDocNew) = &quot;new&quot;
+ tableRows(cDocSaveOpen8) = &quot;V8.0&quot;
+ tableRows(cDocSaveOpenXML) = &quot;XML&quot;
+ tableRows(cDocSaveOpen50) = &quot;V5.0&quot;
+ tableRows(cDocClose) = &quot;close&quot;
- aDoc = gOutPutDoc
+ aDoc = gOutputDoc
- xText = aDoc.Text
- xCursor = xText.createTextCursor()
+ xText = aDoc.Text
+ xCursor = xText.createTextCursor()
- xCursor.gotoStart(FALSE)
- xCursor.GoRight (4, False)
- SetParagraphBreak (xCursor)
- xCursor.GoRight (1, False)
- SetParagraphBreak (xCursor)
- xCursor.GoRight (1, False)
+ xCursor.gotoStart(FALSE)
+ xCursor.GoRight (4, False)
+ SetParagraphBreak (xCursor)
+ xCursor.GoRight (1, False)
+ SetParagraphBreak (xCursor)
+ xCursor.GoRight (1, False)
- table = aDoc.createInstance(&quot;com.sun.star.text.TextTable&quot;)
+ table = aDoc.createInstance(&quot;com.sun.star.text.TextTable&quot;)
table.initialize(6,9)
table.Name = &quot;StTab1&quot;
xText.insertTextContent(xCursor, table, FALSE)
@@ -196,57 +212,61 @@ Sub CreateStatusTable
tableCursor.goRight(1,FALSE)
for i% = 0 to 7
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableHeaders(i%)
+ cName = tableCursor.getRangeName()
+ xCell = table.getCellByName(cName)
+ xCell.String=tableHeaders(i%)
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ xCell.BackTransparent = False
+ xCell.BackColor = cCoGrey
- tableCursor.goRight(1,FALSE)
+ tableCursor.goRight(1,FALSE)
next i%
xCursor.gotoStart(FALSE)
tableCursor.gotoStart(FALSE)
cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ xCell = table.getCellByName(cName)
+ xCell.BackTransparent = False
+ xCell.BackColor = cCoGrey
for i% = 0 to 4
tableCursor.goDown(1,FALSE)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableRows(i%)
+ cName = tableCursor.getRangeName()
+ xCell = table.getCellByName(cName)
+ xCell.String=tableRows(i%)
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ xCell.BackTransparent = False
+ xCell.BackColor = cCoGrey
next i%
end Sub
Sub CreateStatusTable2
dim tableHeaders(5) as string
- tableHeaders(cStDataBase-9) = &quot;Database&quot;
+ tableHeaders(0) = &quot;Database&quot;
tableHeaders(1) = &quot;&quot;
- tableHeaders(cStExtension-9) = &quot;Extension&quot;
+ tableHeaders(2) = &quot;Extension&quot;
tableHeaders(3) = &quot;&quot;
- tableHeaders(4) = &quot;&quot;
+ tableHeaders(4) = &quot;Other&quot;
+
+ dim tableRows(5) as string
+ tableRows(cDBService ) = &quot;services&quot;
+ tableRows(cDBOpen ) = &quot;open&quot;
+ tableRows(cDBInsert ) = &quot;insert&quot;
+ tableRows(cDBDelete ) = &quot;delete&quot;
+ tableRows(cDBSeek ) = &quot;seek&quot;
+ tableRows(cDBClose ) = &quot;close&quot;
- dim tableRows(5) as string
- tableRows(cDBService ) = &quot;services&quot;
- tableRows(cDBOpen ) = &quot;open&quot;
- tableRows(cDBInsert ) = &quot;insert&quot;
- tableRows(cDBDelete ) = &quot;delete&quot;
- tableRows(cDBSeek ) = &quot;seek&quot;
- tableRows(cDBClose ) = &quot;close&quot;
+ dim tableRows2(2) as string
+ tableRows2(cEXTService ) = &quot;services&quot;
+ tableRows2(cEXTInstall ) = &quot;install&quot;
+ tableRows2(cEXTUninstall ) = &quot;uninstall&quot;
- dim tableColums2(3) as string
- tableColums2(cEXTService ) = &quot;services&quot;
- tableColums2(cEXTInstall ) = &quot;install&quot;
- tableColums2(cEXTUninstall ) = &quot;uninstall&quot;
+ dim tableRows3(1) as string
+ tableRows3(cOtherSetupDoc ) = &quot;setup doc&quot;
+ tableRows3(cOtherWriteStatus ) = &quot;write status&quot;
- aDoc = gOutPutDoc
+ aDoc = gOutputDoc
xText = aDoc.Text
xCursor = xText.createTextCursor()
@@ -260,7 +280,7 @@ Sub CreateStatusTable2
table = aDoc.createInstance(&quot;com.sun.star.text.TextTable&quot;)
table.initialize(7,6)
table.Name = &quot;StTab2&quot;
- &apos;table.RelativeWidth =500
+ table.BackColor = cCoGrey
xText.insertTextContent(xCursor, table, FALSE)
@@ -268,7 +288,7 @@ Sub CreateStatusTable2
tableCursor.gotoStart(FALSE)
tableCursor.goRight(1,FALSE)
- for i% = 0 to 5
+ for i% = LBound( tableHeaders ) to UBound( tableHeaders )
cName = tableCursor.getRangeName()
xCell = table.getCellByName(cName)
xCell.String=tableHeaders(i%)
@@ -282,11 +302,11 @@ Sub CreateStatusTable2
tableCursor.gotoStart(FALSE)
cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ xCell = table.getCellByName(cName)
+ xCell.BackTransparent = False
+ xCell.BackColor = cCoGrey
- for i% = 0 to 5
+ for i% = LBound( tableRows ) to UBound( tableRows )
tableCursor.goDown(1,FALSE)
cName = tableCursor.getRangeName()
xCell = table.getCellByName(cName)
@@ -299,22 +319,34 @@ Sub CreateStatusTable2
tableCursor.gotoStart(FALSE)
tableCursor.goRight(2,FALSE)
- for i% = 0 to 3
+ for i% = LBound( tableRows2 ) to UBound( tableRows2 )
tableCursor.goDown(1,FALSE)
cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
- xCell.String=tableColums2(i%)
+ xCell = table.getCellByName(cName)
+ xCell.String=tableRows2(i%)
- xCell.BackTransparent = False
- xCell.BackColor = cCoGrey
+ xCell.BackTransparent = False
+ xCell.BackColor = cCoGrey
+ next i%
+
+ tableCursor.gotoStart(FALSE)
+ tableCursor.goRight(4,FALSE)
+
+ for i% = LBound( tableRows3 ) to UBound( tableRows3 )
+ tableCursor.goDown(1,FALSE)
+ cName = tableCursor.getRangeName()
+ xCell = table.getCellByName(cName)
+ xCell.String=tableRows3(i%)
+
+ xCell.BackTransparent = False
+ xCell.BackColor = cCoGrey
next i%
end Sub
Sub CreateDocState
- aDoc = gOutPutDoc
+ aDoc = gOutputDoc
table = aDoc.TextTables.GetByIndex (1)
- &apos;table = aDoc.TextTables.GetByName (&quot;StTab1&quot;)
for j% = 0 to 7
for i% = 0 to 4
@@ -322,49 +354,62 @@ Sub CreateDocState
tableCursor = table.createCursorByCellName(sRangeName)
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
-
- xCell.BackTransparent = False
-
- if gErrorState (j%, i%) = cLogTrue then
- xCell.BackColor = cCoGreen
- else if gErrorState (j%, i%) = cLogFalse then
- xCell.BackColor = cCoRed
- else
- xCell.BackColor = cCoGrey
- end If
- end If
-
+ cName = tableCursor.getRangeName()
+ xCell = table.getCellByName(cName)
+
+ xCell.BackTransparent = False
+
+ If gErrorState (j%, i%) = cLogTrue Then
+ xCell.BackColor = cCoGreen
+ else
+ If gErrorState (j%, i%) = cLogFalse Then
+ xCell.BackColor = cCoRed
+ If ( gTestCaseAnnotations( j%, i% ) &lt;&gt; "" ) Then
+ Dim annotation as Object
+ annotation = aDoc.createInstance( &quot;com.sun.star.text.TextField.Annotation&quot; )
+ annotation.Author = &quot;smoketest&quot;
+ annotation.Content = gTestCaseAnnotations( j%, i% )
+ xCell.insertTextContent( xCell, annotation, false )
+ End If
+ else
+ xCell.BackColor = cCoGrey
+ end If
+ end If
next i%
next j%
end Sub
Sub CreateSecondState
- aDoc = gOutPutDoc
+ aDoc = gOutputDoc
table = aDoc.TextTables.GetByIndex (0)
- &apos;table = aDoc.TextTables.GetByName (&quot;StTab2&quot;)
- for j% = 0 to cMaxErrorStates-9
- for i% = 0 to 5
- sRangeName = GetRangeName(j%, i%+1)
-
- tableCursor = table.createCursorByCellName(sRangeName)
-
- cName = tableCursor.getRangeName()
- xCell = table.getCellByName(cName)
-
- xCell.BackTransparent = False
-
- if gErrorState (j%+9, i%) = cLogTrue then
- xCell.BackColor = cCoGreen
- else if gErrorState (j%+9, i%) = cLogFalse then
- xCell.BackColor = cCoRed
- else
- xCell.BackColor = cCoGrey
- end If
+ Dim stateIndex(2) as Integer
+ stateIndex(0) = cStDataBase
+ stateIndex(1) = cStExtension
+ stateIndex(2) = cStTestGlue
+
+ Dim j as Integer
+ For j = LBound( stateIndex ) To UBound( stateIndex )
+ for i% = 1 to 6
+ tableCell = table.getCellByPosition( 2 * j + 1, i% )
+ tableCell.BackTransparent = False
+
+ if gErrorState( stateIndex(j), i% - 1 ) = cLogTrue then
+ tableCell.BackColor = cCoGreen
+ else
+ if gErrorState ( stateIndex(j), i% - 1 ) = cLogFalse then
+ tableCell.BackColor = cCoRed
+ If ( gTestCaseAnnotations( stateIndex(j), i% - 1 ) &lt;&gt; &quot;&quot; ) Then
+ Dim annotation as Object
+ annotation = aDoc.createInstance( &quot;com.sun.star.text.TextField.Annotation&quot; )
+ annotation.Author = &quot;smoketest&quot;
+ annotation.Content = gTestCaseAnnotations( stateIndex(j), i% - 1 )
+ tableCell.insertTextContent( tableCell, annotation, false )
+ End If
+ else
+ tableCell.BackColor = cCoGrey
+ end If
end If
-
next i%
next j%
end Sub
@@ -374,20 +419,26 @@ Function GetRangeName (nColumn as integer, nRow as integer) as string
end Function
Sub LogTestResult( sTestCaseDescription as String, bSuccess as Boolean )
- If ( g_CurrentTestCase = cLogfileFailed ) Then
- LogState( FALSE, &quot;creating logfile &apos;&quot; + GetLogFileName( g_CurrentDocTest ) + &quot;&apos; failed&quot;, MainFileChannel )
- SetStatus( 0, FALSE )
+ If ( gCurrentTestCase = cLogfileFailed ) Then
+ Dim sAnnotation as String
+ sAnnotation = &quot;creating logfile &apos;&quot; + GetLogFileName( gCurrentDocTest ) + &quot;&apos; failed&quot;
+ LogState( FALSE, sAnnotation, MainFileChannel )
+ SetStatus( 0, FALSE, sAnnotation )
Else
- LogState( bSuccess, sTestCaseDescription, FileChannel )
- LogState( bSuccess, sTestCaseDescription, MainFileChannel )
- SetStatus( g_CurrentTestCase, bSuccess )
+ If ( LocalFileChannel &lt;&gt; 0 ) Then
+ LogState( bSuccess, sTestCaseDescription, LocalFileChannel )
+ EndIf
+ if ( MainFileChannel &lt;&gt; 0 ) Then
+ LogState( bSuccess, sTestCaseDescription, MainFileChannel )
+ EndIf
+ SetStatus( gCurrentTestCase, bSuccess, sTestCaseDescription )
End If
End Sub
-Sub SetStatus( nAction as Integer, bState as Boolean )
+Sub SetStatus( nAction as Integer, bState as Boolean, sFailureAnnotation as String )
Dim nStatusType as Integer
Dim nState as integer
- nStatusType = GetStatusType( g_CurrentDocTest )
+ nStatusType = GetStatusType( gCurrentDocTest )
If nStatusType = cStNone then Exit Sub
if bState then
@@ -402,6 +453,10 @@ Sub SetStatus( nAction as Integer, bState as Boolean )
End If
gErrorState (nStatusType, nAction) = nState
+
+ If ( nState = cLogFalse ) And ( sFailureAnnotation &lt;&gt; &quot;&quot; ) Then
+ gTestCaseAnnotations( nStatusType, nAction ) = gTestCaseAnnotations( nStatusType, nAction ) + sFailureAnnotation + chr(13)
+ End If
end Sub
Function GetStatusType (nDocType as Integer) as Integer
@@ -422,6 +477,8 @@ Function GetStatusType (nDocType as Integer) as Integer
GetStatusType = cStChart &apos; chart
case frmJava
GetStatusType = cStJava &apos;Java
+ case frmTestGlue
+ GetStatusType = cStTestGlue &apos; test framework
case frmDataBase
GetStatusType = cStDataBase &apos;DataBase
case frmExtension
@@ -511,56 +568,56 @@ end Sub
Sub SetOptions
call SetGlobalDoc
- SetUserFieldState (cUserFieldTestWriter, -(gOptionsDialog.getControl(&quot;cbWriterTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestCalc, -(gOptionsDialog.getControl(&quot;cbCalcTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestImpress, -(gOptionsDialog.getControl(&quot;cbImpressTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestDraw, -(gOptionsDialog.getControl(&quot;cbDrawTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestHTML, -(gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestMath, -(gOptionsDialog.getControl(&quot;cbMathTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestChart, -(gOptionsDialog.getControl(&quot;cbChartTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestJava, -(gOptionsDialog.getControl(&quot;cbJavaTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestOpenSaveXML, -(gOptionsDialog.getControl(&quot;cbSaveOpenXMLTest&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestOpenSave50, -(gOptionsDialog.getControl(&quot;cbSaveOpen50Test&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).getState), gOutPutDoc)
- SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).getState), gOutPutDoc)
+ SetUserFieldState (cUserFieldTestWriter, -(gOptionsDialog.getControl(&quot;cbWriterTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestCalc, -(gOptionsDialog.getControl(&quot;cbCalcTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestImpress, -(gOptionsDialog.getControl(&quot;cbImpressTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestDraw, -(gOptionsDialog.getControl(&quot;cbDrawTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestHTML, -(gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestMath, -(gOptionsDialog.getControl(&quot;cbMathTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestChart, -(gOptionsDialog.getControl(&quot;cbChartTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestJava, -(gOptionsDialog.getControl(&quot;cbJavaTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestOpenSaveXML, -(gOptionsDialog.getControl(&quot;cbSaveOpenXMLTest&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestOpenSave50, -(gOptionsDialog.getControl(&quot;cbSaveOpen50Test&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).getState), gOutputDoc)
+ SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).getState), gOutputDoc)
end Sub
Sub GetOptions
call SetGlobalDoc
- gOptionsDialog.getControl(&quot;cbWriterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestWriter, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbCalcTest&quot;).setState ( -( GetUserFieldState (cUserFieldTestCalc, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbImpressTest&quot;).setState( -( GetUserFieldState (cUserFieldTestImpress, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbDrawTest&quot;).setState( -( GetUserFieldState (cUserFieldTestDraw, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).setState( -( GetUserFieldState (cUserFieldTestHTML, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbMathTest&quot;).setState( -( GetUserFieldState (cUserFieldTestMath, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbChartTest&quot;).setState( -( GetUserFieldState (cUserFieldTestChart, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbJavaTest&quot;).setState( -( GetUserFieldState (cUserFieldTestJava, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).setState( -( GetUserFieldState (cUserFieldTestDatabase, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).setState( -( GetUserFieldState (cUserFieldTestExtension, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbSaveOpenXMLTest&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSaveXML, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbSaveOpen50Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSave50, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutPutDoc)))
- gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutPutDoc)))
+ gOptionsDialog.getControl(&quot;cbWriterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestWriter, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbCalcTest&quot;).setState ( -( GetUserFieldState (cUserFieldTestCalc, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbImpressTest&quot;).setState( -( GetUserFieldState (cUserFieldTestImpress, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbDrawTest&quot;).setState( -( GetUserFieldState (cUserFieldTestDraw, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbHTMLTest&quot;).setState( -( GetUserFieldState (cUserFieldTestHTML, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbMathTest&quot;).setState( -( GetUserFieldState (cUserFieldTestMath, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbChartTest&quot;).setState( -( GetUserFieldState (cUserFieldTestChart, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbJavaTest&quot;).setState( -( GetUserFieldState (cUserFieldTestJava, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbDatabaseTest&quot;).setState( -( GetUserFieldState (cUserFieldTestDatabase, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbExtensionTest&quot;).setState( -( GetUserFieldState (cUserFieldTestExtension, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbSaveOpenXMLTest&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSaveXML, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbSaveOpen50Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSave50, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbSaveOpen8Test&quot;).setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc)))
+ gOptionsDialog.getControl(&quot;cbTerminateAfterTest&quot;).setState( -( GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc)))
End Sub
Sub ReadOptions
call SetGlobalDoc
- bMakeWriterTest = GetUserFieldState (cUserFieldTestWriter, gOutPutDoc)
- bMakeCalcTest = GetUserFieldState (cUserFieldTestCalc, gOutPutDoc)
- bMakeImpressTest = GetUserFieldState (cUserFieldTestImpress, gOutPutDoc)
- bMakeDrawTest = GetUserFieldState (cUserFieldTestDraw, gOutPutDoc)
- bMakeHTMLTest = GetUserFieldState (cUserFieldTestHTML, gOutPutDoc)
- bMakeMathTest = GetUserFieldState (cUserFieldTestMath, gOutPutDoc)
- bMakeChartTest = GetUserFieldState (cUserFieldTestChart, gOutPutDoc)
- bMakeJavaTest = GetUserFieldState (cUserFieldTestJava, gOutPutDoc)
- bMakeDBTest = GetUserFieldState (cUserFieldTestDatabase, gOutPutDoc)
- bMakeExtensionTest = GetUserFieldState (cUserFieldTestExtension, gOutPutDoc)
- bMakeSaveOpenXMLTest = GetUserFieldState (cUserFieldTestOpenSaveXML, gOutPutDoc)
- bMakeSaveOpen50Test = GetUserFieldState (cUserFieldTestOpenSave50, gOutPutDoc)
- bMakeSaveOpen8Test = GetUserFieldState (cUserFieldTestOpenSave8, gOutPutDoc)
- bMakeTerminateAfterTest = GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutPutDoc)
+ bMakeWriterTest = GetUserFieldState (cUserFieldTestWriter, gOutputDoc)
+ bMakeCalcTest = GetUserFieldState (cUserFieldTestCalc, gOutputDoc)
+ bMakeImpressTest = GetUserFieldState (cUserFieldTestImpress, gOutputDoc)
+ bMakeDrawTest = GetUserFieldState (cUserFieldTestDraw, gOutputDoc)
+ bMakeHTMLTest = GetUserFieldState (cUserFieldTestHTML, gOutputDoc)
+ bMakeMathTest = GetUserFieldState (cUserFieldTestMath, gOutputDoc)
+ bMakeChartTest = GetUserFieldState (cUserFieldTestChart, gOutputDoc)
+ bMakeJavaTest = GetUserFieldState (cUserFieldTestJava, gOutputDoc)
+ bMakeDBTest = GetUserFieldState (cUserFieldTestDatabase, gOutputDoc)
+ bMakeExtensionTest = GetUserFieldState (cUserFieldTestExtension, gOutputDoc)
+ bMakeSaveOpenXMLTest = GetUserFieldState (cUserFieldTestOpenSaveXML, gOutputDoc)
+ bMakeSaveOpen50Test = GetUserFieldState (cUserFieldTestOpenSave50, gOutputDoc)
+ bMakeSaveOpen8Test = GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc)
+ bMakeTerminateAfterTest = GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc)
end Sub
Sub SetDefaultOptions
@@ -596,8 +653,8 @@ Sub StartTestByOptions
call ReadOptions
call Main
if bMakeTerminateAfterTest then
- ClearDocFull (gOutPutDoc)
- gOutPutDoc.dispose
+ ClearDocFull (gOutputDoc)
+ gOutputDoc.dispose
&apos;StarDesktop.Terminate
&apos;EnableReschedule( false )
diff --git a/smoketestoo_native/data/Test_10er.xml b/smoketestoo_native/data/Test_10er.xml
index 84a8321deced..a6f46b01eb78 100644
--- a/smoketestoo_native/data/Test_10er.xml
+++ b/smoketestoo_native/data/Test_10er.xml
@@ -34,6 +34,7 @@ const sSChartLogFileName = &quot;schlog.dat&quot;
const sSHptLogFileName = &quot;shptlog.dat&quot;
const sSDrawLogFileName = &quot;sdrwlog.dat&quot;, sJavaLogFileName = &quot;javalog.dat&quot;
const sSDBLogFileName = &quot;dblog.dat&quot;, sExtLogFileName = &quot;extlog.dat&quot;
+const sTestGlueLogFileName = &quot;testgluelog.dat&quot;
const sLogFileName = &quot;log.dat&quot;
const cTempFileName = &quot;ttt&quot;
@@ -44,7 +45,7 @@ const cMessageCloseDoc = &quot;Close Document&quot;
Global sWorkPath$
Global sWorkPathURL$
-Global FileChannel%
+Global LocalFileChannel%
Global MainFileChannel%
Sub Main
@@ -119,6 +120,9 @@ Sub DeleteAllLogFiles()
If FileExists (sWorkPath+sJavaLogFileName) then
Kill (sWorkPath+sJavaLogFileName)
End If
+ If FileExists (sWorkPath+sTestGlueLogFileName) then
+ Kill (sWorkPath+sTestGlueLogFileName)
+ End If
If FileExists (sWorkPath+sSDBLogFileName) then
Kill (sWorkPath+sSDBLogFileName)
End If
@@ -182,7 +186,7 @@ DIM nStrPos as Long
end if
&apos;search ExtensionURL
- sDocURL = gOutPutDoc.URL
+ sDocURL = gOutputDoc.URL
CompatibilityMode(true)
nStrPos = InStrRev (sDocURL, &quot;/&quot; )
CompatibilityMode(false)
@@ -191,86 +195,87 @@ DIM nStrPos as Long
call DeleteAllSavedFiles()
call DeleteAllLogFiles()
MainFileChannel = OpenLogDat (sLogFileName)
- call WriteTestSequence (MainFileChannel)
+ call WriteTestSequence
if bMakeWriterTest then
- g_CurrentDocTest = frmWriter
+ gCurrentDocTest = frmWriter
call MakeDocTest
end if
if bMakeCalcTest then
- g_CurrentDocTest = frmCalc
+ gCurrentDocTest = frmCalc
call MakeDocTest
end if
if bMakeImpressTest then
- g_CurrentDocTest = frmImpress
+ gCurrentDocTest = frmImpress
call MakeDocTest
end if
if bMakeDrawTest then
- g_CurrentDocTest = frmDraw
+ gCurrentDocTest = frmDraw
call MakeDocTest
end if
if bMakeHTMLTest then
- g_CurrentDocTest = frmHyperText
+ gCurrentDocTest = frmHyperText
call MakeDocTest
end if
if bMakeChartTest then
- g_CurrentDocTest = frmChart
+ gCurrentDocTest = frmChart
call MakeChartTest
end if
if bMakeMathTest then
- g_CurrentDocTest = frmMath
+ gCurrentDocTest = frmMath
call MakeNewDoc
end if
if bMakeJavaTest then
- g_CurrentDocTest = frmJava
+ gCurrentDocTest = frmJava
call TestJava
end if
if bMakeDBTest then
- g_CurrentDocTest = frmDataBase
+ gCurrentDocTest = frmDataBase
call Test_DB.TestDB
end if
if bMakeExtensionTest then
- g_CurrentDocTest = frmExtension
+ gCurrentDocTest = frmExtension
call Test_Ext.TestExtensions
end if
Close #MainFileChannel
+ MainFileChannel = 0
end Sub
-Sub WriteTestSequence (FileChannel as integer)
- Print #FileChannel, &quot;Sequence of testing&quot;
+Sub WriteTestSequence
+ Print #MainFileChannel, &quot;Sequence of testing&quot;
if bMakeWriterTest then
- WriteTests (&quot;writer : &quot;, true, FileChannel)
+ WriteTests (&quot;writer : &quot;, true, MainFileChannel)
end if
if bMakeCalcTest then
- WriteTests (&quot;calc : &quot;, true, FileChannel)
+ WriteTests (&quot;calc : &quot;, true, MainFileChannel)
end if
if bMakeImpressTest then
- WriteTests (&quot;impress : &quot;, true, FileChannel)
+ WriteTests (&quot;impress : &quot;, true, MainFileChannel)
end if
if bMakeDrawTest then
- WriteTests (&quot;draw : &quot;, true, FileChannel)
+ WriteTests (&quot;draw : &quot;, true, MainFileChannel)
end if
if bMakeHTMLTest then
- WriteTests (&quot;HTML : &quot;, true, FileChannel)
+ WriteTests (&quot;HTML : &quot;, true, MainFileChannel)
end if
if bMakeChartTest then
- WriteTests (&quot;chart : &quot;, false, FileChannel)
+ WriteTests (&quot;chart : &quot;, false, MainFileChannel)
end if
if bMakeMathTest then
- WriteTests (&quot;math : &quot;, false, FileChannel)
+ WriteTests (&quot;math : &quot;, false, MainFileChannel)
end if
if bMakeJavaTest then
- WriteTests (&quot;Java : &quot;, false, FileChannel)
+ WriteTests (&quot;Java : &quot;, false, MainFileChannel)
end if
if bMakeDBTest then
- WriteDBTests (&quot;Database : &quot;, FileChannel)
+ WriteDBTests (&quot;Database : &quot;, MainFileChannel)
end if
if bMakeExtensionTest then
- WriteExtensionTests (&quot;Extension : &quot;, FileChannel)
+ WriteExtensionTests (&quot;Extension : &quot;, MainFileChannel)
end if
- Print #FileChannel
+ Print #MainFileChannel
end Sub
Sub WriteTests (sText as string, bTestAll as boolean, nFileChannel as integer)
@@ -328,63 +333,65 @@ Sub MakeDocTest
Dim bSuccess as Boolean
On Local Error GoTo DOCTESTERROR
- g_CurrentTestCase = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(g_CurrentDocTest))
- g_CurrentTestCase = cDocNew
- oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(g_CurrentDocTest or cFltNewDoc))
- LogTestResult( GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, not IsNull (oDoc) )
+ gCurrentTestCase = cLogfileFailed
+ LocalFileChannel% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+ gCurrentTestCase = cDocNew
+ oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(gCurrentDocTest or cFltNewDoc))
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, not IsNull (oDoc) )
if not IsNull (oDoc) then
- g_CurrentTestCase = cDocSaveOpen8
- if bMakeSaveOpen8Test and IsFilterAvailable (g_CurrentDocTest or cFlt8) then
- sFileName8 = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(g_CurrentDocTest or cFlt8)
- SaveDoc (sFileName8, oDoc, GetDocFilter(g_CurrentDocTest or cFlt8))
+ gCurrentTestCase = cDocSaveOpen8
+ if bMakeSaveOpen8Test and IsFilterAvailable (gCurrentDocTest or cFlt8) then
+ sFileName8 = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(gCurrentDocTest or cFlt8)
+ SaveDoc (sFileName8, oDoc, GetDocFilter(gCurrentDocTest or cFlt8))
end if
- g_CurrentTestCase = cDocSaveOpenXML
- if bMakeSaveOpenXMLTest and IsFilterAvailable (g_CurrentDocTest or cFltXML) then
- sFileNameXML = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(g_CurrentDocTest or cFltXML)
- SaveDoc (sFileNameXML, oDoc, GetDocFilter(g_CurrentDocTest or cFltXML))
+ gCurrentTestCase = cDocSaveOpenXML
+ if bMakeSaveOpenXMLTest and IsFilterAvailable (gCurrentDocTest or cFltXML) then
+ sFileNameXML = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(gCurrentDocTest or cFltXML)
+ SaveDoc (sFileNameXML, oDoc, GetDocFilter(gCurrentDocTest or cFltXML))
end if
- g_CurrentTestCase = cDocClose
+ gCurrentTestCase = cDocClose
bSuccess = CloseDoc( oDoc )
- LogTestResult( GetDocFilter(g_CurrentDocTest)+&quot; &quot;+ cMessageCloseDoc, bSuccess )
- g_CurrentTestCase = cDocSaveOpen8
- if bMakeSaveOpen8Test and IsFilterAvailable (g_CurrentDocTest or cFlt8) then
+ LogTestResult( GetDocFilter(gCurrentDocTest)+&quot; &quot;+ cMessageCloseDoc, bSuccess )
+ gCurrentTestCase = cDocSaveOpen8
+ if bMakeSaveOpen8Test and IsFilterAvailable (gCurrentDocTest or cFlt8) then
oDoc = LoadDoc (sFileName8)
&apos; oDoc = Documents.open(sFileName)
- LogTestResult( GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, not IsNull (oDoc) )
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, not IsNull (oDoc) )
if not IsNull (oDoc) then
- g_CurrentTestCase = cDocClose
+ gCurrentTestCase = cDocClose
oDoc.close (true)
end If
end if
- g_CurrentTestCase = cDocSaveOpenXML
- if bMakeSaveOpenXMLTest and IsFilterAvailable (g_CurrentDocTest or cFltXML) then
+ gCurrentTestCase = cDocSaveOpenXML
+ if bMakeSaveOpenXMLTest and IsFilterAvailable (gCurrentDocTest or cFltXML) then
oDoc = LoadDoc (sFileNameXML)
&apos; oDoc = Documents.open(sFileName)
- LogTestResult( GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpenXMLDoc, not IsNull (oDoc) )
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpenXMLDoc, not IsNull (oDoc) )
if not IsNull (oDoc) then
- g_CurrentTestCase = cDocClose
+ gCurrentTestCase = cDocClose
oDoc.close (true)
end If
end if
end If
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalFileChannel, &quot;---&quot;
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
Exit Sub &apos; Without error
DOCTESTERROR:
- If ( g_CurrentTestCase = cLogfileFailed ) then
+ If ( gCurrentTestCase = cLogfileFailed ) then
LogTestResult( "", False )
Exit Sub
else
- LogTestResult( GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(g_CurrentTestCase), False )
- Close #FileChannel%
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(gCurrentTestCase), False )
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
End If
Exit Sub &apos; With error
End Sub
@@ -393,28 +400,30 @@ Sub MakeNewDoc
DIM oDoc as Object
Dim bSuccess as Boolean
On Local Error GoTo DOCTESTERROR2
- g_CurrentTestCase = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(g_CurrentDocTest))
- g_CurrentTestCase = cDocNew
-&apos; oDoc = Documents.Add(GetDocFilter(g_CurrentDocTest))
- oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(g_CurrentDocTest or cFltNewDoc))
- LogTestResult( GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, not IsNull (oDoc) )
+ gCurrentTestCase = cLogfileFailed
+ LocalFileChannel% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+ gCurrentTestCase = cDocNew
+&apos; oDoc = Documents.Add(GetDocFilter(gCurrentDocTest))
+ oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(gCurrentDocTest or cFltNewDoc))
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, not IsNull (oDoc) )
if not IsNull (oDoc) then
- g_CurrentTestCase = cDocClose
+ gCurrentTestCase = cDocClose
bSuccess = CloseDoc( oDoc )
- LogTestResult( GetDocFilter(g_CurrentDocTest)+&quot; &quot;+ cMessageCloseDoc, bSuccess )
+ LogTestResult( GetDocFilter(gCurrentDocTest)+&quot; &quot;+ cMessageCloseDoc, bSuccess )
end If
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalFileChannel, &quot;---&quot;
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
Exit Sub &apos; Without error
DOCTESTERROR2:
- If ( g_CurrentTestCase = cLogfileFailed ) then
+ If ( gCurrentTestCase = cLogfileFailed ) then
LogTestResult( "", False )
Exit Sub
else
- LogTestResult( GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(g_CurrentTestCase), False )
- Close #FileChannel%
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(gCurrentTestCase), False )
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
End If
Exit Sub &apos; With error
End Sub
@@ -427,31 +436,33 @@ Sub MakeChartTest
const cChartName=&quot;TestChart&quot;
Dim bSuccess as Boolean
On Local Error GoTo CHARTTESTERROR
- g_CurrentTestCase = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(g_CurrentDocTest))
- g_CurrentTestCase = cDocNew
+ gCurrentTestCase = cLogfileFailed
+ LocalFileChannel% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+ gCurrentTestCase = cDocNew
oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(frmCalc or cFltNewDoc))
if not IsNull (oDoc) then
oCharts = oDoc.sheets(0).Charts
oCharts.AddNewByName (cChartName, oRect, oRange(), true, true)
bSuccess=oCharts.HasByName(cChartName)
- LogTestResult( GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, bSuccess )
- g_CurrentTestCase = cDocClose
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, bSuccess )
+ gCurrentTestCase = cDocClose
oDoc.close (true)
else
LogTestResult( GetDocFilter(frmCalc or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FALSE )
End if
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalFileChannel, &quot;---&quot;
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
Exit Sub &apos; Without error
CHARTTESTERROR:
- If ( g_CurrentTestCase = cLogfileFailed ) then
+ If ( gCurrentTestCase = cLogfileFailed ) then
LogTestResult( "", False )
Exit Sub
else
- LogTestResult( GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(g_CurrentTestCase), FALSE )
- Close #FileChannel%
+ LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(gCurrentTestCase), FALSE )
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
End If
Exit Sub &apos; With error
End Sub
@@ -553,6 +564,8 @@ Function GetLogFileName (DocType as Integer) as String
GetLogFileName = sSChartLogFileName &apos; chart
case frmJava
GetLogFileName = sJavaLogFileName &apos;Java
+ case frmOther
+ GetLogFileName = sTestGlueLogFileName &apos; test framework
case frmDataBase
GetLogFileName = sSDBLogFileName &apos;Database
case frmExtension
@@ -586,14 +599,15 @@ End Function
Function TestJava
Dim oObj as Object
- g_CurrentTestCase = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(g_CurrentDocTest))
- g_CurrentTestCase = cDocNew
+ gCurrentTestCase = cLogfileFailed
+ LocalFileChannel% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+ gCurrentTestCase = cDocNew
oObj = createUnoService( cUnoJavaLoader )
LogTestResult( &quot;Java &quot;+ cMessageNewDoc, not IsNull (oObj) )
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalFileChannel, &quot;---&quot;
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
TestJava = not IsNull (oObj)
End Function
diff --git a/smoketestoo_native/data/Test_DB.xml b/smoketestoo_native/data/Test_DB.xml
index 512a1abb1214..a9f1fc2e316d 100644
--- a/smoketestoo_native/data/Test_DB.xml
+++ b/smoketestoo_native/data/Test_DB.xml
@@ -45,16 +45,16 @@ Sub TestDB
On Local Error GoTo DBERROR
- g_CurrentTestCase = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(g_CurrentDocTest))
+ gCurrentTestCase = cLogfileFailed
+ LocalFileChannel% = OpenLogDat (GetLogFileName(gCurrentDocTest))
- g_CurrentTestCase = cDBService
+ gCurrentTestCase = cDBService
sCurrentMessage = cMessageDatabaseService + &quot; &quot; + cUnoDatabaseContext
oDBContext = CreateUnoService(cUnoDatabaseContext)
sDBName=oDBContext.ElementNames(0) &apos;Names of Databases
- g_CurrentTestCase = cDBOpen
+ gCurrentTestCase = cDBOpen
sCurrentMessage = cMessageDatabaseOpen
oDataSource = oDBContext.GetByName(sDBName)
@@ -63,13 +63,14 @@ Sub TestDB
LogTestResult( &quot;Database &quot;+ cMessageDatabaseOpen, not IsNull (oDBConnection) )
if (IsNull(oDBConnection)) then
- Close #FileChannel%
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
Exit Sub
End If
&apos; Database is open now
- g_CurrentTestCase = cDBService
+ gCurrentTestCase = cDBService
sCurrentMessage = cMessageDatabaseService + &quot; &quot; + cUnoRowSet
oRowSet = createUnoService(cUnoRowSet)
@@ -80,7 +81,7 @@ Sub TestDB
LogTestResult( &quot;Database &quot;+ cMessageDatabaseService, TRUE )
End If
- g_CurrentTestCase = cDBInsert
+ gCurrentTestCase = cDBInsert
sCurrentMessage = cMessageDatabaseInsert
oRowSet.ActiveConnection = oDBConnection
@@ -103,7 +104,7 @@ Sub TestDB
&apos;delete only if insert passed
if (bResult) Then
- g_CurrentTestCase = cDBDelete
+ gCurrentTestCase = cDBDelete
sCurrentMessage = cMessageDatabaseDelete
oRowSet.deleteRow()
bResult = (nRowCount - oRowSet.RowCount = 0)
@@ -116,28 +117,30 @@ Sub TestDB
&apos; read other record
- g_CurrentTestCase = cDBSeek
+ gCurrentTestCase = cDBSeek
sCurrentMessage = cMessageDatabaseSeek
oRowSet.first()
bResult = not (oRowSet.getString(5) = sTestString)
LogTestResult( &quot;Database &quot;+ cMessageDatabaseSeek, bResult )
- g_CurrentTestCase = cDBClose
+ gCurrentTestCase = cDBClose
sCurrentMessage = cMessageDatabaseClose
oDBConnection.Dispose()
LogTestResult( &quot;Database &quot;+ cMessageDatabaseClose, True )
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalFileChannel, &quot;---&quot;
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
Exit Sub &apos; Without error
DBERROR:
- If ( g_CurrentTestCase = cLogfileFailed ) then
+ If ( gCurrentTestCase = cLogfileFailed ) then
LogTestResult( "", False )
Exit Sub
else
LogTestResult( &quot;Database &quot;+ sCurrentMessage, FALSE )
- Close #FileChannel%
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
End If
Exit Sub &apos; With error
End Sub
diff --git a/smoketestoo_native/data/Test_Ext.xml b/smoketestoo_native/data/Test_Ext.xml
index 9d3931643658..735aae537596 100644
--- a/smoketestoo_native/data/Test_Ext.xml
+++ b/smoketestoo_native/data/Test_Ext.xml
@@ -41,11 +41,11 @@ Sub TestExtensions
On Local Error GoTo EXTERROR
- g_CurrentTestCase = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(g_CurrentDocTest))
+ gCurrentTestCase = cLogfileFailed
+ LocalFileChannel% = OpenLogDat (GetLogFileName(gCurrentDocTest))
sCurrentMessage = cMessageExtensionService
- g_CurrentTestCase = cEXTService
+ gCurrentTestCase = cEXTService
&apos;Create an implementation of com.sun.star.ucb.XCommandEnvironment which is needed for
&apos;adding the extension. The implementation is in
@@ -59,12 +59,13 @@ Sub TestExtensions
LogTestResult( &quot;Extension &quot;+ cMessageExtensionService, not IsNull (ext_mgr) )
if (IsNull(ext_mgr)) then
- Close #FileChannel%
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
Exit Sub
End If
sCurrentMessage = cMessageExtensionInstall
- g_CurrentTestCase = cEXTInstall
+ gCurrentTestCase = cEXTInstall
&apos;Add the extension. We must provide a file URL here.
&apos;By passing &quot;user&quot; we determine that the actions we perform on
@@ -78,12 +79,13 @@ Sub TestExtensions
bResult = (oTestExtension.getImplementationName = sImplementationNameString)
LogTestResult( &quot;Extension &quot;+ cMessageExtensionInstall, bResult )
if (not bResult) then
- Close #FileChannel%
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
Exit Sub
End If
sCurrentMessage = cMessageExtensionUninstall
- g_CurrentTestCase = cEXTUninstall
+ gCurrentTestCase = cEXTUninstall
&apos;Remove the package
ext_mgr.removeExtension(&quot;org.openoffice.legacy.&quot; + cExtensionFileName, cExtensionFileName, &quot;user&quot;,obj_null, cmdEnv)
@@ -94,17 +96,19 @@ Sub TestExtensions
&apos;The service must not be available anymore. Therefor isNull must return true.
LogTestResult( &quot;Extension &quot;+ cMessageExtensionUninstall, IsNull (oTestExtension) )
- Print #FileChannel, &quot;---&quot;
- Close #FileChannel%
+ Print #LocalFileChannel, &quot;---&quot;
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
Exit Sub &apos; Without error
EXTERROR:
- If ( g_CurrentTestCase = cLogfileFailed ) then
+ If ( gCurrentTestCase = cLogfileFailed ) then
LogTestResult( "", False )
Exit Sub
else
LogTestResult( &quot;Extension &quot;+ sCurrentMessage, False )
- Close #FileChannel%
+ Close #LocalFileChannel%
+ LocalFileChannel = 0
End If
Exit Sub &apos; With error