summaryrefslogtreecommitdiff
path: root/smoketestoo_native
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-02-08 12:59:00 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-02-08 12:59:00 +0100
commit325b08b894be41b87f353010156ce38b9a1cfaee (patch)
tree374758b70bfcf29be848f8d8d37ea3b8eee7ddbb /smoketestoo_native
parent50d0937a706fd9c3aeebebd55e21d60499b8be20 (diff)
debuglevels: capture assertions during the test run, let the test fail in case we encounter an assertion.
Still missing: Refactor the tests so that the currently running test case ("open doc", "save doc", etc.) is known in the assertion handler, so we can mark the proper test case as "failed". Currently, the "new doc" case is marked, which is wrong.
Diffstat (limited to 'smoketestoo_native')
-rw-r--r--smoketestoo_native/data/Global.xml29
-rw-r--r--smoketestoo_native/data/Test_10er.xml140
-rw-r--r--smoketestoo_native/data/Test_DB.xml38
-rw-r--r--smoketestoo_native/data/Test_Ext.xml26
4 files changed, 111 insertions, 122 deletions
diff --git a/smoketestoo_native/data/Global.xml b/smoketestoo_native/data/Global.xml
index e80ded136725..3569343530ba 100644
--- a/smoketestoo_native/data/Global.xml
+++ b/smoketestoo_native/data/Global.xml
@@ -126,7 +126,14 @@ Sub ClearAllText
call ClearStatus
end Sub
+Sub AssertionHandler( sMessage as String )
+ LogTestResult( cDocNew, &quot;assertion caught: &quot; + sMessage, FALSE )
+ &apos;TODO: get the proper test case number
+End Sub
+
Sub Main
+ CaptureAssertions( &quot;AssertionHandler&quot; )
+
call SetGlobalDoc
if bShowTable then
call ClearDoc (gOutPutDoc)
@@ -143,6 +150,8 @@ Sub Main
call CreateSecondState
gOutputDoc.CurrentController.ViewCursor.JumpToFirstPage
end if
+
+ CaptureAssertions( &quot;&quot; )
End Sub
Sub CreateStatusTable
@@ -362,10 +371,21 @@ Function GetRangeName (nColumn as integer, nRow as integer) as string
GetRangeName = chr (nColumn+66) + Trim(Str(nRow+1))
end Function
-Sub SetStatus (nDocType as Integer, nAction as Integer, bState as Boolean)
+Sub LogTestResult( nTestCase as Integer, sTestCaseDescription as String, bSuccess as Boolean )
+ If ( nTestCase = cLogfileFailed ) Then
+ LogState( FALSE, &quot;creating logfile &apos;&quot; + GetLogFileName( g_CurrentDocTest ) + &quot;&apos; failed&quot;, MainFileChannel )
+ SetStatus( 0, FALSE )
+ Else
+ LogState( bSuccess, sTestCaseDescription, FileChannel )
+ LogState( bSuccess, sTestCaseDescription, MainFileChannel )
+ SetStatus( nTestCase, bSuccess )
+ End If
+End Sub
+
+Sub SetStatus( nAction as Integer, bState as Boolean )
Dim nStatusType as Integer
Dim nState as integer
- nStatusType = GetStatusType (nDocType)
+ nStatusType = GetStatusType( g_CurrentDocTest )
If nStatusType = cStNone then Exit Sub
if bState then
@@ -374,6 +394,11 @@ Sub SetStatus (nDocType as Integer, nAction as Integer, bState as Boolean)
nState = cLogFalse
end If
+ If ( gErrorState( nStatusType, nAction ) = cLogFalse ) Then
+ &apos; don't overwrite a previous &quot;failed&quot; state for this this
+ nState = cLogFalse
+ End If
+
gErrorState (nStatusType, nAction) = nState
end Sub
diff --git a/smoketestoo_native/data/Test_10er.xml b/smoketestoo_native/data/Test_10er.xml
index c48f564cd447..b586d9ba4bd1 100644
--- a/smoketestoo_native/data/Test_10er.xml
+++ b/smoketestoo_native/data/Test_10er.xml
@@ -42,6 +42,8 @@ const cMessageSaveOpenXMLDoc = &quot;Save/Open Document XML (6/7)&quot;
const cMessageNewDoc = &quot;New Document&quot;
const cMessageCloseDoc = &quot;Close Document&quot;
+Global g_CurrentDocTest As Integer
+
Global sWorkPath$
Global sWorkPathURL$
Global FileChannel%
@@ -193,34 +195,44 @@ DIM nStrPos as Long
MainFileChannel = OpenLogDat (sLogFileName)
call WriteTestSequence (MainFileChannel)
if bMakeWriterTest then
- call MakeDocTest (frmWriter)
+ g_CurrentDocTest = frmWriter
+ call MakeDocTest
end if
if bMakeCalcTest then
- call MakeDocTest (frmCalc)
+ g_CurrentDocTest = frmCalc
+ call MakeDocTest
end if
if bMakeImpressTest then
- call MakeDocTest (frmImpress)
+ g_CurrentDocTest = frmImpress
+ call MakeDocTest
end if
if bMakeDrawTest then
- call MakeDocTest (frmDraw)
+ g_CurrentDocTest = frmDraw
+ call MakeDocTest
end if
if bMakeHTMLTest then
- call MakeDocTest (frmHyperText)
+ g_CurrentDocTest = frmHyperText
+ call MakeDocTest
end if
if bMakeChartTest then
- call MakeChartTest (frmChart)
+ g_CurrentDocTest = frmChart
+ call MakeChartTest
end if
if bMakeMathTest then
- call MakeNewDoc (frmMath)
+ g_CurrentDocTest = frmMath
+ call MakeNewDoc
end if
if bMakeJavaTest then
- call TestJava (frmJava)
+ g_CurrentDocTest = frmJava
+ call TestJava
end if
if bMakeDBTest then
- call Test_DB.TestDB (frmDataBase)
+ g_CurrentDocTest = frmDataBase
+ call Test_DB.TestDB
end if
if bMakeExtensionTest then
- call Test_Ext.TestExtensions (frmExtension)
+ g_CurrentDocTest = frmExtension
+ call Test_Ext.TestExtensions
end if
Close #MainFileChannel
@@ -312,7 +324,7 @@ Sub WriteExtensionTests (sText as string, nFileChannel as integer)
Print #nFileChannel, sWriteStr
end Sub
-Sub MakeDocTest (FilterType as Integer)
+Sub MakeDocTest
Dim oDoc as Object
Dim sFileNameXML$, sFileName8$
Dim bSuccess as Boolean
@@ -320,36 +332,30 @@ Sub MakeDocTest (FilterType as Integer)
On Local Error GoTo DOCTESTERROR
nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
+ FileChannel% = OpenLogDat (GetLogFileName(g_CurrentDocTest))
nCurrentAction = cDocNew
- oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(FilterType or cFltNewDoc))
- LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
- LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (FilterType, cDocNew, not IsNull (oDoc))
- if not IsNull (oDoc) then
- nCurrentAction = cDocSaveOpen8
- if bMakeSaveOpen8Test and IsFilterAvailable (FilterType or cFlt8) then
- sFileName8 = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(FilterType or cFlt8)
- SaveDoc (sFileName8, oDoc, GetDocFilter(FilterType or cFlt8))
+ oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(g_CurrentDocTest or cFltNewDoc))
+ LogTestResult(cDocNew, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, not IsNull (oDoc) )
+ if not IsNull (oDoc) then
+ nCurrentAction = 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))
end if
nCurrentAction = cDocSaveOpenXML
- if bMakeSaveOpenXMLTest and IsFilterAvailable (FilterType or cFltXML) then
- sFileNameXML = sWorkPathURL+cTempFileName+&quot;.&quot;+GetDocEndings(FilterType or cFltXML)
- SaveDoc (sFileNameXML, oDoc, GetDocFilter(FilterType or cFltXML))
+ 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))
end if
nCurrentAction = cDocClose
bSuccess = CloseDoc( oDoc )
- LogState (bSuccess, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, FileChannel)
- LogState (bSuccess, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, MainFileChannel)
- SetStatus (FilterType, cDocClose, bSuccess)
+ LogTestResult( cDocClose, GetDocFilter(g_CurrentDocTest)+&quot; &quot;+ cMessageCloseDoc, bSuccess )
nCurrentAction = cDocSaveOpen8
- if bMakeSaveOpen8Test and IsFilterAvailable (FilterType or cFlt8) then
+ if bMakeSaveOpen8Test and IsFilterAvailable (g_CurrentDocTest or cFlt8) then
oDoc = LoadDoc (sFileName8)
&apos; oDoc = Documents.open(sFileName)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, FileChannel)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, MainFileChannel)
- SetStatus (FilterType, cDocSaveOpen8, not IsNull (oDoc))
+ LogTestResult(cDocSaveOpen8, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpen8Doc, not IsNull (oDoc) )
if not IsNull (oDoc) then
nCurrentAction = cDocClose
@@ -358,13 +364,11 @@ Sub MakeDocTest (FilterType as Integer)
end if
nCurrentAction = cDocSaveOpenXML
- if bMakeSaveOpenXMLTest and IsFilterAvailable (FilterType or cFltXML) then
+ if bMakeSaveOpenXMLTest and IsFilterAvailable (g_CurrentDocTest or cFltXML) then
oDoc = LoadDoc (sFileNameXML)
&apos; oDoc = Documents.open(sFileName)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpenXMLDoc, FileChannel)
- LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpenXMLDoc, MainFileChannel)
- SetStatus (FilterType, cDocSaveOpenXML, not IsNull (oDoc))
+ LogTestResult(cDocSaveOpenXML, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageSaveOpenXMLDoc, not IsNull (oDoc) )
if not IsNull (oDoc) then
nCurrentAction = cDocClose
@@ -379,36 +383,30 @@ Sub MakeDocTest (FilterType as Integer)
DOCTESTERROR:
If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cDocNew, False)
+ LogTestResult( cLogfileFailed, "", False )
Exit Sub
else
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), FileChannel)
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
+ LogTestResult(nCurrentAction, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), False )
Close #FileChannel%
End If
Exit Sub &apos; With error
End Sub
-Sub MakeNewDoc (FilterType as Integer)
+Sub MakeNewDoc
DIM oDoc as Object
Dim bSuccess as Boolean
Dim nCurrentAction as Integer
On Local Error GoTo DOCTESTERROR2
nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
+ FileChannel% = OpenLogDat (GetLogFileName(g_CurrentDocTest))
nCurrentAction = cDocNew
-&apos; oDoc = Documents.Add(GetDocFilter(FilterType))
- oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(FilterType or cFltNewDoc))
- LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
- LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (FilterType, cDocNew, not IsNull (oDoc))
+&apos; oDoc = Documents.Add(GetDocFilter(g_CurrentDocTest))
+ oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(g_CurrentDocTest or cFltNewDoc))
+ LogTestResult(cDocNew, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, not IsNull (oDoc) )
if not IsNull (oDoc) then
nCurrentAction = cDocClose
bSuccess = CloseDoc( oDoc )
- LogState (bSuccess, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, FileChannel)
- LogState (bSuccess, GetDocFilter(FilterType)+&quot; &quot;+ cMessageCloseDoc, MainFileChannel)
- SetStatus (FilterType, cDocClose, bSuccess)
+ LogTestResult(cDocClose, GetDocFilter(g_CurrentDocTest)+&quot; &quot;+ cMessageCloseDoc, bSuccess )
end If
Print #FileChannel, &quot;---&quot;
Close #FileChannel%
@@ -416,43 +414,37 @@ Sub MakeNewDoc (FilterType as Integer)
DOCTESTERROR2:
If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cDocNew, False)
+ LogTestResult( cLogfileFailed, "", False )
Exit Sub
else
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), FileChannel)
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
+ LogTestResult( nCurrentAction, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), False )
Close #FileChannel%
End If
Exit Sub &apos; With error
End Sub
-Sub MakeChartTest (FilterType as Integer)
+Sub MakeChartTest
Dim oCharts as Object
Dim oDoc as Object
Dim oRange(0) as New com.sun.star.table.CellRangeAddress
Dim oRect as New com.sun.star.awt.Rectangle
const cChartName=&quot;TestChart&quot;
- Dim bSuccess as Boolean
- Dim nCurrentAction as Integer
- On Local Error GoTo CHARTTESTERROR
- nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
- nCurrentAction = cDocNew
- oDoc = LoadDoc (&quot;private:factory/&quot; + GetDocFilter(frmCalc or cFltNewDoc))
+ Dim bSuccess as Boolean
+ Dim nCurrentAction as Integer
+ On Local Error GoTo CHARTTESTERROR
+ nCurrentAction = cLogfileFailed
+ FileChannel% = OpenLogDat (GetLogFileName(g_CurrentDocTest))
+ nCurrentAction = 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)
- LogState (bSuccess, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
- LogState (bSuccess, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (FilterType, cDocNew, bSuccess)
+ LogTestResult( cDocNew, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, bSuccess )
nCurrentAction = cDocClose
oDoc.close (true)
else
- LogState (not IsNull (oDoc), GetDocFilter(frmCalc or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FileChannel)
- LogState (not IsNull (oDoc), GetDocFilter(frmCalc or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (frmCalc, cDocNew, not IsNull (oDoc))
+ LogTestResult( cDocNew, GetDocFilter(frmCalc or cFltNewDoc)+&quot; &quot;+ cMessageNewDoc, FALSE )
End if
Print #FileChannel, &quot;---&quot;
Close #FileChannel%
@@ -460,12 +452,10 @@ Sub MakeChartTest (FilterType as Integer)
CHARTTESTERROR:
If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cDocNew, False)
+ LogTestResult( cLogfileFailed, "", False )
Exit Sub
else
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), FileChannel)
- LogState (False, GetDocFilter(FilterType or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
+ LogTestResult( nCurrentAction, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+&quot; &quot;+ GetErrorMessage(nCurrentAction), FALSE )
Close #FileChannel%
End If
Exit Sub &apos; With error
@@ -599,13 +589,11 @@ Function IsFilterAvailable (FilterType as Integer) as boolean
end if
End Function
-Function TestJava (FilterType as Integer) as boolean
+Function TestJava
Dim oObj as Object
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
+ FileChannel% = OpenLogDat (GetLogFileName(g_CurrentDocTest))
oObj = createUnoService(cUnoJavaLoader)
- LogState (not IsNull (oObj), &quot;Java &quot;+ cMessageNewDoc, FileChannel)
- LogState (not IsNull (oObj), &quot;Java &quot;+ cMessageNewDoc, MainFileChannel)
- SetStatus (FilterType, cDocNew, not IsNull (oObj))
+ LogTestResult( cDocNew, &quot;Java &quot;+ cMessageNewDoc, not IsNull (oObj) )
Print #FileChannel, &quot;---&quot;
Close #FileChannel%
diff --git a/smoketestoo_native/data/Test_DB.xml b/smoketestoo_native/data/Test_DB.xml
index 34ade11f75fb..56e55e846c3a 100644
--- a/smoketestoo_native/data/Test_DB.xml
+++ b/smoketestoo_native/data/Test_DB.xml
@@ -35,7 +35,7 @@ const cMessageDatabaseDelete = &quot;Delete record from Database&quot;
const cMessageDatabaseSeek = &quot;Read other record from Database&quot;
const cMessageDatabaseClose = &quot;Close Database&quot;
-Sub TestDB (FilterType as Integer)
+Sub TestDB
Dim oDBConnection as Object, oDataSource as Object, oDBContext as Object
Dim sDBName as String, sTable as String, sCurrentMessage as String
@@ -47,7 +47,7 @@ Const sTestString = &quot;Automatical Test&quot;
On Local Error GoTo DBERROR
nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
+ FileChannel% = OpenLogDat (GetLogFileName(g_CurrentDocTest))
nCurrentAction = cDBService
sCurrentMessage = cMessageDatabaseService + &quot; &quot; + cUnoDatabaseContext
@@ -62,9 +62,7 @@ Const sTestString = &quot;Automatical Test&quot;
sTable=oDataSource.Tables.ElementNames(0)
oDBConnection = oDBContext.GetByName(sDBName).GetConnection(&quot;&quot;,&quot;&quot;)
- LogState (not IsNull (oDBConnection), &quot;Database &quot;+ cMessageDatabaseOpen, FileChannel)
- LogState (not IsNull (oDBConnection), &quot;Database &quot;+ cMessageDatabaseOpen, MainFileChannel)
- SetStatus (FilterType, cDBOpen, not IsNull (oDBConnection))
+ LogTestResult( cDBOpen, &quot;Database &quot;+ cMessageDatabaseOpen, not IsNull (oDBConnection) )
if (IsNull(oDBConnection)) then
Close #FileChannel%
Exit Sub
@@ -77,14 +75,10 @@ Const sTestString = &quot;Automatical Test&quot;
oRowSet = createUnoService(cUnoRowSet)
if (IsNull(oRowSet)) then
- LogState (not IsNull (oRowSet), &quot;Database &quot;+ cMessageDatabaseService + &quot; &quot; + cUnoRowSet, FileChannel)
- LogState (not IsNull (oRowSet), &quot;Database &quot;+ cMessageDatabaseService + &quot; &quot; + cUnoRowSet, MainFileChannel)
- SetStatus (FilterType, cDBService, not IsNull (oRowSet))
+ LogTestResult( cDBService, &quot;Database &quot;+ cMessageDatabaseService + &quot; &quot; + cUnoRowSet, not IsNull (oRowSet) )
Exit Sub
else
- LogState (not IsNull (oRowSet), &quot;Database &quot;+ cMessageDatabaseService, FileChannel)
- LogState (not IsNull (oRowSet), &quot;Database &quot;+ cMessageDatabaseService, MainFileChannel)
- SetStatus (FilterType, cDBService, not IsNull (oRowSet))
+ LogTestResult( cDBService, &quot;Database &quot;+ cMessageDatabaseService, TRUE )
End If
nCurrentAction = cDBInsert
@@ -105,9 +99,7 @@ Const sTestString = &quot;Automatical Test&quot;
oRowSet.moveToCurrentRow()
bResult = (oRowSet.getString(5) = sTestString)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseInsert, FileChannel)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseInsert, MainFileChannel)
- SetStatus (FilterType, cDBInsert, bResult)
+ LogTestResult( cDBInsert, &quot;Database &quot;+ cMessageDatabaseInsert, bResult )
&apos;delete only if insert passed
@@ -120,9 +112,7 @@ Const sTestString = &quot;Automatical Test&quot;
oRowSet.next()
bResult = (nRowCount - oRowSet.RowCount = 1)
End If
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseDelete, FileChannel)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseDelete, MainFileChannel)
- SetStatus (FilterType, cDBDelete, bResult)
+ LogTestResult( cDBDelete, &quot;Database &quot;+ cMessageDatabaseDelete, bResult )
End If
&apos; read other record
@@ -131,16 +121,12 @@ Const sTestString = &quot;Automatical Test&quot;
sCurrentMessage = cMessageDatabaseSeek
oRowSet.first()
bResult = not (oRowSet.getString(5) = sTestString)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseSeek, FileChannel)
- LogState (bResult, &quot;Database &quot;+ cMessageDatabaseSeek, MainFileChannel)
- SetStatus (FilterType, cDBSeek, bResult)
+ LogTestResult( cDBSeek, &quot;Database &quot;+ cMessageDatabaseSeek, bResult )
nCurrentAction = cDBClose
sCurrentMessage = cMessageDatabaseClose
oDBConnection.Dispose()
- LogState (True, &quot;Database &quot;+ cMessageDatabaseClose, FileChannel)
- LogState (True, &quot;Database &quot;+ cMessageDatabaseClose, MainFileChannel)
- SetStatus (FilterType, cDBClose, True)
+ LogTestResult( cDBClose, &quot;Database &quot;+ cMessageDatabaseClose, True )
Print #FileChannel, &quot;---&quot;
Close #FileChannel%
@@ -148,12 +134,10 @@ Const sTestString = &quot;Automatical Test&quot;
DBERROR:
If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cDBOpen, False)
+ LogTestResult( cLogfileFailed, "", False )
Exit Sub
else
- LogState (False, &quot;Database &quot;+ sCurrentMessage, FileChannel)
- LogState (False, &quot;Database &quot;+ sCurrentMessage, MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
+ LogTestResult( nCurrentAction, &quot;Database &quot;+ sCurrentMessage, FALSE )
Close #FileChannel%
End If
Exit Sub &apos; With error
diff --git a/smoketestoo_native/data/Test_Ext.xml b/smoketestoo_native/data/Test_Ext.xml
index 31d27dc7a4a7..534917f02eac 100644
--- a/smoketestoo_native/data/Test_Ext.xml
+++ b/smoketestoo_native/data/Test_Ext.xml
@@ -32,7 +32,7 @@ const cMessageExtensionService = &quot;Extension Service&quot;
const cMessageExtensionInstall = &quot;Install Extension&quot;
const cMessageExtensionUninstall = &quot;Uninstall Extension&quot;
-Sub TestExtensions (FilterType as Integer)
+Sub TestExtensions
Dim oTestExtension as Object, obj_null as Object
Dim sCurrentMessage as String
Dim nCurrentAction as Integer
@@ -43,7 +43,7 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
On Local Error GoTo EXTERROR
nCurrentAction = cLogfileFailed
- FileChannel% = OpenLogDat (GetLogFileName(FilterType))
+ FileChannel% = OpenLogDat (GetLogFileName(g_CurrentDocTest))
sCurrentMessage = cMessageExtensionService
nCurrentAction = cEXTService
@@ -58,11 +58,9 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
ctx = getDefaultContext
ext_mgr = ctx.getValueByName(&quot;/singletons/&quot; + cExtensionManager)
- LogState (not IsNull (ext_mgr), &quot;Extension &quot;+ cMessageExtensionService, FileChannel)
- LogState (not IsNull (ext_mgr), &quot;Extension &quot;+ cMessageExtensionService, MainFileChannel)
- SetStatus (FilterType, cEXTService, not IsNull (ext_mgr))
+ LogTestResult( cEXTService, &quot;Extension &quot;+ cMessageExtensionService, not IsNull (ext_mgr) )
if (IsNull(ext_mgr)) then
- Close #FileChannel%
+ Close #FileChannel%
Exit Sub
End If
@@ -79,11 +77,9 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
&apos;Check if the extension has been added by creating a service which is contained in the extension.
oTestExtension = createUnoService(cUnoSmoketestTestExtension)
bResult = (oTestExtension.getImplementationName = sImplementationNameString)
- LogState (bResult, &quot;Extension &quot;+ cMessageExtensionInstall, FileChannel)
- LogState (bResult, &quot;Extension &quot;+ cMessageExtensionInstall, MainFileChannel)
- SetStatus (FilterType, cEXTInstall, bResult)
+ LogTestResult( cEXTInstall, &quot;Extension &quot;+ cMessageExtensionInstall, bResult )
if (not bResult) then
- Close #FileChannel%
+ Close #FileChannel%
Exit Sub
End If
@@ -97,9 +93,7 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
oTestExtension = createUnoService(cUnoSmoketestTestExtension)
&apos;The service must not be available anymore. Therefor isNull must return true.
- LogState (IsNull (oTestExtension), &quot;Extension &quot;+ cMessageExtensionUninstall, FileChannel)
- LogState (IsNull (oTestExtension), &quot;Extension &quot;+ cMessageExtensionUninstall, MainFileChannel)
- SetStatus (FilterType, cEXTUninstall, IsNull (oTestExtension))
+ LogTestResult( cEXTUninstall, &quot;Extension &quot;+ cMessageExtensionUninstall, IsNull (oTestExtension) )
Print #FileChannel, &quot;---&quot;
Close #FileChannel%
@@ -107,12 +101,10 @@ sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&q
EXTERROR:
If (nCurrentAction = cLogfileFailed) then
- SetStatus (FilterType, cEXTService, False)
+ LogTestResult( cLogfileFailed, "", False )
Exit Sub
else
- LogState (False, &quot;Extension &quot;+ sCurrentMessage, FileChannel)
- LogState (False, &quot;Extension &quot;+ sCurrentMessage, MainFileChannel)
- SetStatus (FilterType, nCurrentAction, False)
+ LogTestResult( nCurrentAction, &quot;Extension &quot;+ sCurrentMessage, False )
Close #FileChannel%
End If
Exit Sub &apos; With error