Tuesday, July 8, 2008

Comparison of SilkTest and Winrunner

Last month, I have posted Comparison of SilkTest and QuickTest Professional . Then I thought to put one more comparison with Winrunner. This time I have compared in low level. It means comparing functions and file structure level. Hope it will be useful for automation newbies.

Wiki pages
Silktest on Wiki
Winrunner on Wiki

Code samples for both tools
Sample 4test code snippets for SilkTest
Sample TSL code snippets for Winrunner

References:


  1. SILKTEST AND WINRUNNER FEATURE DESCRIPTIONS - By Horwath/Green/Lawler

  2. Comparison of SilkTest and QuickTest Professional



Comparison Table: SilkTest Vs Winrunner

Features

SilkTest

WinRunner

Project fileSilktest has two types of extensions to represent projects. One is vtp file, which is usual one. Another one is stp file, which is zipped version of silktest project. <ProjectName>.ini or partner.ini has silktest settings.No project file.
Tool Configuration<ProjectName>.ini or partner.ini has silktest settings for particular project. Silktest has options set (*.opt) to configure the project level settings.Initial startup configurations are stored in wrun.ini file.
Test Environment vaiablesSetOption and GetOption methods are used to set various silktest settings. GetTestCaseName, GetTestCaseErrorCount, GetTestCaseState and GetTestCaseWarningCount functions are used to get information about testcases.setvar and getvar functions available to set or get test variables. Few options are : cs_run_delay, cs_fail, delay_msec, rec_item_name, rec_owner_drawn, searchpath, silent_mode, single_prop_check_fail, synchronization_timeout, tempdir and speed
Script RecorderOnly one mode for different activities.Record Testcase, Application State, Actions.Two modes. 1. Context sensitive mode 2. Analog mode.
Code ViewClassic 4Test, Visual 4TestOnly one view
Test ScriptScript is a single file. Extension is *.t. One script can contain many testcases.Actually Script is a folder and have set of supporting files.There will a file 'script'. That contains actual script.
  1. a db folder for asc data
  2. an exp folder for expected results.
  3. a debug folder for using during debug runs.
TestsTermed as Testcase. Each Testcase has block of coding statements.No separate terms.
Objects RepositoryOfficial term is frame file. They can be edited directly from the Editor. File extension is (*.inc). Objects are called as Window declarations. User can declare variables and functions inside frame file.Termed as GUI Map. Maintained as separate file. With the help of utility, objects can be modified. Two types as per Winrunner setting. They are 'GuiMap file per Test' and 'Global GUI Map'. File extension is same for both types as (*.gui). User can not declare variables and functions inside GUI Map file.
Physical descBased on Caption, Prior text, Index, Window ID, Location and Attribute.Wildcards can be used.Wildcards can be used.Identifying based on obligatory properties. An optional property is used only if the obligatory properties do not provideunique identification of an object. In cases where the obligatory and optional properties do not uniquely identify an object, WinRunner uses a selector. For example, if there are twoOK buttons with the same MSW_id in a single window, WinRunner would use a selector to differentiate between them. Two types of selectors are available:
  1. A location selector uses the spatial position of objects.
  2. An index selector uses a unique number to identify the object in a window.
Logical name - used to identify the objectCalled as Test Identifier. It is similar to variable. It should not have space or any other special characters. It is not similar to variable. It can have space and few special characters.
Object Representation
Based on true object hierarchy. Dynamic representation sample is given below:
Syntax: class("tag").class("tag").class("tag")
Example: MainWin("Text Editor - *").DialogBox("Find").TextField("Find What")
Based on Flat list. There will be only two levels. Top level will be window and leaf level will be child objects. Dynamic representation sample
Syntax: "{class: <class>, MSW_class: <WR class>,<property>:<propertyvalue>}"
Example: set_window("{class: window, MSW_class: html_frame,active:1}",20);
Function library Termed as Include (*.inc) file. Compile modules. Again it is similar to Test Script. Test Library/API calls use "frame.inc". You have to use in the beginning of script. Termed as Compiled module. GUI_load and GUI_open functions are used to load GUI Maps. You can call above functions anywhere from the script. You can call comipiled modules like below:
  1. reload( "C:\\MyAppFolder\\" & "flt_lib" );
  2. load( "C:\\MyAppFolder\\" & "flt_lib" );
CheckPoint Provided Verify and Verify Properties functions. Provided various check points for different purposes.
Results Reporting Results are stored into *.res binary files. It can be converted into differnt formats. Multiple versions can be stored into single file.Winrunner results are stored in separate folder for each run. Result folder contain two files:
  1. _t_rep.hdr -> Header file, which contains test run info
  2. _t_rep.eve -> results file, which contains info about each execution.
Library Browser Library Browser Function Generator
User Message Print(), Printf() functions report_msg() function.
Result Function Verify (), raise () and Reraise () functions tl_step () function
Exception Handling <do-except> block is available and few supporting functions. Winrunner does not have explicitly similar to do-except or try-catch block. But it has different wizards to handle different type of exceptions such as Pop-up exceptions, TSL exceptions, Object exceptions and Web exceptions.
Test/Error Recovery Powerful Default recovery system is set based on extension and MainWindow. It can be extended by using BaseState. Recovery Scenarios, which is available from Winrunner 7.5. Lower versions do not have this feature.
Wait statements Sleep (10) ' 10 seconds to wait Wait (10) ' 10 seconds to wait
Halt Execution temporarily Agent.DisplayMessage () - temporarily stopping execution with a message.pause() - pauses test execution and displays a message
To activate a windowMyWin.SetActive () set_window ("Shell_TrayWnd", 2);
Accessing DLLsOnly Standard DLLs. It does not support the COM/ActiveX DLLs, which are created by VB/.NET Both COM and Standard DLLs are supported. COM DLL support is available from Winrunner 7.5
Database Verification Having built-in functions to extract information from Databases through ODBC32 Interface (DSNs)Having built-in functions to extract information from Databases through ODBC32 Interface (DSNs). WinRunner also provides a visual recorder to create a Database Checkpoint used to validate the selected contents of an ODBC compliant database within a testcase.
Data functions Good Good. Having extensive support for SpreadSheet (Excel).
Scripting Language 4Test scripting language. It is a object oriented scripting language. Similar to C++ TSL - Test Script Language. It is based on the C programming language.
Data types Set of data types like integer, string and number are available. User can create their own data types also.No data types
Mostly using - Compound Data type LIST data type. ARRAY. Subscript can be integer or string.

4 comments:

SharePoint Development - Softweb Solutions said...

Thanks for the very helpful information.

Best Regards
Arpit Kothari
http://www.softwebsolutions.com

Palani Selvam said...

Welcome..

Document Comparison said...

very nice post for developers

python training said...

you made it very easy.very useful content thank you for offering such a wonderful content.very useful content for learners and professionals.best regards from rstrainings

Win runner online training
Win runner online training in hyderabad