Log

When you run a script (.ROB file), you can choose to create a log file (the executed statements are written to the log).

Not available in WinTask Lite.

To create a log, select the Configure/Run menu and check Log.

See the Configure Run dialog for more details.

See also : LogFile statement

How to open a log

 

You can create your own XML Log file to store for example the results of your non-regression tests (not available in WinTask Lite):

Logging the results in an XML file

You can call this Sub each time you want to store a test result.

 

Sub Log(CmdLine$, Description$, Result)
'The Sub creates a new entry for each call using LogIndex to increment the entries
'The Result is logged along the CmdLine$ and Description$ content
  LogIndex = LogIndex + 1
  XMLPath$ = "TestResult\Test"

  AppendXmlNode(ResultXML$, "TestResult", "Test")

  AppendXmlNode(ResultXML$, XMLPath$+"[<index>="+str$(logindex)+"]" , "Description")
  SetXmlAttribute(ResultXML$, XMLPath$+"[<index>="+str$(logindex)+"]"+"\Description", "<text>", Description$)
  AppendXmlNode(ResultXML$, XMLPath$+"[<index>="+str$(logindex)+"]" , "Result")
  SetXmlAttribute(ResultXML$, XMLPath$+"[<index>="+str$(logindex)+"]"+ "\Result", "<text>", Str$(Result))

  AppendXmlNode(ResultXML$, XMLPath$+"[<index>="+str$(logindex)+"]", "CmdLine")

  SetXmlAttribute(ResultXML$, XMLPath$+"[<index>="+str$(logindex)+"]" + "\CmdLine", "<text>", CmdLine$)
EndSub

ResultXML$="logfile.xml"
'create the xml log file
create(resultXML$)
'create the root node
AppendXmlNode(resultxml$, "", "TestResult")
Logindex=0
'Call the Sub when needed
Log("first cmd line","first description",1)
Log("second cmd line","second description",0)

And logfile.xml contains:
 <TestResult>
 <Test>
  <Description>first description</Description>
  <Result>1</Result>
  <CmdLine>first cmd line</CmdLine>
  </Test>
 <Test>
  <Description>second description</Description>
  <Result>0</Result>
  <CmdLine>second cmd line</CmdLine>
  </Test>
  </TestResult>