{"id":3168,"date":"2020-06-26T08:46:10","date_gmt":"2020-06-26T07:46:10","guid":{"rendered":"https:\/\/www.brainbox.consulting\/?p=3168"},"modified":"2020-06-26T08:53:55","modified_gmt":"2020-06-26T07:53:55","slug":"desktop-application-automation-using-squish","status":"publish","type":"post","link":"https:\/\/brainbox.consulting\/talent\/desktop-application-automation-using-squish\/","title":{"rendered":"Desktop Application Automation using Squish"},"content":{"rendered":"<h2><span style=\"color: #000000;\"><strong>Introduction<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">Desktop application is an application that runs stand-alone in a desktop or laptop computer.\u00a0Unlike web applications, desktop apps require sufficient hardware resources to function.\u00a0They are more difficult to control due to the fact that certain apps are developed for certain environments and configurations. Today there are different tools in the market that will help achieve test automation of Desktop Applications like Squish, Ranorex, Sikuli, Autoit etc.<\/span><\/p>\n<p><span style=\"color: #000000;\">In this article, we will see about how the tool Squish can assist in achieving test automation of desktop applications.<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>About Desktop Application Testing<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">Desktop applications\u00a0are full-function programs that work independently from other applications and require an operator. For proper functional work, there are required sufficient hardware resources, an application and a set of functions to work with the application. Desktop application testing is complicated by the fact that in most cases desktop applications are developed for a certain environment, and therefore the interaction with other parameters of the environment is reduced to zero. One can test the complete application broadly in categories like Graphical User Interface, Functionality, Load, \u00a0etc. A desktop application is usually used by a single user at a time. Major concern while testing a desktop Application is to test the app on different hardware as well as on different Operating Systems.<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>About Squish<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">Squish is a commercial cross-platform GUI test automation tool. Starting with automation of apps based on the popular cross-platform\u00a0GUI\u00a0framework\u00a0Qt, Squish has come a long way to include testing of mobile apps to its list of supported technologies.<\/span><\/p>\n<h4><span style=\"color: #000000;\"><strong>The list of supported technologies<\/strong><\/span><\/h4>\n<p><span style=\"color: #000000;\">Some of the technologies supported by Squish are:<\/span><\/p>\n<table style=\"height: 362px;\" width=\"987\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\" width=\"301\"><strong>Type of Application<\/strong><\/td>\n<td style=\"text-align: center;\" width=\"301\"><span style=\"color: #000000;\"><strong>Platform<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><span style=\"color: #000000;\">Qt, QML\/Quick<\/span><\/td>\n<td width=\"301\"><span style=\"color: #000000;\">Windows, Mac OS X, Linux<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><span style=\"color: #000000;\">Java applications based on AWT, SWT and RCP Java applications<\/span><\/td>\n<td width=\"301\"><span style=\"color: #000000;\">Windows, Mac OS X, Linux<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><span style=\"color: #000000;\">Web applications based on HTML and Ajax<\/span><\/td>\n<td width=\"301\"><span style=\"color: #000000;\">Windows, Linux, and Mac OS<\/span><\/p>\n<p><span style=\"color: #000000;\">IE, Firefox, Safari, Chrome, and Opera<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><span style=\"color: #000000;\">Cocoa and Carbon<\/span><\/td>\n<td width=\"301\"><span style=\"color: #000000;\">Mac OS X<\/span><\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><span style=\"color: #000000;\">MFC, Visual Basic, .NET Windows Forms, WPF, FoxPro, PowerBuilder etc<\/span><\/td>\n<td width=\"301\"><span style=\"color: #000000;\">Windows<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\" width=\"301\"><span style=\"color: #000000;\">Xview<\/span><\/td>\n<td style=\"text-align: left;\" width=\"301\"><span style=\"color: #000000;\">Linux &amp; Solaris<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span style=\"color: #000000;\"><strong>Features of Squish Tool<\/strong><\/span><\/h2>\n<ul>\n<li><span style=\"color: #000000;\"><strong>Script-less Test Case Creation<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">The test cases can be recorded, and the scripts are generated automatically in the language chosen by the end user.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>A Volume of Verification Features<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">Squish\u2019s Spy and Object Inspector tools make it easy to create verification points. Verification of all properties of UI elements including data type is possible with Squish.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>Remote and Parallel Test Scheduling<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">The Squish architecture supplies support for parallel and distributed test case execution even from a single test script hosted on a remote machine.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>Reusable Test Cases<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">To ensure re-usability of test cases, Squish provides support for separation of test data from the test cases. Table formats such as CSV, TSV and scripting support for SQL database access is also available.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>Logging<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">The standard log format is XML, but the logs can also be collected in HTML, XLS, ASCII format.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>Test Management Support<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">Squish GUI Automation tools are tightly integrated with Squish Central BETA, a cross-platform, end-to-end Test Automation Management Solution which helps manage and control all aspects of automated tests.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>Easy Integration<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">Squish also supports easy integration with third party management systems and environments like HP Quality Center\/HP ALM Integration etc.<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>Features that set Squish apart from the rest for Desktop Application Automation<\/strong><\/span><\/h2>\n<ul>\n<li><span style=\"color: #000000;\"><strong>Cross Platform Tool<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">Squish is available on Windows, Mac, Unix, Linux.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>Several<\/strong><strong> Scripting Languages are Supported<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">Squish supports five scripting languages namely JavaScript, Perl, Python, Tcl and Ruby. Users can choose the one with which they are most comfortable with giving them a lot of flexibility.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>Source Code Shipped <\/strong><strong>with<\/strong><strong> The Tool Provides Extensibility<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">Squish ships the source code of the tool along with the license. It has another major advantage for the users of Squish, they get the flexibility configure Squish at compile time to suit the requirements of AUT and extend Squish if required to provide support for custom objects or services.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>Architecture<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">Squish is divided into two parts, a runner, and a server. This provides a solid foundation for parallel and distributed execution of test cases remotely even through a single test script.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>Recording of <\/strong><strong>High-Level<\/strong><strong> Actions for Increased Understand-ability<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">Squish records high level actions such as menu item activation, instead of low-level events such as mouse clicks, making the scripts more readable and robust to changes. This will make Test scripts for desktop applications robust.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>Object Based Recording<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">Squish used Object based recording and maintains Object maps that links symbolic name of the object with its real name in the AUT. So even if the object name changes the test scripts need not be modified, only the object map needs to be updated.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>Hybrid Application Testing Support<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">Desktop applications that embed web content is an few such example of hybrid applications that can be tested using Squish.<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>Usecase<\/strong><\/span><\/h2>\n<h4><span style=\"color: #000000;\"><strong>Introduction<\/strong><\/span><\/h4>\n<p><span style=\"color: #000000;\">The product under test was a high-end tracking suite that gives intuitive interaction in virtual reality for Motion Capture and VR. Brainbox played a major role in automating application to meet the customer needs.<\/span><\/p>\n<h4><span style=\"color: #000000;\"><strong>Criteria<\/strong><\/span><\/h4>\n<ul>\n<li><span style=\"color: #000000;\">Desktop Application\u200b.<\/span><\/li>\n<li><span style=\"color: #000000;\">Support both Windows and Linux OS.<\/span><\/li>\n<\/ul>\n<h4><span style=\"color: #000000;\"><strong>Scope<\/strong><\/span><\/h4>\n<ul>\n<li><span style=\"color: #000000;\">3D hand viewer for inspecting your virtual hands.<\/span><\/li>\n<li><span style=\"color: #000000;\">To provide a quick and uncomplicated calibration procedure.<\/span><\/li>\n<li><span style=\"color: #000000;\">To ensure working of gloves that rotate in 360 degree.<\/span><\/li>\n<li><span style=\"color: #000000;\">Track the movement of the gloves.<\/span><\/li>\n<\/ul>\n<h4><span style=\"color: #000000;\"><strong>Scenarios Automated<\/strong><\/span><\/h4>\n<ol>\n<li><span style=\"color: #000000;\">Launch the application and verify<\/span><\/li>\n<\/ol>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><span style=\"color: #000000;\">Glove is selected<\/span><\/li>\n<li><span style=\"color: #000000;\">Device Id.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ol start=\"2\">\n<li><span style=\"color: #000000;\">Launch and set up gloves to verify<\/span><\/li>\n<\/ol>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><span style=\"color: #000000;\">Different finger modes.<\/span><\/li>\n<li><span style=\"color: #000000;\">Signal battery level.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ol start=\"3\">\n<li><span style=\"color: #000000;\">Change the language of the application in settings.<\/span><\/li>\n<li><span style=\"color: #000000;\">Verify hand movement using the X,Y co-ordinates and mouse drag operations.<\/span><\/li>\n<\/ol>\n<h4><span style=\"color: #000000;\"><strong>Testing framework<\/strong><\/span><\/h4>\n<p><span style=\"color: #000000;\">The GUI test automation framework is built as a foundation of a test automation project. It gives the testing framework a clear organizational structure which helps the tester to create new test cases and modify the existing test cases easily and quickly. The testing framework is normally built based on a testing solution, for example a behaviour driven development framework is built for this product testing. We have also used python as programming language.<\/span><\/p>\n<p><span style=\"color: #000000;\">The following figure shows the structure of the testing framework used for this project.<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-3178 aligncenter\" src=\"https:\/\/www.brainbox.consulting\/talent\/wp-content\/uploads\/2020\/06\/framework_diagram-300x139.png\" alt=\"\" width=\"653\" height=\"303\" srcset=\"https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/06\/framework_diagram-300x139.png 300w, https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/06\/framework_diagram-1024x475.png 1024w, https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/06\/framework_diagram-768x356.png 768w, https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/06\/framework_diagram.png 1225w\" sizes=\"(max-width: 653px) 100vw, 653px\" \/>\u00a0<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">The framework contained the following layers,<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Object Repository<\/span><\/li>\n<li><span style=\"color: #000000;\">Common Libraries<\/span><\/li>\n<li><span style=\"color: #000000;\">Test Configuration<\/span><\/li>\n<li><span style=\"color: #000000;\">Business Layer<\/span><\/li>\n<li><span style=\"color: #000000;\">Global Scripts<\/span><\/li>\n<li><span style=\"color: #000000;\">Test Libraries<\/span><\/li>\n<li><span style=\"color: #000000;\">Test Results<\/span><\/li>\n<\/ul>\n<h2><span style=\"color: #000000;\"><strong>Advantages of Squish<\/strong><\/span><\/h2>\n<ul>\n<li><span style=\"color: #000000;\">Supports testing of majority of application that are developed on varieties of technologies.<\/span><\/li>\n<li><span style=\"color: #000000;\">Supports different operating systems (Windows, Linux, Mac).<\/span><\/li>\n<li><span style=\"color: #000000;\">Supports multiple scripting languages..<\/span><\/li>\n<li><span style=\"color: #000000;\">Provides powerful IDE (Debug, Object Spy, Object Repository Management\u00a0).<\/span><\/li>\n<li><span style=\"color: #000000;\">Supports BDD \u2013 Behaviour-Driven Development &amp; Testing.<\/span><\/li>\n<\/ul>\n<h2><span style=\"color: #000000;\"><strong>Disadvantages of Squish<\/strong><\/span><\/h2>\n<ul>\n<li><span style=\"color: #000000;\">It is a licensed tool not an open source tool.<\/span><\/li>\n<li><span style=\"color: #000000;\">Renaming of symbolic component names is very laborious, manual interaction necessary.<\/span><\/li>\n<li><span style=\"color: #000000;\">Limited IntelliSense support.<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\">Contact us at <a style=\"color: #000000;\" href=\"mailto:sales@brainbox.consulting\">sales@brainbox.consulting<\/a> for more information and we would be happy to assist you with testing related services.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Desktop application is an application that runs stand-alone in a desktop or laptop computer.\u00a0Unlike web applications, desktop apps require&#8230;<\/p>\n","protected":false},"author":7,"featured_media":1907,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false},"categories":[23],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/posts\/3168"}],"collection":[{"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/comments?post=3168"}],"version-history":[{"count":28,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/posts\/3168\/revisions"}],"predecessor-version":[{"id":3204,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/posts\/3168\/revisions\/3204"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/media\/1907"}],"wp:attachment":[{"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/media?parent=3168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/categories?post=3168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/tags?post=3168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}