woensdag 6 februari 2008

Adding a live progress log to your test automation

Just an example how you can implement a live progress log shown in an IExplore window. Now you can follow your test prgress live on screen!

Proof of concept.

VBScript:

------------------

Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width=400
objExplorer.Height = 200
objExplorer.Left = 0
objExplorer.Top = 0

Text = "***** Progress Log *****"

Do While (objExplorer.Busy)
Wscript.Sleep 200
Loop

objExplorer.Visible = 1
objExplorer.Document.Body.InnerHTML = Text

For i = 1 to 10
add_log_line "Logline: " & i,1
Wscript.Sleep 200
Next
add_log_line "Done!",1


Wscript.Sleep 10000
objExplorer.Quit

Public Function add_log_line(line,nl)

if nl then
Text = Text & "<BR>" & line & "<BR>"
else
Text = Text & line
end if
objExplorer.Document.Body.InnerHTML = Text

End Function


--------------------

1 opmerking:

SrinivasRadaram zei

Hi,

Good day!!!

I am sorry if l am not supposed to email you in this way.

I am Srinivas from Bangalore working as a Automation Test Engineer.

May I pls request you to let me know of testing openings in the company you are work for. I am a good learner and a good guide. I have been into training others on Automation tools. I am good at WinRunner, Oracle(SQL,PL/SQL), UNIX.

Looking forward for your reply.

Regards,
Srinivas.