Graphical user interface testing

In software engineering, graphical user interface testing is the process of testing a product's graphical user interface (GUI) to ensure it meets its specifications. This is normally done through the use of a variety of test cases.

Test case generation

To generate a set of test cases, test designers attempt to cover all the functionality of the system and fully exercise the GUI itself. The difficulty in accomplishing this task is twofold: to deal with domain size and sequences. In addition, the tester faces more difficulty when they have to do regression testing.

Unlike a CLI (command-line interface) system, a GUI may have additional operations that need to be tested. A relatively small program such as Microsoft WordPad has 325 possible GUI operations.[1] In a large program, the number of operations can easily be an order of magnitude larger.

The second problem is the sequencing problem. Some functionality of the system may only be accomplished with a sequence of GUI events. For example, to open a file a user may first have to click on the File Menu, then select the Open operation, use a dialog box to specify the file name, and focus the application on the newly opened window. Increasing the number of possible operations increases the sequencing problem exponentially. This can become a serious issue when the tester is creating test cases manually.

Regression testing is often a challenge with GUIs as well. A GUI may change significantly, even though the underlying application does not. A test designed to follow a certain path through the GUI may then fail since a button, menu item, or dialog may have changed location or appearance.

These issues have driven the GUI testing problem domain towards automation. Many different techniques have been proposed to automatically generate test suites that are complete and that simulate user behavior.

Most of the testing techniques attempt to build on those previously used to test CLI programs, but these can have scaling problems when applied to GUIs. For example, finite-state-machine-based modeling[2][3] – where a system is modeled as a finite-state machine and a program is used to generate test cases that exercise all states – can work well on a system that has a limited number of states but may become overly complex and unwieldy for a GUI (see also model-based testing).

Planning and artificial intelligence

A novel approach to test suite generation, adapted from a CLI technique[4] involves using a planning system.[5] Planning is a well-studied technique from the artificial intelligence (AI) domain that attempts to solve problems that involve four parameters:

  • an initial state,
  • a goal state,
  • a set of operators, and
  • a set of objects to operate on.

Planning systems

Planning systems determine a path from the initial state to the goal state by using the operators. As a simple example of a planning problem, given two words and a single operation which replaces a single letter in a word with another, the goal might be to change one word into another.

In[1] the authors used the planner IPP[6] to demonstrate this technique. The system's UI is first analyzed to determine the possible operations. These become the operators used in the planning problem. Next an initial system state is determined, and a goal state is specified that the tester feels would allow exercising of the system. The planning system determines a path from the initial state to the goal state, which becomes the test plan.

Using a planner to generate the test cases has some specific advantages over manual generation. A planning system, by its very nature, generates solutions to planning problems in a way that is very beneficial to the tester:

  1. The plans are always valid. The output of the system is either a valid and correct plan that uses the operators to attain the goal state or no plan at all. This is beneficial because much time can be wasted when manually creating a test suite due to invalid test cases that the tester thought would work but did not.
  2. A planning system pays attention to order. Often to test a certain function, the test case must be complex and follow a path through the GUI where the operations are performed in a specific order. When done manually, this can lead to errors and also can be quite difficult and time-consuming to do.
  3. Finally, and most importantly, a planning system is goal oriented. The tester is focusing test suite generation on what is most important, testing the functionality of the system.

When manually creating a test suite, the tester is more focused on how to test a function (i. e. the specific path through the GUI). By using a planning system, the path is taken care of and the tester can focus on what function to test. An additional benefit of this is that a planning system is not restricted in any way when generating the path and may often find a path that was never anticipated by the tester. This problem is a very important one to combat.[7]

Genetic algorithms

Another method of generating GUI test cases simulates a novice user. An expert user of a system tends to follow a direct and predictable path through a GUI, whereas a novice user would follow a more random path. A novice user is then likely to explore more possible states of the GUI than an expert.

