WinTask as a Testing Tool
WinTask is a task automation tool, not a testing tool. But you can still use it for regression tests as a low-cost testing tool. We explain here the limitations of WinTask as a testing tool. WinTask Lite is not appropriate for test automation. This entire Help topic applies to WinTask Full version.
Response Time Measures
Response time functions are available (see Timer statements). Results can be saved in a .LOG file (LogFile statement) or in an Excel file (WriteExcel statement). You can also store the results in an ODBC database or in an XML file.
Response time as the user feels it, is measured (including application response time, network response time, PC hardware response time). It is not only the response time of the application under test.
You can see an example for measuring a Web load page response time at Web, how to measure response times topic.
Load Tests
Several PCs with WinTask Runtime installed can simultaneously send commands to the same application under test through WinTask scripts. WinTask Runtime is a subset of the WinTask development pack that includes only the files necessary for script execution (mainly without WinTask Editor, WinTask Compiler and WinTask Scheduler). Load testing can be done too using just one host PC with virtualized machines.
WinTask Runtime can be rented or purchased outright. Runtime pricing can be requested via email at info@wintask.com.
Regression Tests
In regression tests, WinTask simulates user behavior on the application under test, and compares actual results to expected results. Text checks, BMP checks, window properties checks, and control checks can be used for this kind of testing.
Here are some differences between WinTask and a dedicated testing tool:
Expected results are not stored within the tool; they are stored in external files or directly in the scripts. You can store results in an XML file, see the example below.
Not all the usual check functions are available, you can test check boxes, radio buttons, HTML elements using CheckedW, ExistHTMLElement, CheckedHTML . You can test if an HTML element is enabled or disabled using EnabledHTMLElement. For more complex checks, we have already written a couple of WinTask scripts and they are available at Check functions. HardCopy statement allows to take a screenshot of the window or of the entire desktop.
WinTask does not include a check difference tool (expected results compared to actual results) but there are numerous free or low-cost software covering differences analysis.
No internal test history tool is provided, but you can use for instance Visual Source Safe.
There is no link between the check result (with WinTask, it's just a text file or Excel file or XML file) and differences visualization.
A dedicated tool offer all this functionality through a database.
WinTask's advantages are its adaptability (through script programming), its ease of use (no need for costly training) and its low price.
See also Check functions
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>