I am getting the error while running the scirpts using AOM Model (54 Views)
Reply
Occasional Contributor
sureshk
Posts: 4
Registered: ‎08-26-2009
Message 1 of 4 (54 Views)

I am getting the error while running the scirpts using AOM Model

Subject: I am getting the error while running the scirpts using AOM Model

Hi All,

I have created many individual scripts. then i would like to run all the scripts at a time for that i have created the Automated object Model script and saved as Batch.VBS file. Once i click on click on the Batch.vbs file. it starts to run the scripts. But some where it is throwing error like

1. 'The Instruction at "0x41a4484c" referenced memory at "0x00000138". The memory could not be "read".,

2. 'The Instruction at "0x41a4c173" referenced memory at "0x00000060". The memory could not be "read".,

i am getting the errors as above randomly. once the error occurs browser is closing.

FYI: Individual scrips are running fine.

for more details look at attached screen shot

The AOM script as below.
Result ="Y:\ATT\USA\Results\"
LibPath="Y:\ATT\USA\Library\"
ORPath="Y:\ATT\USA\Object Repository\"
LogPath="Y:\ATT\USA\Summary Results\"
xlsPath="Y:\ATT\USA\exls\ATT_Driver.xls"

set qtApp=CreateObject("QuickTest.Application")

addinList=Array("Web")

qtApp.SetActiveAddins addinList
qtApp.Launch
qtApp.Visible=True

'global settings
qtApp.Options.Run.RunMode="Fast"
qtApp.Options.Run.ViewResults=False
qtApp.Options.Run.StepExecutionDelay=0
qtApp.Options.Run.ImageCaptureForTestResults="Never"
qtApp.Options.Run.MovieCaptureForTestResults="Never"
qtApp.Test.Settings.Launchers("Web").Active = True
qtApp.Test.Settings.Launchers("Web").Browser = "IE"
'qtApp.Test.Settings.Launchers("Web").Address = "http://attqa/"
qtApp.Test.Settings.Launchers("Web").CloseOnExit = True

Function WriteHtml(Sinput)

Set fso=CreateObject("Scripting.FileSystemObject")

Set f=fso.OpenTextFile(LogPath&"Test Summary Report.html",2,true)

message=""

message=message&"

"&"Test Summary Report"&"

"

message=message&""

message=message&""

message=message&""

message=message&""

message=message&""

message=message&""

message=message&""

message=message&Sinput

message=message&""

message=message&""

f.WriteLine message

f.close

Set f=Nothing

Set fso=Nothing

End Function


'Acess xls

set xlapp=CreateObject("Excel.Application")
set Wbook=xlapp.Workbooks.Open(xlsPath)
set Wsheet=xlapp.WorkSheets("Sheet1")

Row=Wsheet.usedrange.rows.count

for i=2 to Row
TestCaseID=Wsheet.Cells(i,1)
Exestatus=Wsheet.Cells(i,2)
Test_Path=Wsheet.cells(i,3)
User_Type=Wsheet.cells(i,4)

'do local settings

if ExeStatus="1" then
qtApp.Open Test_Path
qtApp.Test.Settings.Resources.Libraries.RemoveAll
qtApp.Test.Settings.Resources.Libraries.Add LibPath&"General Functions.vbs"
qtApp.Test.Settings.Resources.Libraries.Add LibPath&"ATT Functions.vbs"
ActionNumber=qtApp.Test.Actions.Count

for j=2 to ActionNumber
set ActionOR=qtApp.Test.Actions(j).ObjectRepositories
ActionOR.RemoveAll
ActionOR.Add ORPath&"ATT_SharedOR.tsr"
Next

Set pDefColl = qtApp.Test.ParameterDefinitions
Set rtParams = pDefColl.GetParameters() ' Retrieve the Parameters collection defined for the test.
qtApp.Test.Run,True,rtParams
result= rtParams.Item("RetVal").Value

If result=True Then
color="GREEN"
status="Pass"
else
color="RED"
status="Fail"
End If

qtApp.Test.Close

strRes=strRes&""
strRes=strRes&""
strRes=strRes&""
strRes=strRes&""
strRes=strRes&TestCaseID&"
"&status&"
"&""
strRes=strRes&""

End If

If i=Row Then
strRes=strRes&"
"&"TestCase ID"&""&"Status"&""&"Detail Result"&"
"&TestCaseID&""&status&""&""&"
"
End If

Next

WriteHtml strRes
Wbook.Close
qtApp.Quit

'fso.MoveFile Src,Dst

'Deallocate

Set objWshell=Nothing
Set fso=Nothing
Set qtApp=Nothing
Set xlapp=Nothing
Set Wbook=Nothing
set WSheet=Nothing

Please help me on this
I need solution for this urgent

Advance thanks.
Please use plain text.
Respected Contributor
Erodabasi Atacan
Posts: 588
Registered: ‎01-16-2008
Message 2 of 4 (54 Views)

Re: I am getting the error while running the scirpts using AOM Model

I'm not sure but I had an issue like this 3 year ago.

I think it was related with the end of the script.

Delete (comment out) the line "qtApp.Quit" or "qtApp.Test.Close" (or both) and run your script.

You should also be sure that one Run (process) ends before the others run starts.

regards,
A.E.



Please use plain text.
Respected Contributor
Erodabasi Atacan
Posts: 588
Registered: ‎01-16-2008
Message 3 of 4 (54 Views)

Re: I am getting the error while running the scirpts using AOM Model

Perhaps you should also configure your client correct.
Please use plain text.
Occasional Contributor
sureshk
Posts: 4
Registered: ‎08-26-2009
Message 4 of 4 (54 Views)

Re: I am getting the error while running the scirpts using AOM Model

I understood, what you are trying to say. but i am getting the error in between the script.

Ex. I am running the 30 scripts at a time. one script ran successfully and got the error in second script.

FYI: It may vary each run session. once the error came IE is closing.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation