Research Report on Feasibility Study of Building a QT Gui Testing Tool-AX Program Code Group Computer Science R & D Project (U)

Similar documents
Drupal Automated Testing: Using Behat and Gherkin

Dynamic Vulnerability Assessment

Penetration Testing of Industrial Control Systems

Laser Safety Audit and Inventory System Database

IDC Reengineering Phase 2 & 3 US Industry Standard Cost Estimate Summary

This document was prepared in conjunction with work accomplished under Contract No. DE-AC09-96SR18500 with the U. S. Department of Energy.

Building CHAOS: an Operating System for Livermore Linux Clusters

Measurement of BET Surface Area on Silica Nanosprings

Optical Blade Position Tracking System Test

Second Line of Defense Virtual Private Network Guidance for Deployed and New CAS Systems

Early Fuel Cell Market Deployments: ARRA and Combined (IAA, DLA, ARRA)

W. C. Reinig. Savannah River Laboratory E. I. du Pent de Nemours and Company Aiken, South Carolina 298o1

LLNL-TR SAVANT Status Report. Arden Dougan. November 6, 2009

WinMagic Encryption Software Installation and Configuration

Risk D&D Rapid Prototype: Scenario Documentation and Analysis Tool

This document was prepared in conjunction with work accomplished under Contract No. DE-AC09-96SR18500 with the U. S. Department of Energy.

File System-Aware Job Scheduling with Moab

Situated Usability Testing for Security Systems

A Systems Approach to HVAC Contractor Security

Asynchronous data change notification between database server and accelerator control systems

The Production Cluster Construction Checklist

Requesting Nodes, Processors, and Tasks in Moab

Time Domain Reflectometry for Evaluating Detonator Cable Assemblies in the NEP

Configuring Apple Mail for Mac OS X (Snow Leopard)

New Tools Using the Hardware Pertbrmaiihe... Monitor to Help Users Tune Programs on the Cray X-MP*

Configuring Apple Mail for Mac OS X (Mountain Lion)

Improving a Gripper End Effector

Climate-Weather Modeling Studies Using a Prototype Global Cloud-System Resolving Model

Web-based Document and Content Management with Off-the-Shelf Software

DataFoundry Data Warehousing and Integration for Scientific Data Management

Configuring Outlook 2011 for Mac with Google Mail

CASE STUDIES OF STATE SUPPORT

Patch Management Marvin Christensen /CIAC

Energy Systems Integration

Building Analytics. Managed Services. Better Building Alliance Department of Energy April 17, 2015

Configuring Outlook 2010 for Windows

Regional Field Verification Operational Results from Four Small Wind Turbines in the Pacific Northwest

GUI application set up using QT designer. Sana Siddique. Team 5

Process for Selecting Engineering Tools Applied to Selecting a SysML Tool

NEAMS Software Licensing, Release, and Distribution: Implications for FY2013 Work Package Planning

Macros in Word & Excel

IRS: Implicit Radiation Solver Version 1.0 Benchmark Runs

Configuring Outlook 2013 for Windows

Defect studies of optical materials using near-field scanning optical microscopy and spectroscopy

Molecular Dynamics Study of Void Growth and Dislocations in dynamic Fracture of FCC and BCC Metals

NREL Job Task Analysis: Crew Leader

DISCLAIMER. This document was prepared as an account of work sponsored by an agency of the United States

Configuring Outlook 2016 for Windows

Synchro-Phasor Data Conditioning and Validation Project Phase 3, Task 1. Report on

PARALLEL IMPLEMENTATION OF THE TOPAZ OPACITY CODE: ISSUES IN LOAD-BALANCING

Side-by-side Migration Guide for Snare Server v7

Proposal: Application of Agile Software Development Process in xlpr ORNL- 2012/41412 November 2012

SECURE SOFTWARE DISTRIBUTION SYSTEM

CentovaCast 3 - Broadcasting With VirtualDJ

September, Collider-Accelerator Department. Brookhaven National Laboratory P.O. Box 5000 Upton, NY www. bnl.gov

A High Performance Computing Scheduling and Resource Management Primer

Automated Transportation Management System

A New Empirical Relationship between Thrust Coefficient and Induction Factor for the Turbulent Windmill State

Elastomer Compatibility Testing of Renewable Diesel Fuels

Unicenter Patch Management

Small PV Systems Performance Evaluation at NREL's Outdoor Test Facility Using the PVUSA Power Rating Method

Cleaning of Free Machining Brass

FDA Websites - Network Marketing

CIAC. IRC on Your Dime? What You Really Need to Know About Internet Relay Chat CIAC Jerry Rayome. June, 1998

Satellite Network Laboratories

Arcade Game Maker Pedagogical Product Line: Marketing and Product Plan

Increasing the resilience and security of the United States power infrastructure

CONSULTANT REPORT. Behavior of Two Capstone 30kW Microturbines Operating in Parallel with Impedance Between Them CALIFORNIA ENERGY COMMISSION

IBM Systems Director Navigator for i5/os New Web console for i5, Fast, Easy, Ready

DOCUMENT CONTROL AND CONDUCT OF OPERATIONS. S. K. Collinsand F. L. Meltzer Idaho National EngineeringLaboratory EG&G Idaho, Inc. Idaho Falls, ld 83415

Derived Intervention Levels for Tritium Based on Food and Drug Administration Methodology Using ICRP 56 Dose Coefficients (U)

GA A22713 SOFTWARE DEVELOPMENT ON THE DIII D CONTROL AND DATA ACQUISITION COMPUTERS

Automated Software Testing by: Eli Janssen

Sample- for evaluation only. Advanced PowerPoint. TeachUcomp, Inc. A Presentation of TeachUcomp Incorporated. Copyright TeachUcomp, Inc.

Explanation of a Project and the Value of a Project Manager

MEASURING PRE-PRODUCTION APPLICATION, SYSTEM AND PERFORMANCE VOLUME STRESS TESTING WITH TEAMQUEST

WebSphere Commerce V7 Feature Pack 2

Shock Response of Diamond Crystals

Wind Forecasting stlljectives for Utility Schedule and Energy Traders

TSM Studio Server User Guide

How To Find Out If The Winds From The Oak Ridge Site Are Calm

Functional Test Automation. Leverage Automation Frameworks for Efficiencies in Software QA. Version 1.0 March 2009 WHITE PAPER

Scribe Demonstration Script Web Leads to Dynamics CRM. October 4,

How To Load Data Into An Org Database Cloud Service - Multitenant Edition

A Beginner s Guide to PowerPoint 2010

Confocal μ-xrf for 3D analysis of elements distribution in hot environmental particles

Spiel. Connect to people by sharing stories through your favorite discoveries

Non-Proprietary User Agreement No. NPUSR00xxxx SAMPLE BETWEEN

VHDL Test Bench Tutorial

RAVEN: A GUI and an Artificial Intelligence Engine in a Dynamic PRA Framework

Up to $750 (or 30% of the project cost, whichever is less), for

Automated Testing Tool

Performance Testing Web 2.0

How To Understand The Online Advertising Market In Quatar

Android Driver s App Update Version 1.89 Samsung Galaxy Tab 4

Virtual Machines as an Aid in Teaching Computer Concepts

Integrated Tools for Multifamily Green Asset Management. Energy Upgrade CA Web Portal Funding Finder Compass Portfolio Tracker Webinar May 22, 2012

App Terms and Conditions!

Logic Pro 9. TDM Guide

Isolation of Battery Chargers Integrated Into Printed Circuit Boards

Transcription:

UCRL-ID-153221 Research Report on Feasibility Study of Building a QT Gui Testing Tool-AX Program Code Group Computer Science R & D Project (U) Benjamin T. Grover May 5, 2003 U.S. Department of Energy Lawrence Livermore National Laboratory Approved for public release; further dissemination unlimited

DISCLAIMER This document was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. This work was performed under the auspices of the U. S. Department of Energy by the University of California, Lawrence Livermore National Laboratory under Contract No. W-7405-Eng-48. This report has been reproduced directly from the best available copy. Available electronically at http://www.doc.gov/bridge Available for a processing fee to U.S. Department of Energy And its contractors in paper from U.S. Department of Energy Office of Scientific and Technical Information P.O. Box 62 Oak Ridge, TN 37831-0062 Telephone: (865) 576-8401 Facsimile: (865) 576-5728 E-mail: reports@adonis.osti.gov Available for the sale to the public from U.S. Department of Commerce National Technical Information Service 5285 Port Royal Road Springfield, VA 22161 Telephone: (800) 553-6847 Facsimile: (703) 605-6900 E-mail: orders@ntis.fedworld.gov Online ordering: http://www.ntis.gov/ordering.htm OR Lawrence Livermore National Laboratory Technical Information Department s Digital Library http://www.llnl.gov/tid/library.html

Research Report on: Feasibility study of building a QT GUI testing tool, AX-Program Code Group Computer Science R&D Project Benjamin T. Grover, PMesh Project Participating Employee: Benjamin T. Grover Start Date: November 15, 2002 End Date: March 1, 2003 Background: See Appendix A, Proposal This project addressed the need for a GUI quality assurance testing tool for the PMESH project. We currently do not have any automated method for testing our GUI. Commercial GUI test tools do exist, but only one exists to test Qt. This project consisted of building an in house Qt GUI test tool and trying out the one commercial tool that tests Qt. Proposal Summary: The main goal of this project was to determine if a tool could be built to test Qt. In determining the feasibility of building a tool the following requirements needed to be researched: 1. Determine if the underlying Qt signal/slot architecture could be leveraged. 2. Research how much impact implementing such a tool would have on existing code, i.e. how much extra code would need to be inserted to use the tool. 3. Determine with the above information if a tool could be built. With the above steps completed, the information needed to make a decision on building a tool could be made. Armed with this information I felt I could make a more educated decision on the possibility of building a tool. Project Overview: This project was divided into two main steps. The first step was to understand the underlying Qt source code much better. The second step was to build a small prototype that I could use to test ideas. The first step was actually much shorter than I had originally anticipated. Understanding the underlying architecture of Qt only took about two weeks. After studying the architecture of qt and working with the support people at Trolltech, the company that develops Qt, I found a way to test Qt. In my proposal I figured I could use the signal/slot architecture of Qt to test the GUI, but I found that I could only directly use the slots. The signals in Qt are protected methods of the class that they reside in. This meant that if I could manage to find out what signals were being used for a given event, such as a button press, I still could not re-emit that

signal. After hitting this roadblock I found a way to monitor all events that were happening in Qt via an event filter. This filter enabled me to play big brother and watch everything that was going on in the GUI. Events are stand alone objects and can be emitted without any ownership violations. In fact re-emitting events was a better idea than using signals, because an event is really the point of entry from the underlying window manager to Qt. When Qt receives an event from the underlying system it emits a signal. With this capability and information I was ready to build a prototype. The prototype I built consisted of a small application that would print items out to standard output upon the press of a button. The prototype also had an object window that would allow me to see the events as they happened as well as give me the ability to replay events and save the events to a file. This prototype allowed me to take an even deeper look into what was going on in Qt. The prototype did not have all the functionality needed for a full scale tool such as full automation, but it did give enough information to realize that building a tool would be feasible. My days of research usually consisted of trying to get the test application to do things in many different ways, and then see if I could re-create the same events I had just executed. In some cases it could, in other cases I found out things I had overlooked or did not understand. I would then remedy those cases and move on and try something new. In the middle of testing my prototype (January 2003) I heard of a newly released tool called KDRunner. KDRunner is made by Klarälvdalens Datakonsult in Sweden. KDRunner basically did the same thing that I had set out to do: test Qt effectively. Since this was a feasibility study, part of the study was to find other tools that may work, instead of building my own. I downloaded and tested an evaluation version of the tool. The tool worked relatively well, but was no better than the tool I had already developed. In fact it wasn t able to recreate some events that my tool could. I decided to stick with the tool I was working on. KDRunner may improve as it gets more users and matures a little, but I felt more comfortable using the tool I had developed, and I felt that my tool could test better then KDRunner. Since I was able to make a lot more progress on this tool than I had originally anticipated, as a last test I hooked up the prototype to the mesh generation tool Draco. I wanted to see if I could actually use this tool for what it was intended for. After working out a few glitches it was able to replay multiple scripts to Draco. Project Summary: This project was very successful. I accomplished everything I intended to do. I learned and understood the inner workings of the Qt library enough that I could build a simple tool that could leverage some of the information in Qt to test the GUI. I was also able to find a tool that was commercially available to test Qt GUI s. These two things were the main goals of this project. Therefore I consider it a success. In fact I was able to progress farther with my prototype testing then I had originally planned. Future Work:

There is still much to be done to have an effective testing tool for Qt GUI s. Below is a list of tasks that still need to be accomplished: Build on the prototype testing tool to make it more robust, user friendly and functional. The prototype currently records some actions such as mouse coordinates. This is not desirable. The final product should record user intentions that are carried out via mouse movements. Along this same line the developer should be able to enhance the tester for special widgets so it can record the correct behavior. Build into the code the ability for the developer to carry out pre and post conditions tests as they test the GUI. {Partly Done} Look into making the output script a little more readable. Currently, the script is tab delimited text. This can be hard to read. References: www.trolltech.com www.klaralvdalens-datakonsult.se

Appendix A: Proposal Proposal to look into the feasibility of building a Qt GUI testing tool Benjamin T. Grover, PMesh Project Background: Graphical user interface (GUI) software testing is an inherently complex problem. On the website http://www.csst-technologies.com/genericgraphical_user_interface_testing.html some of the problems of GUI testing are outlined. Some problems are: 1.GUI's are an event driven environment, meaning any number of event sequences can happen depending on what the user desires, there is usually no one logical flow of events. 2.GUI's have multiple input media. The mouse and keyboard can be used either independently or together. 3.GUI's are usually built to function on multiple platforms. These allows simpler software development, but each system handles events differently. Consequently each system may open windows in different areas of the screen compared to another system. While I was in college I worked as a software tester at Novell. I was hired to test the functionality of our GUI's that were in use at Novell. I manually tired to test every facet of the GUI by using a set of written test cases. I had to open dialogues, press buttons, resize windows and do many other things to make sure our GUI worked correctly. The only alternative that I know of to testing a GUI is to get an automated tool that records a tester's keystrokes and mouse movements. These type of programs work OK if nothing new is added to the layout of the GUI, or new functionality is not added. If anything changes on the GUI the mouse movements and keystrokes must be rerecorded. It is an inefficient process at best. In order to solve the cross platform (linux, aix4, solaris, etc.) development problem that we face here at the lab my group (Pmesh) uses the Qt software library to develop and build our GUI. Qt is simple to use, it is open source, and is written in C++. For these reasons Qt is a popular tool both inside and outside the Lab. Some other groups that us Qt: VisIt project in B division, and it is being considered by the Arachne project in A division. Qt uses a signal and slot architecture to run the GUI. Basically this means that when an event happens, e.g. Button press, menu item selected, etc., a signal is sent. This signal is received by a slot which executes commands when it receives the correct signal. This signal/slot architecture can be utilized to test the GUI.

Proposal: I would like to look into the feasibility of creating an automated testing tool for Qt. This is not a proposal to create the tool, but instead a proposal to spend time getting all the information and ideas I need to write a proposal asking permission to actually build this testing tool. Some questions I will answer as I gather information and do research: 1.Do any good testing tools already exist? I have already looked around quite a bit on the internet and have found some tools out there but they mostly record keystrokes and mouse movements. I have not been able to find any good testing tools that leverage Qt's signal and slot architecture. I do know there is interest in this though, because I have seen many message threads talking about building a good testing tool for Qt. There are some tools out there that are very similar to what I would like to build for Qt but they use the Motif library, not Qt. 2.How can the testing tool be built, so the developer doesn't need to test each GUI manually? In this case I have a plan to leverage the signal and slot information inherent in Qt. I hope to eventually make a tool, that captures all the signals for a given dialogue and fires the signals and checks to make sure all the slots execute correctly. The signals will be recorded in a script that can be run. I hope that this program requires very little developer time, i.e. they can down load it and link it with their program and it basically does the rest. Importance to the Code Group: This project if it succeeds, will be very helpful to the code group as well as anybody else that uses the Qt libraries. It will address the need of being able to test all aspects of the GUI in an automatic way. This will insure a higher quality software product as well as free up developer time to do more important tasks. Involvement: I will mostly be involved in doing this research. I will also collaborate with some of my colleagues at the lab as well as some at Sandia National Labs. Time: This research will take one quarter, probably 2 hours a day. Milestones: 1.Find the information I need about the underlying Qt framework specifically the signal and slot information. 2.Determine if the signal and slot information can be extracted easily from the code being tested.

3.Determine if a lot of new code will need to be inserted into the existing code to extract the signal/slot information. 4.Determine if the GUI could be tested well with the signal slot information found. 5.Decide on the feasibility of submitting another proposal to build an actual testing tool. Reference: www.trolltech.com (Qt web page)

University of California Lawrence Livermore National Laboratory Technical Information Department Livermore, CA 94551