TestModule.Stop()
While TMExecuting
WScript.Sleep(200)
Wend
Sub TestModule_OnStop(reason)
TMExecuting = False
Select Case (reason)
Case 0
MsgBox "Test module was executed completely."
Case 1
MsgBox "Test module was stopped by the user."
Case 2
MsgBox "Test module was stopped by measurement stop"
End Select
End Sub
I tried using this to stop a test module after the completion of a test module and used a WHILE loop to start second test module. But after the completion of 1st test module i am not able to start second test module. I got the reason of it when i wrote the execution steps in a text file.
TestModule.Start()
While (Not TMStarted)
WScript.Sleep(200)
LogFile.WriteLine "Test started"
wend
While (TMExecuting)
WScript.Sleep(500)
LogFile.write("Value of TMExecuting is:" & TMExecuting)
LogFile.WriteLine "CANoe test is running"
Wend
After the completion of 1st test module TMExecuting should be false which is done in
Sub TestModule_Onstop(reason)
TMExecuting = False
TMStarted = False
Select Case (reason)
Case 0
MsgBox "Test module was executed completely."
Case 1
MsgBox "Test module was stopped by the user."
Case 2
MsgBox "Test module was stopped by measurement stop"
End Select
LogFile.WriteLine " CANoe test is finished"
End Sub
But its not becoming false due to which second test module is not starting. If anyone have any solution please help. I want to run multiple test module and test environment in a single Canoe Configuration configuration using VBScript.