The difficulty lies in generating test suites that simulate 'novice' system usage. Using genetic algorithms have been proposed to solve this problem.[7] Novice paths through the system are not random paths. First, a novice user will learn over time and generally would not make the same mistakes repeatedly, and, secondly, a novice user is following a plan and probably has some domain or system knowledge.

Genetic algorithms work as follows: a set of 'genes' are created randomly and then are subjected to some task. The genes that complete the task best are kept and the ones that do not are discarded. The process is again repeated with the surviving genes being replicated and the rest of the set filled in with more random genes. Eventually one gene (or a small set of genes if there is some threshold set) will be the only gene in the set and is naturally the best fit for the given problem.

In the case of GUI testing, the method works as follows. Each gene is essentially a list of random integer values of some fixed length. Each of these genes represents a path through the GUI. For example, for a given tree of widgets, the first value in the gene (each value is called an allele) would select the widget to operate on, the following alleles would then fill in input to the widget depending on the number of possible inputs to the widget (for example a pull down list box would have one input...the selected list value). The success of the genes are scored by a criterion that rewards the best 'novice' behavior.

X Window

A system to do this testing for the X window system, but extensible to any windowing system is described in.[7] The X Window system provides functionality (via XServer and the editors' protocol) to dynamically send GUI input to and get GUI output from the program without directly using the GUI. For example, one can call XSendEvent() to simulate a click on a pull-down menu, and so forth. This system allows researchers to automate the gene creation and testing so for any given application under test, a set of novice user test cases can be created.

Running the test cases

At first the strategies were migrated and adapted from the CLI testing strategies.

Mouse position capture

A popular method used in the CLI environment is capture/playback. Capture playback is a system where the system screen is "captured" as a bitmapped graphic at various times during system testing. This capturing allowed the tester to "play back" the testing process and compare the screens at the output phase of the test with expected screens. This validation could be automated since the screens would be identical if the case passed and different if the case failed.

Using capture/playback worked quite well in the CLI world but there are significant problems when one tries to implement it on a GUI-based system.[8] The most obvious problem one finds is that the screen in a GUI system may look different while the state of the underlying system is the same, making automated validation extremely difficult. This is because a GUI allows graphical objects to vary in appearance and placement on the screen. Fonts may be different, window colors or sizes may vary but the system output is basically the same. This would be obvious to a user, but not obvious to an automated validation system.

Event capture

To combat this and other problems, testers have gone 'under the hood' and collected GUI interaction data from the underlying windowing system.[9] By capturing the window 'events' into logs the interactions with the system are now in a format that is decoupled from the appearance of the GUI. Now, only the event streams are captured. There is some filtering of the event streams necessary since the streams of events are usually very detailed and most events are not directly relevant to the problem. This approach can be made easier by using an MVC architecture for example and making the view (i. e. the GUI here) as simple as possible while the model and the controller hold all the logic. Another approach is to use the software's built-in assistive technology, to use an HTML interface or a three-tier architecture that makes it also possible to better separate the user interface from the rest of the application.

Another way to run tests on a GUI is to build a driver into the GUI so that commands or events can be sent to the software from another program.[7] This method of directly sending events to and receiving events from a system is highly desirable when testing, since the input and output testing can be fully automated and user error is eliminated.

See also

References

  1. ^ a b Atif M. Memon, Martha E. Pollack and Mary Lou Soffa. Using a Goal-driven Approach to Generate Test Cases for GUIs. ICSE '99 Proceedings of the 21st international conference on Software engineering.
  2. ^ J.M. Clarke. Automated test generation from a Behavioral Model. In Proceedings of Pacific Northwest Software Quality Conference. IEEE Press, May 1998.
  3. ^ S. Esmelioglu and L. Apfelbaum. Automated Test generation, execution and reporting. In Proceedings of Pacific Northwest Software Quality Conference. IEEE Press, October 1997.
  4. ^ A. Howe, A. von Mayrhauser and R. T. Mraz. Test case generation as an AI planning problem. Automated Software Engineering, 4:77-106, 1997.
  5. ^ Atif M. Memon, Martha E. Pollack, and Mary Lou Soffa. Hierarchical GUI Test Case Generation Using Automated Planning. IEEE Trans. Softw. Eng., vol. 27, no. 2, 2001, pp. 144-155, IEEE Press.
  6. ^ J. Koehler, B. Nebel, J. Hoffman and Y. Dimopoulos. Extending planning graphs to an ADL subset. Lecture Notes in Computer Science, 1348:273, 1997.
  7. ^ a b c d D. J. Kasik and H. G. George. Toward automatic generation of novice user test scripts. In M. J. Tauber, V. Bellotti, R. Jeffries, J. D. Mackinlay, and J. Nielsen, editors, Proceedings of the Conference on Human Factors in Computing Systems: Common Ground, pages 244-251, New York, 13–18 April 1996, ACM Press. [1]
  8. ^ L.R. Kepple. The black art of GUI testing. Dr. Dobb’s Journal of Software Tools, 19(2):40, Feb. 1994.
  9. ^ M. L. Hammontree, J. J. Hendrickson and B. W. Hensley. Integrated data capture and analysis tools for research and testing on graphical user interfaces. In P. Bauersfeld, J. Bennett and G. Lynch, editors, Proceedings of the Conference on Human Factors in Computing System, pages 431-432, New York, NY, USA, May 1992. ACM Press.

Read other articles:

Grafik solusi Masalah Melintasi Sungai Suami-suami Pencemburu. Masalah misionaris dan kanibal dan masalah suami-suami pencemburu adalah masalah melintasi sungai klasik.[1] Masalah misionaris dan kanibal adalah sebuah permainan masalah terkenal dalam kecerdasan buatan, dimana masalah tersebut dipakai oleh Saul Amarel sebagai contoh representasi masalah.[2][3] Masalah Dalam masalah misionaris dan kanibal, tiga misionaris dan tiga kanibal harus melintasi sebuah sungai mem...

 

Nigerian Politician HonourableBabajimi Adegoke BensonMember of the House of Representatives of Nigeria for Ikorodu constituencyIncumbentAssumed office June 2023 Personal detailsBorn (1972-03-30) March 30, 1972 (age 51)Ikorodu, Lagos StateNationalityNigerianPolitical partyAll Progressives Congress (Nigeria) (APC)OccupationPoliticianWebsitehttps://jimibenson.com/ Babajimi Adegoke Benson[1] is a Nigerian politician and member of the House of Representatives of Nigeria representi...

 

Pour les articles homonymes, voir Lus (homonymie). Lus-la-Croix-Haute Hôtel de ville de Lus-la-Croix-Haute. Administration Pays France Région Auvergne-Rhône-Alpes Département Drôme Arrondissement Die Intercommunalité Communauté de communes du Diois Maire Mandat Laurent Bernard 2020-2026 Code postal 26620 Code commune 26168 Démographie Gentilé Lussois, Lussoises Populationmunicipale 526 hab. (2021 ) Densité 6 hab./km2 Géographie Coordonnées 44° 39′ 59″...

2013 single by John Legend All of MeSingle by John Legendfrom the album Love in the Future B-sideMade to LoveReleasedAugust 12, 2013Recorded2013GenreR&BsoulpopLength4:30 (album version)2:57 (radio edit)LabelGOODColumbiaSongwriter(s)John StephensToby GadProducer(s)Dave TozerJohn LegendJohn Legend singles chronology Made to Love (2013) All of Me (2013) You & I (Nobody in the World) (2014) Music videoAll of Me on YouTube All of Me is a song by American singer John Legend from his fourth ...

 

Village in Estonia This article is about the village. For the ferry, see MS Varbola. Village in Rapla County, EstoniaVarbolaVillageRuins of Varbola Stronghold.Country EstoniaCountyRapla CountyParishMärjamaa ParishTime zoneUTC+2 (EET) • Summer (DST)UTC+3 (EEST) Varbola is a village in Märjamaa Parish, Rapla County, in western Estonia.[1] See also Varbola Stronghold References ^ Classification of Estonian administrative units and settlements 2014[dead link] (r...

 

Marwan Jameel Essa al-Muasher Wakil Perdana MenteriMasa jabatan3 Juli 2005 – 24 November 2005 Informasi pribadiLahir1956 (umur 67–68)Amman, YordaniaSunting kotak info • L • B Marwan al-Muasher (Arab: مروان المعشر) (kelahiran 1956) adalah seorang diplomat dan politikus Yordania yang menjadi menteri luar negeri Yordania dari 2002 sampai 2004 dan wakil perdana menteri pada 2004 dan 2005. Ia kini menjabat sebagai wakil presiden untuk kajian di Ca...

Míriam ColónColón pada tahun 1962LahirMíriam Colón Valle(1936-08-20)20 Agustus 1936Ponce, Puerto RikoMeninggal3 Maret 2017(2017-03-03) (umur 80)Albuquerque, New Mexico, Amerika SerikatSebab meninggalKomplikasi paru-paruPekerjaanAktrisTahun aktif1953–2015Suami/istriFred Valle Míriam Colón (20 Agustus 1936 – 3 Maret 2017) adalah aktris asal Puerto Rico dan juga pendiri dan sutradara Puerto Rican Traveling Theater di Kota New York. Filmografi Audio luar Y...

 

Legal guidance on right to roam in Scotland Logo used for the Scottish Outdoor Access Code. The Scottish Outdoor Access Code provides detailed guidance on the exercise of the ancient tradition of universal access to land in Scotland, which was formally codified by the Land Reform (Scotland) Act 2003. Under Scots law everyone has the right to be on most land and inland water for recreation, education and going from place to place providing they act responsibly.[1] The basis of access r...

 

Ford Sierra Ford Sierra Datos generalesOtros nombres Ford MerkurFabricante Ford Motor CompanyDiseñador Uwe BahnsenRobert LutzPatrick Le'QuementFábricas Colonia, Alemania General Pacheco, Argentina Genk, Bélgica Dagenham, Inglaterra Lower Hutt, Nueva Zelanda Pretoria, Sudáfrica Valencia, VenezuelaPeríodo 1982-1994ConfiguraciónTipo Automóvil de turismoSegmento Segmento DCarrocerías Liftback tres puertas y cinco puertasFamiliar/Rural cinco puertasConfiguración Motor delantero / propulsi...

Trulek jawa Status konservasi Kritis, kemungkinan punah  (IUCN 3.1) Klasifikasi ilmiah Kerajaan: Animalia Filum: Chordata Kelas: Aves Ordo: Charadriiformes Famili: Charadriidae Genus: Vanellus Spesies: V. macropterus Nama binomial Vanellus macropterus(Wagler, 1827) Sinonim Charadrius macropterus Wagler, 1827 Rogibyx macropterus (Wagler, 1827) Trulek jawa (Vanellus macropterus) adalah salah satu burung langka yang hanya terdapat (endemik) di Jawa. Burung dari suku Charadriidae ini p...

 

Questa voce sugli argomenti unità militari e Stati Uniti d'America è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Segui i suggerimenti dei progetti di riferimento 1, 2. U.S. Army Corps of Engineers Descrizione generaleAttiva15 giugno 1775 - presente NazioneStati Uniti d'America ServizioUnited States Army Dimensione34.600 civili e 650 militari membri MottoEssayons Sito internetwww.USACE.Army.mil ComandantiComandante attualeThomas P. Bostick...

 

هذه المقالة تحتاج للمزيد من الوصلات للمقالات الأخرى للمساعدة في ترابط مقالات الموسوعة. فضلًا ساعد في تحسين هذه المقالة بإضافة وصلات إلى المقالات المتعلقة بها الموجودة في النص الحالي. (أغسطس 2019) منتخب هونغ كونغ للريشة الطائرة تعديل مصدري - تعديل   منتخب هونغ كونغ لتنس الر�...

Stadium in Rio de Janeiro, Brazil Carioca Arena 2Arena Carioca 2Aerial view of the Carioca complex at Barra Olympic Park in May 2016; Arena 2 is visible at centerLocationBarra Olympic ParkBarra da Tijuca, Rio de Janeiro, BrazilCoordinates22°58′40″S 43°23′33″W / 22.9777°S 43.3924°W / -22.9777; -43.3924OwnerCity of Rio de JaneiroCapacity10,000 (Olympics)Opened2016 Carioca Arena 2 (Portuguese: Arena Carioca 2) is an indoor stadium in Barra da Tijuca in the wes...

 

  提示:此条目页的主题不是芒語。 莽语Maŋ35区域越南萊州省、老挝、中国云南省族群莽族(莽人)母语使用人数约3165人(1999年)語系南亚语系 卡西—克木语族(英语:Khasi–Khmuic languages)莽语語言代碼ISO 639-3zngGlottologmang1378[1]ELPMang瀕危程度联合国教科文组织认定的瀕危語言[2]危险(UNESCO) 莽语(莽语:[maŋ35]、越南語:tiếng Mảng)是居住于越南、老�...

 

Medical conditionEndocrine diseasesOther namesEndocrinopathyMajor endocrine glands. (Male left, female on the right.) 1. Pineal gland 2. Pituitary gland 3. Thyroid gland 4. Thymus 5. Adrenal gland 6. Pancreas 7. Ovary 8. TestesSpecialtyEndocrinology Endocrine diseases are disorders of the endocrine system. The branch of medicine associated with endocrine disorders is known as endocrinology. Types of disease Broadly speaking, endocrine disorders may be subdivided into three groups:[1] ...

このテンプレートは2022年11月21日に削除依頼の審議対象になりました。議論の結果、存続となりました。 このテンプレートについて これはノートで未署名のユーザのページに貼り付けることができます。 この項目のスクリプトを修正してくれる人を修正してくれるとありがたいです。--ナオリン 2006年9月18日 (月) 17:22 (UTC)[返信] すみません、文面から何から書き換えち�...

 

  لمعانٍ أخرى، طالع ويليامزتاون (توضيح). ويليامزتاون     الإحداثيات 38°38′28″N 84°33′39″W / 38.6411°N 84.5608°W / 38.6411; -84.5608   [1] تقسيم إداري  البلد الولايات المتحدة[2][3]  التقسيم الأعلى مقاطعة غرانت  عاصمة لـ مقاطعة غرانت  خصائص جغرافية  ا�...

 

Israeli-Canadian entrepreneur (1922–2014) David Joshua Azrieliדוד יהושע עזריאלי‎Born(1922-05-10)10 May 1922Maków Mazowiecki, PolandDied9 July 2014(2014-07-09) (aged 92)Ivry-sur-le-Lac, CanadaCitizenshipIsraeliCanadianAlma materThomas More Institute (BA)Carleton University (MArch)OccupationsReal estate developerarchitectphilanthropistOrganizationAzrieli FoundationAgentAzrieli GroupSpouse Stephanie Lefcort ​(m. 1957)​Children4, incl...

庄内方言(しょうないほうげん)または庄内弁(しょうないべん)とは、山形県庄内地方で話されている日本語の方言の一つ。広義には小国町の方言も含む。東日本方言の北奥羽方言に属し、アクセントは北奥羽式アクセント(外輪東京式アクセントの変種)である。 鶴岡市を中心とした商圏である鶴岡田川で話される南部方言と、酒田市を中心とした商圏である酒田遊�...

 

البنية الكيميائية للبروستاغلاندين H2 البروستاغلاندين هي مستقلبات حمض الأراكيدونيك، تنتج من فعل الفوسفوليباز (توجد عدة أنواع من هذا الأنزيم) على الدهن الفسفوري الغشائي، وتلعب دورا هاما في الكائنات الحية.[1][2][3] البروستاغلاندين هي عوامل نظير صماوية وأوتوكرين تق...