diff options
Diffstat (limited to 'smoketestoo_native')
-rw-r--r-- | smoketestoo_native/data/Global.xml | 29 | ||||
-rw-r--r-- | smoketestoo_native/data/Test_10er.xml | 140 | ||||
-rw-r--r-- | smoketestoo_native/data/Test_DB.xml | 38 | ||||
-rw-r--r-- | smoketestoo_native/data/Test_Ext.xml | 26 |
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, "assertion caught: " + sMessage, FALSE ) + 'TODO: get the proper test case number +End Sub + Sub Main + CaptureAssertions( "AssertionHandler" ) + call SetGlobalDoc if bShowTable then call ClearDoc (gOutPutDoc) @@ -143,6 +150,8 @@ Sub Main call CreateSecondState gOutputDoc.CurrentController.ViewCursor.JumpToFirstPage end if + + CaptureAssertions( "" ) 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, "creating logfile '" + GetLogFileName( g_CurrentDocTest ) + "' failed", 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 + ' don't overwrite a previous "failed" 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 = "Save/Open Document XML (6/7)" const cMessageNewDoc = "New Document" const cMessageCloseDoc = "Close Document" +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 ("private:factory/" + GetDocFilter(FilterType or cFltNewDoc)) - LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageNewDoc, FileChannel) - LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+" "+ 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+"."+GetDocEndings(FilterType or cFlt8) - SaveDoc (sFileName8, oDoc, GetDocFilter(FilterType or cFlt8)) + oDoc = LoadDoc ("private:factory/" + GetDocFilter(g_CurrentDocTest or cFltNewDoc)) + LogTestResult(cDocNew, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+" "+ cMessageNewDoc, not IsNull (oDoc) ) + if not IsNull (oDoc) then + nCurrentAction = cDocSaveOpen8 + if bMakeSaveOpen8Test and IsFilterAvailable (g_CurrentDocTest or cFlt8) then + sFileName8 = sWorkPathURL+cTempFileName+"."+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+"."+GetDocEndings(FilterType or cFltXML) - SaveDoc (sFileNameXML, oDoc, GetDocFilter(FilterType or cFltXML)) + if bMakeSaveOpenXMLTest and IsFilterAvailable (g_CurrentDocTest or cFltXML) then + sFileNameXML = sWorkPathURL+cTempFileName+"."+GetDocEndings(g_CurrentDocTest or cFltXML) + SaveDoc (sFileNameXML, oDoc, GetDocFilter(g_CurrentDocTest or cFltXML)) end if nCurrentAction = cDocClose bSuccess = CloseDoc( oDoc ) - LogState (bSuccess, GetDocFilter(FilterType)+" "+ cMessageCloseDoc, FileChannel) - LogState (bSuccess, GetDocFilter(FilterType)+" "+ cMessageCloseDoc, MainFileChannel) - SetStatus (FilterType, cDocClose, bSuccess) + LogTestResult( cDocClose, GetDocFilter(g_CurrentDocTest)+" "+ cMessageCloseDoc, bSuccess ) nCurrentAction = cDocSaveOpen8 - if bMakeSaveOpen8Test and IsFilterAvailable (FilterType or cFlt8) then + if bMakeSaveOpen8Test and IsFilterAvailable (g_CurrentDocTest or cFlt8) then oDoc = LoadDoc (sFileName8) ' oDoc = Documents.open(sFileName) - LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageSaveOpen8Doc, FileChannel) - LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageSaveOpen8Doc, MainFileChannel) - SetStatus (FilterType, cDocSaveOpen8, not IsNull (oDoc)) + LogTestResult(cDocSaveOpen8, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+" "+ 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) ' oDoc = Documents.open(sFileName) - LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageSaveOpenXMLDoc, FileChannel) - LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageSaveOpenXMLDoc, MainFileChannel) - SetStatus (FilterType, cDocSaveOpenXML, not IsNull (oDoc)) + LogTestResult(cDocSaveOpenXML, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+" "+ 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)+" "+ GetErrorMessage(nCurrentAction), FileChannel) - LogState (False, GetDocFilter(FilterType or cFltNewDoc)+" "+ GetErrorMessage(nCurrentAction), MainFileChannel) - SetStatus (FilterType, nCurrentAction, False) + LogTestResult(nCurrentAction, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+" "+ GetErrorMessage(nCurrentAction), False ) Close #FileChannel% End If Exit Sub ' 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 -' oDoc = Documents.Add(GetDocFilter(FilterType)) - oDoc = LoadDoc ("private:factory/" + GetDocFilter(FilterType or cFltNewDoc)) - LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageNewDoc, FileChannel) - LogState (not IsNull (oDoc), GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageNewDoc, MainFileChannel) - SetStatus (FilterType, cDocNew, not IsNull (oDoc)) +' oDoc = Documents.Add(GetDocFilter(g_CurrentDocTest)) + oDoc = LoadDoc ("private:factory/" + GetDocFilter(g_CurrentDocTest or cFltNewDoc)) + LogTestResult(cDocNew, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+" "+ cMessageNewDoc, not IsNull (oDoc) ) if not IsNull (oDoc) then nCurrentAction = cDocClose bSuccess = CloseDoc( oDoc ) - LogState (bSuccess, GetDocFilter(FilterType)+" "+ cMessageCloseDoc, FileChannel) - LogState (bSuccess, GetDocFilter(FilterType)+" "+ cMessageCloseDoc, MainFileChannel) - SetStatus (FilterType, cDocClose, bSuccess) + LogTestResult(cDocClose, GetDocFilter(g_CurrentDocTest)+" "+ cMessageCloseDoc, bSuccess ) end If Print #FileChannel, "---" 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)+" "+ GetErrorMessage(nCurrentAction), FileChannel) - LogState (False, GetDocFilter(FilterType or cFltNewDoc)+" "+ GetErrorMessage(nCurrentAction), MainFileChannel) - SetStatus (FilterType, nCurrentAction, False) + LogTestResult( nCurrentAction, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+" "+ GetErrorMessage(nCurrentAction), False ) Close #FileChannel% End If Exit Sub ' 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="TestChart" - Dim bSuccess as Boolean - Dim nCurrentAction as Integer - On Local Error GoTo CHARTTESTERROR - nCurrentAction = cLogfileFailed - FileChannel% = OpenLogDat (GetLogFileName(FilterType)) - nCurrentAction = cDocNew - oDoc = LoadDoc ("private:factory/" + 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 ("private:factory/" + 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)+" "+ cMessageNewDoc, FileChannel) - LogState (bSuccess, GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageNewDoc, MainFileChannel) - SetStatus (FilterType, cDocNew, bSuccess) + LogTestResult( cDocNew, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+" "+ cMessageNewDoc, bSuccess ) nCurrentAction = cDocClose oDoc.close (true) else - LogState (not IsNull (oDoc), GetDocFilter(frmCalc or cFltNewDoc)+" "+ cMessageNewDoc, FileChannel) - LogState (not IsNull (oDoc), GetDocFilter(frmCalc or cFltNewDoc)+" "+ cMessageNewDoc, MainFileChannel) - SetStatus (frmCalc, cDocNew, not IsNull (oDoc)) + LogTestResult( cDocNew, GetDocFilter(frmCalc or cFltNewDoc)+" "+ cMessageNewDoc, FALSE ) End if Print #FileChannel, "---" 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)+" "+ GetErrorMessage(nCurrentAction), FileChannel) - LogState (False, GetDocFilter(FilterType or cFltNewDoc)+" "+ GetErrorMessage(nCurrentAction), MainFileChannel) - SetStatus (FilterType, nCurrentAction, False) + LogTestResult( nCurrentAction, GetDocFilter(g_CurrentDocTest or cFltNewDoc)+" "+ GetErrorMessage(nCurrentAction), FALSE ) Close #FileChannel% End If Exit Sub ' 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), "Java "+ cMessageNewDoc, FileChannel) - LogState (not IsNull (oObj), "Java "+ cMessageNewDoc, MainFileChannel) - SetStatus (FilterType, cDocNew, not IsNull (oObj)) + LogTestResult( cDocNew, "Java "+ cMessageNewDoc, not IsNull (oObj) ) Print #FileChannel, "---" 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 = "Delete record from Database" const cMessageDatabaseSeek = "Read other record from Database" const cMessageDatabaseClose = "Close Database" -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 = "Automatical Test" On Local Error GoTo DBERROR nCurrentAction = cLogfileFailed - FileChannel% = OpenLogDat (GetLogFileName(FilterType)) + FileChannel% = OpenLogDat (GetLogFileName(g_CurrentDocTest)) nCurrentAction = cDBService sCurrentMessage = cMessageDatabaseService + " " + cUnoDatabaseContext @@ -62,9 +62,7 @@ Const sTestString = "Automatical Test" sTable=oDataSource.Tables.ElementNames(0) oDBConnection = oDBContext.GetByName(sDBName).GetConnection("","") - LogState (not IsNull (oDBConnection), "Database "+ cMessageDatabaseOpen, FileChannel) - LogState (not IsNull (oDBConnection), "Database "+ cMessageDatabaseOpen, MainFileChannel) - SetStatus (FilterType, cDBOpen, not IsNull (oDBConnection)) + LogTestResult( cDBOpen, "Database "+ cMessageDatabaseOpen, not IsNull (oDBConnection) ) if (IsNull(oDBConnection)) then Close #FileChannel% Exit Sub @@ -77,14 +75,10 @@ Const sTestString = "Automatical Test" oRowSet = createUnoService(cUnoRowSet) if (IsNull(oRowSet)) then - LogState (not IsNull (oRowSet), "Database "+ cMessageDatabaseService + " " + cUnoRowSet, FileChannel) - LogState (not IsNull (oRowSet), "Database "+ cMessageDatabaseService + " " + cUnoRowSet, MainFileChannel) - SetStatus (FilterType, cDBService, not IsNull (oRowSet)) + LogTestResult( cDBService, "Database "+ cMessageDatabaseService + " " + cUnoRowSet, not IsNull (oRowSet) ) Exit Sub else - LogState (not IsNull (oRowSet), "Database "+ cMessageDatabaseService, FileChannel) - LogState (not IsNull (oRowSet), "Database "+ cMessageDatabaseService, MainFileChannel) - SetStatus (FilterType, cDBService, not IsNull (oRowSet)) + LogTestResult( cDBService, "Database "+ cMessageDatabaseService, TRUE ) End If nCurrentAction = cDBInsert @@ -105,9 +99,7 @@ Const sTestString = "Automatical Test" oRowSet.moveToCurrentRow() bResult = (oRowSet.getString(5) = sTestString) - LogState (bResult, "Database "+ cMessageDatabaseInsert, FileChannel) - LogState (bResult, "Database "+ cMessageDatabaseInsert, MainFileChannel) - SetStatus (FilterType, cDBInsert, bResult) + LogTestResult( cDBInsert, "Database "+ cMessageDatabaseInsert, bResult ) 'delete only if insert passed @@ -120,9 +112,7 @@ Const sTestString = "Automatical Test" oRowSet.next() bResult = (nRowCount - oRowSet.RowCount = 1) End If - LogState (bResult, "Database "+ cMessageDatabaseDelete, FileChannel) - LogState (bResult, "Database "+ cMessageDatabaseDelete, MainFileChannel) - SetStatus (FilterType, cDBDelete, bResult) + LogTestResult( cDBDelete, "Database "+ cMessageDatabaseDelete, bResult ) End If ' read other record @@ -131,16 +121,12 @@ Const sTestString = "Automatical Test" sCurrentMessage = cMessageDatabaseSeek oRowSet.first() bResult = not (oRowSet.getString(5) = sTestString) - LogState (bResult, "Database "+ cMessageDatabaseSeek, FileChannel) - LogState (bResult, "Database "+ cMessageDatabaseSeek, MainFileChannel) - SetStatus (FilterType, cDBSeek, bResult) + LogTestResult( cDBSeek, "Database "+ cMessageDatabaseSeek, bResult ) nCurrentAction = cDBClose sCurrentMessage = cMessageDatabaseClose oDBConnection.Dispose() - LogState (True, "Database "+ cMessageDatabaseClose, FileChannel) - LogState (True, "Database "+ cMessageDatabaseClose, MainFileChannel) - SetStatus (FilterType, cDBClose, True) + LogTestResult( cDBClose, "Database "+ cMessageDatabaseClose, True ) Print #FileChannel, "---" Close #FileChannel% @@ -148,12 +134,10 @@ Const sTestString = "Automatical Test" DBERROR: If (nCurrentAction = cLogfileFailed) then - SetStatus (FilterType, cDBOpen, False) + LogTestResult( cLogfileFailed, "", False ) Exit Sub else - LogState (False, "Database "+ sCurrentMessage, FileChannel) - LogState (False, "Database "+ sCurrentMessage, MainFileChannel) - SetStatus (FilterType, nCurrentAction, False) + LogTestResult( nCurrentAction, "Database "+ sCurrentMessage, FALSE ) Close #FileChannel% End If Exit Sub ' 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 = "Extension Service" const cMessageExtensionInstall = "Install Extension" const cMessageExtensionUninstall = "Uninstall Extension" -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 + "$_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 + "$_TestExtension&q ctx = getDefaultContext ext_mgr = ctx.getValueByName("/singletons/" + cExtensionManager) - LogState (not IsNull (ext_mgr), "Extension "+ cMessageExtensionService, FileChannel) - LogState (not IsNull (ext_mgr), "Extension "+ cMessageExtensionService, MainFileChannel) - SetStatus (FilterType, cEXTService, not IsNull (ext_mgr)) + LogTestResult( cEXTService, "Extension "+ cMessageExtensionService, not IsNull (ext_mgr) ) if (IsNull(ext_mgr)) then - Close #FileChannel% + Close #FileChannel% Exit Sub End If @@ -79,11 +77,9 @@ sImplementationNameString = cUnoSmoketestTestExtension + "$_TestExtension&q '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, "Extension "+ cMessageExtensionInstall, FileChannel) - LogState (bResult, "Extension "+ cMessageExtensionInstall, MainFileChannel) - SetStatus (FilterType, cEXTInstall, bResult) + LogTestResult( cEXTInstall, "Extension "+ cMessageExtensionInstall, bResult ) if (not bResult) then - Close #FileChannel% + Close #FileChannel% Exit Sub End If @@ -97,9 +93,7 @@ sImplementationNameString = cUnoSmoketestTestExtension + "$_TestExtension&q oTestExtension = createUnoService(cUnoSmoketestTestExtension) 'The service must not be available anymore. Therefor isNull must return true. - LogState (IsNull (oTestExtension), "Extension "+ cMessageExtensionUninstall, FileChannel) - LogState (IsNull (oTestExtension), "Extension "+ cMessageExtensionUninstall, MainFileChannel) - SetStatus (FilterType, cEXTUninstall, IsNull (oTestExtension)) + LogTestResult( cEXTUninstall, "Extension "+ cMessageExtensionUninstall, IsNull (oTestExtension) ) Print #FileChannel, "---" Close #FileChannel% @@ -107,12 +101,10 @@ sImplementationNameString = cUnoSmoketestTestExtension + "$_TestExtension&q EXTERROR: If (nCurrentAction = cLogfileFailed) then - SetStatus (FilterType, cEXTService, False) + LogTestResult( cLogfileFailed, "", False ) Exit Sub else - LogState (False, "Extension "+ sCurrentMessage, FileChannel) - LogState (False, "Extension "+ sCurrentMessage, MainFileChannel) - SetStatus (FilterType, nCurrentAction, False) + LogTestResult( nCurrentAction, "Extension "+ sCurrentMessage, False ) Close #FileChannel% End If Exit Sub ' With error |