Saturday, December 6, 2008

Writing Log Files

Public function generate_result()

starttime=time()
msgbox(nam)
MyArray=split(nam, ":", -1)

For i=0 to ubound(MyArray)
filename=filename+MyArray(i)
Next

Set fso=Createobject("Scripting.FileSystemObject")
Set textfile=fso.createtextfile("c:/result.txt")

textfile.Writeline("Automated Smoke Test Results")
textfile.WriteLine("````````````````````````````")
textfile.WriteBlanklines(3)
textfile.WriteLine("Run on Host : " & Environment.Value("LocalHostName"))
textfile.WriteBlanklines(1)
textfile.WriteLine("Run on Operating System : " & Environment.Value("OS"))
textfile.WriteBlanklines(1)
textfile.WriteLine("Run on : "&now)
textfile.WriteBlanklines(1)
endtime=time()
textfile.WriteLine("Test Start Time : " &starttime)
textfile.WriteLine("Test End Time : " & endtime)
textfile.WriteLine("Test Execution Time : " & datediff("s", startime, endtime)& " Seconds")

End Function

generate_result()

No comments:

About Me

My photo
Hi all,I am Arun Singh Rajaputra. I am working as a Project Lead in a reputed organization in Hyderabad, AP, India. I have little bit knowledge on Quick Test Professional and like to share my knowledge to all through this blog.

Subscribe to get updates on this blog

Enter your email address:

NOTE

Some of the posts posted in this blog are collected and most of them have been prepared by me. If any one have objections regarding any copied posts. Please mail me so that I can take a necessary action on that post.