<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Akimbo</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Akimbo"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Akimbo"/>
	<updated>2026-08-07T21:12:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_17_am&amp;diff=30073</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 17 am</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_17_am&amp;diff=30073"/>
		<updated>2009-12-01T06:13:21Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Single Choice Principle'''==&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Single Choice Principle states that whenever a software system must support a set of alternatives, one and only one module in the system should know their exhaustive list. It is one of the five principles of software construction as stated by Bertrand Meyer, the other four being the [http://hebb.cis.uoguelph.ca/~dave/343/Lectures/swquality.html#linguistic Linguistic Modular Units Principle], the Self- Documentation Principle, the [http://en.wikipedia.org/wiki/Uniform_access_principle Uniform- Access Principle], and the [http://en.wikipedia.org/wiki/Open/closed_principle Open- Closed Principle]. The Single Choice Principle may be viewed as a consequence of both the Open-Closed and information Hiding rules. It was applied when designing [http://en.wikipedia.org/wiki/Eiffel_%28programming_language%29 Eiffel].This principle is a particular case of the [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself Don't repeat yourself principle].&lt;br /&gt;
&lt;br /&gt;
===Violation of SCP===&lt;br /&gt;
&lt;br /&gt;
Consider a  type used to manage a declared in Pascal-Ada syntax : &lt;br /&gt;
&amp;lt;pre&amp;gt;Type Publication=&lt;br /&gt;
	record&lt;br /&gt;
		author,title:STRING;&lt;br /&gt;
		publication_year:INTEGER;&lt;br /&gt;
	case 	pubtype: (book,journal,conference_proceedings)of&lt;br /&gt;
		book: (publisher:STRING);&lt;br /&gt;
		journal: (volume,issue:STRING);&lt;br /&gt;
		proceedings: (editor, place:STRING) – Conference proceedings&lt;br /&gt;
	end&amp;lt;/pre&amp;gt;&lt;br /&gt;
Let B be a typical client of A. B will manipulate publications through a variable such as &lt;br /&gt;
p:PUBLICATION&lt;br /&gt;
and to do anything useful with p, will need to discriminate explicitly between the various cases, as in:&lt;br /&gt;
&amp;lt;pre&amp;gt;	case p of &lt;br /&gt;
		book:...Instructions which may access the field p.publisher&lt;br /&gt;
		journal:...Instructions which may access fields p.volume,p.issue&lt;br /&gt;
		proceedings:...Instructions which may access fields p.editor,p.place&lt;br /&gt;
	end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, whenever there is a need for a new variant, say technical reports of companies in this case, there is a need to extend the definition of type PUBLICATION in module A to support the new case, as well as  any client of A, such as B, will also require updating if it is used as a structure such as above, relying on an explicit list of cases for p.&lt;br /&gt;
What is observed is a violation of the SCP and is a disastrous situation for software change and evolution as a simple and natural addition may cause a chain reaction of changes across many client changes. This violation will occur whenever a certain notion admits a number of variants for ex. -&lt;br /&gt;
&lt;br /&gt;
*In graphics system: the notion of figure, with such variants as polygon, circle, ellipse, and other basic figure types.&lt;br /&gt;
&amp;lt;pre&amp;gt;For example old style procedural code to print different &amp;quot;shape&amp;quot; objects might read:&lt;br /&gt;
&lt;br /&gt;
 if (type==CIRCLE)&lt;br /&gt;
   print &amp;quot;Circle.  r=&amp;quot; + radius;&lt;br /&gt;
 else if (type==Square)&lt;br /&gt;
   print &amp;quot;Square.  sides=&amp;quot; + sideLength;&lt;br /&gt;
 else if (type==Rectangle)&lt;br /&gt;
   print &amp;quot;Rect.  h=&amp;quot; + height + &amp;quot; w=&amp;quot; + width;&lt;br /&gt;
 endif&amp;lt;/pre&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
This same list of alternatives would be used in computing the area, and it rendering to a GUI and in checking for overlap with another shape, etc., etc. So these lists of cases  have to be modified in all locations whenever you add a new shape.        &lt;br /&gt;
&lt;br /&gt;
*In a text editor: the notion of user command, with such variants as line insertion, line deletion, character deletion.&lt;br /&gt;
*In a compiler for a programming language, the notion of language construct, with such variants as instruction, expression, procedure.&lt;br /&gt;
&lt;br /&gt;
===Implementation of SCP===&lt;br /&gt;
Traditional methods do not provide a solution to the SCP violations. Inheritance related concepts of [http://en.wikipedia.org/wiki/Polymorphism polymorphism] and [http://en.wikipedia.org/wiki/Dynamic_binding_%28computer_science%29 Dynamic binding] provide the solution to this problem.&lt;br /&gt;
&lt;br /&gt;
The graphics system given above can be reimplemented in the Object Oriented Manner as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class SHAPE&lt;br /&gt;
  display_details&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class CIRCLE &amp;lt; SHAPE&lt;br /&gt;
  display_details&lt;br /&gt;
    print &amp;quot;Circle.  r=&amp;quot; + radius;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class SQUARE &amp;lt; SHAPE&lt;br /&gt;
  display_details&lt;br /&gt;
    print &amp;quot;Square.  sides=&amp;quot; + sideLength;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class RECTANGLE &amp;lt; SHAPE&lt;br /&gt;
  display_details&lt;br /&gt;
    print &amp;quot;Rect.  h=&amp;quot; + height + &amp;quot; w=&amp;quot; + width;&lt;br /&gt;
  end&lt;br /&gt;
end  &lt;br /&gt;
 &amp;lt;/pre&amp;gt; &lt;br /&gt;
Thus a new sub class of shape is created for each new type of shape. The function display_details to be called depends upon the type of the invoking object. Thus the list of switch case / if else statements would only be needed while creating the object. Further on no such statements have to be written for any of the other operations such as computing the area, rendering to a GUI or checking for overlap with another shape, etc., etc.&lt;br /&gt;
&lt;br /&gt;
===Other Highlights===&lt;br /&gt;
# According to the Single Choice principle exactly one module should know the list of choices, which contrasts the modularity goal which suggests that &amp;lt;i&amp;gt;at most one&amp;lt;/i&amp;gt; module should have this knowledge.&lt;br /&gt;
# The principle is about distribution of knowledge in a software system. The amount of information available to each module should be limited to the information that is required for its proper functioning. This can analogous to the &amp;quot;need-to-know&amp;quot; policy. That is, a module only knows that much as it needs to know.&lt;br /&gt;
# SCP is a direct consequence of the [http://en.wikipedia.org/wiki/Open/closed_principle Open Closed Principle].&lt;br /&gt;
# SCP is a strong form of [http://en.wikipedia.org/wiki/Information_hiding Information Hiding]. The module containing the list of choices tries to hide it from the the other modules.&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
The single choice principle is a principle of [http://en.wikipedia.org/wiki/Imperative_programming imperative] [http://en.wikipedia.org/wiki/Computer_programming computer programming].It directs us to limit the dissemination of exhaustive knowledge about variants of a certain notion. It is an impetus to [http://en.wikipedia.org/wiki/Polymorphism polymorphism] and aims at achieving high [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 cohesion] and low [http://en.wikipedia.org/wiki/Coupling_%28computer_science%29 coupling], one of the most important aspects of [http://en.wikipedia.org/wiki/Modular_programming Modular Programming].&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# Object-Oriented Software Construction Second Edition, Bertrand Meyer pgs 62-64.&lt;br /&gt;
# [http://c2.com/cgi/wiki?SingleChoicePrinciple Single Choice Principle]&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_17_Single_Choice_Pattern_am&amp;diff=30070</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 17 Single Choice Pattern am</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_17_Single_Choice_Pattern_am&amp;diff=30070"/>
		<updated>2009-12-01T05:52:14Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Single Choice Principle'''==&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Single Choice Principle states that whenever a software system must support a set of alternatives, one and only one module in the system should know their exhaustive list. It is one of the five principles of software construction as stated by Bertrand Meyer, the other four being the [http://hebb.cis.uoguelph.ca/~dave/343/Lectures/swquality.html#linguistic Linguistic Modular Units Principle], the Self- Documentation Principle, the [http://en.wikipedia.org/wiki/Uniform_access_principle Uniform- Access Principle], and the [http://en.wikipedia.org/wiki/Open/closed_principle Open- Closed Principle]. The Single Choice Principle may be viewed as a consequence of both the Open-Closed and information Hiding rules. It was applied when designing [http://en.wikipedia.org/wiki/Eiffel_%28programming_language%29 Eiffel].This principle is a particular case of the [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself Don't repeat yourself principle].&lt;br /&gt;
&lt;br /&gt;
===Violation of SCP===&lt;br /&gt;
&lt;br /&gt;
Consider a  type used to manage a declared in Pascal-Ada syntax : &lt;br /&gt;
&amp;lt;pre&amp;gt;Type Publication=&lt;br /&gt;
	record&lt;br /&gt;
		author,title:STRING;&lt;br /&gt;
		publication_year:INTEGER;&lt;br /&gt;
	case 	pubtype: (book,journal,conference_proceedings)of&lt;br /&gt;
		book: (publisher:STRING);&lt;br /&gt;
		journal: (volume,issue:STRING);&lt;br /&gt;
		proceedings: (editor, place:STRING) – Conference proceedings&lt;br /&gt;
	end&amp;lt;/pre&amp;gt;&lt;br /&gt;
Let B be a typical client of A. B will manipulate publications through a variable such as &lt;br /&gt;
p:PUBLICATION&lt;br /&gt;
and to do anything useful with p, will need to discriminate explicitly between the various cases, as in:&lt;br /&gt;
&amp;lt;pre&amp;gt;	case p of &lt;br /&gt;
		book:...Instructions which may access the field p.publisher&lt;br /&gt;
		journal:...Instructions which may access fields p.volume,p.issue&lt;br /&gt;
		proceedings:...Instructions which may access fields p.editor,p.place&lt;br /&gt;
	end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, whenever there is a need for a new variant, say technical reports of companies in this case, there is a need to extend the definition of type PUBLICATION in module A to support the new case, as well as  any client of A, such as B, will also require updating if it is used as a structure such as above, relying on an explicit list of cases for p.&lt;br /&gt;
What is observed is a violation of the SCP and is a disastrous situation for software change and evolution as a simple and natural addition may cause a chain reaction of changes across many client changes. This violation will occur whenever a certain notion admits a number of variants for ex. -&lt;br /&gt;
&lt;br /&gt;
*In graphics system: the notion of figure, with such variants as polygon, circle, ellipse, and other basic figure types.&lt;br /&gt;
&amp;lt;pre&amp;gt;For example old style procedural code to print different &amp;quot;shape&amp;quot; objects might read:&lt;br /&gt;
&lt;br /&gt;
 if (type==CIRCLE)&lt;br /&gt;
   print &amp;quot;Circle.  r=&amp;quot; + radius;&lt;br /&gt;
 else if (type==Square)&lt;br /&gt;
   print &amp;quot;Square.  sides=&amp;quot; + sideLength;&lt;br /&gt;
 else if (type==Rectangle)&lt;br /&gt;
   print &amp;quot;Rect.  h=&amp;quot; + height + &amp;quot; w=&amp;quot; + width;&lt;br /&gt;
 endif&amp;lt;/pre&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
This same list of alternatives would be used in computing the area, and it rendering to a GUI and in checking for overlap with another shape, etc., etc. So these lists of cases  have to be modified in all locations whenever you add a new shape.        &lt;br /&gt;
&lt;br /&gt;
*In a text editor: the notion of user command, with such variants as line insertion, line deletion, character deletion.&lt;br /&gt;
*In a compiler for a programming language, the notion of language construct, with such variants as instruction, expression, procedure.&lt;br /&gt;
&lt;br /&gt;
===Implementation of SCP===&lt;br /&gt;
Traditional methods do not provide a solution to the SCP violations. Inheritance related concepts of [http://en.wikipedia.org/wiki/Polymorphism polymorphism] and [http://en.wikipedia.org/wiki/Dynamic_binding_%28computer_science%29 Dynamic binding] provide the solution to this problem.&lt;br /&gt;
&lt;br /&gt;
The graphics system given above can be reimplemented in the Object Oriented Manner as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class SHAPE&lt;br /&gt;
  display_details&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class CIRCLE &amp;lt; SHAPE&lt;br /&gt;
  display_details&lt;br /&gt;
    print &amp;quot;Circle.  r=&amp;quot; + radius;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class SQUARE &amp;lt; SHAPE&lt;br /&gt;
  display_details&lt;br /&gt;
    print &amp;quot;Square.  sides=&amp;quot; + sideLength;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class RECTANGLE &amp;lt; SHAPE&lt;br /&gt;
  display_details&lt;br /&gt;
    print &amp;quot;Rect.  h=&amp;quot; + height + &amp;quot; w=&amp;quot; + width;&lt;br /&gt;
  end&lt;br /&gt;
end  &lt;br /&gt;
 &amp;lt;/pre&amp;gt; &lt;br /&gt;
Thus a new sub class of shape is created for each new type of shape. The function display_details to be called depends upon the type of the invoking object. Thus the list of switch case / if else statements would only be needed while creating the object. Further on no such statements have to be written for any of the other operations such as computing the area, rendering to a GUI or checking for overlap with another shape, etc., etc.&lt;br /&gt;
&lt;br /&gt;
===Other Highlights===&lt;br /&gt;
# According to the Single Choice principle exactly one module should know the list of choices, which contrasts the modularity goal which suggests that &amp;lt;i&amp;gt;at most one&amp;lt;/i&amp;gt; module should have this knowledge.&lt;br /&gt;
# The principle is about distribution of knowledge in a software system. The amount of information available to each module should be limited to the information that is required for its proper functioning. This can analogous to the &amp;quot;need-to-know&amp;quot; policy. That is, a module only knows that much as it needs to know.&lt;br /&gt;
# SCP is a direct consequence of the [http://en.wikipedia.org/wiki/Open/closed_principle Open Closed Principle].&lt;br /&gt;
# SCP is a strong form of [http://en.wikipedia.org/wiki/Information_hiding Information Hiding]. The module containing the list of choices tries to hide it from the the other modules.&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
The single choice principle is a principle of [http://en.wikipedia.org/wiki/Imperative_programming imperative] [http://en.wikipedia.org/wiki/Computer_programming computer programming].It directs us to limit the dissemination of exhaustive knowledge about variants of a certain notion. It is an impetus to [http://en.wikipedia.org/wiki/Polymorphism polymorphism] and aims at achieving high [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 cohesion] and low [http://en.wikipedia.org/wiki/Coupling_%28computer_science%29 coupling], one of the most important aspects of [http://en.wikipedia.org/wiki/Modular_programming Modular Programming].&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
# Object-Oriented Software Construction Second Edition, Bertrand Meyer pgs 62-64.&lt;br /&gt;
# [http://c2.com/cgi/wiki?SingleChoicePrinciple Single Choice Principle]&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24372</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24372"/>
		<updated>2009-10-09T20:09:17Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''Gui Testing Frameworks'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester [http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.[http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler[http://misko.hevery.com/2008/07/05/testing-ui-part1/&amp;lt;sup&amp;gt;|3|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1:[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/ testing web applications with Capture &amp;amp; Replay – workflow.]]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&amp;lt;sup&amp;gt;|4|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.Another elaborate example of cucumber can be found [http://cukes.info/ here.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
In summary, GUIs have introduced new types of error, increased complexity and made testing more difficult.But with new and sophisticated patterns and tools errors can be detected more proactively as well as regression tests can be executed on the GUIs,thus making GUI testing more reliable.[http://www.testingfaqs.org/t-gui.html Here] is an extensive list of all the GUI testing tools available till date.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://misko.hevery.com/2008/07/05/testing-ui-part1/&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24371</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24371"/>
		<updated>2009-10-09T20:08:42Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''Gui Testing Frameworks'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester [http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.[http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler[http://misko.hevery.com/2008/07/05/testing-ui-part1/&amp;lt;sup&amp;gt;|3|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1:[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/ testing web applications with Capture &amp;amp; Replay – workflow.]]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&amp;lt;sup&amp;gt;|4|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.Another elaborate example of cucumber can be found [http://cukes.info/ here.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
In summary, GUIs have introduced new types of error, increased complexity and made testing more difficult.But with new and sophisticated patterns and tools errors can be detected more proactively as well as regression tests can be executed on the GUIs,thus making GUI testing more reliable.Here is an extensive list of all the GUI testing tools available till date.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://misko.hevery.com/2008/07/05/testing-ui-part1/&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24346</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24346"/>
		<updated>2009-10-09T19:59:38Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* '''GUI TESTING FRAMEWORKS''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''Gui Testing Frameworks'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester [http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.[http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler[http://misko.hevery.com/2008/07/05/testing-ui-part1/&amp;lt;sup&amp;gt;|3|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1:[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/ testing web applications with Capture &amp;amp; Replay – workflow.]]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&amp;lt;sup&amp;gt;|4|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.Another elaborate example of cucumber can be found [http://cukes.info/ here.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://misko.hevery.com/2008/07/05/testing-ui-part1/&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24344</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24344"/>
		<updated>2009-10-09T19:59:00Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* MVC Design Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester [http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.[http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler[http://misko.hevery.com/2008/07/05/testing-ui-part1/&amp;lt;sup&amp;gt;|3|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1:[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/ testing web applications with Capture &amp;amp; Replay – workflow.]]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&amp;lt;sup&amp;gt;|4|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.Another elaborate example of cucumber can be found [http://cukes.info/ here.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://misko.hevery.com/2008/07/05/testing-ui-part1/&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24340</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24340"/>
		<updated>2009-10-09T19:58:16Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester [http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.[http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1:[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/ testing web applications with Capture &amp;amp; Replay – workflow.]]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&amp;lt;sup&amp;gt;|4|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.Another elaborate example of cucumber can be found [http://cukes.info/ here.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://misko.hevery.com/2008/07/05/testing-ui-part1/&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24337</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24337"/>
		<updated>2009-10-09T19:57:00Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Cucumber */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester [http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.[http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1:[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/ testing web applications with Capture &amp;amp; Replay – workflow.]]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&amp;lt;sup&amp;gt;|4|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.Another elaborate example of cucumber can be found [http://cukes.info/ here.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://www.slideshare.net/rpires/GUI-Test-Patterns&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24326</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24326"/>
		<updated>2009-10-09T19:54:14Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester [http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.[http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1:[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/ testing web applications with Capture &amp;amp; Replay – workflow.]]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&amp;lt;sup&amp;gt;|4|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://www.slideshare.net/rpires/GUI-Test-Patterns&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24324</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24324"/>
		<updated>2009-10-09T19:53:39Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester [http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.[http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&amp;lt;sup&amp;gt;|4|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://www.slideshare.net/rpires/GUI-Test-Patterns&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24321</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24321"/>
		<updated>2009-10-09T19:53:10Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester [http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.[http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation[http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&amp;lt;sup&amp;gt;|4|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://www.slideshare.net/rpires/GUI-Test-Patterns&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24317</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24317"/>
		<updated>2009-10-09T19:52:15Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester [http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.[http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation[http://www.slideshare.net/rpires/GUI-Test-Patterns&amp;lt;sup&amp;gt;|4|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://www.slideshare.net/rpires/GUI-Test-Patterns&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24314</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24314"/>
		<updated>2009-10-09T19:50:49Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester [http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.[http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation[http://www.slideshare.net/rpires/GUI-Test-Patterns&amp;lt;sup&amp;gt;|3|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://www.slideshare.net/rpires/GUI-Test-Patterns&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24309</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24309"/>
		<updated>2009-10-09T19:49:26Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* GUI Test Principles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester [http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.[http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://www.slideshare.net/rpires/GUI-Test-Patterns&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24307</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24307"/>
		<updated>2009-10-09T19:49:00Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* GUI Testing Difficulties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester [http://www.testingfaqs.org/t-gui.html&amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://www.slideshare.net/rpires/GUI-Test-Patterns&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24300</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24300"/>
		<updated>2009-10-09T19:44:11Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
[1]   http://www.gerrardconsulting.com/GUI/TestGui.html&lt;br /&gt;
&lt;br /&gt;
[2]   http://wiki.github.com&lt;br /&gt;
&lt;br /&gt;
[3]   http://www.slideshare.net/rpires/GUI-Test-Patterns&lt;br /&gt;
&lt;br /&gt;
[4]   http://en.web2test.de/web-testing-knowledgebase/testing-web-applications/&lt;br /&gt;
&lt;br /&gt;
[5]   http://www.testingfaqs.org/t-gui.html &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24289</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24289"/>
		<updated>2009-10-09T19:36:49Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Different Approaches used for GUI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24287</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24287"/>
		<updated>2009-10-09T19:36:28Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* GUI Testing Difficulties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24284</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24284"/>
		<updated>2009-10-09T19:36:07Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* GUI Test Principles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
*The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
*A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
*Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
*Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
*We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24282</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24282"/>
		<updated>2009-10-09T19:34:44Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
•	The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
&lt;br /&gt;
•	A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
&lt;br /&gt;
•	Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
&lt;br /&gt;
•	Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
&lt;br /&gt;
•	We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24281</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24281"/>
		<updated>2009-10-09T19:34:24Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
•	The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
&lt;br /&gt;
•	A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
&lt;br /&gt;
•	Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
&lt;br /&gt;
•	Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
&lt;br /&gt;
•	We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24277</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24277"/>
		<updated>2009-10-09T19:32:45Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
•	The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
&lt;br /&gt;
•	A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
&lt;br /&gt;
•	Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
&lt;br /&gt;
•	Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
&lt;br /&gt;
•	We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24271</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24271"/>
		<updated>2009-10-09T19:30:22Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
•	The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
&lt;br /&gt;
•	A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
&lt;br /&gt;
•	Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
&lt;br /&gt;
•	Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
&lt;br /&gt;
•	We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.It is used mostly for regression testing.Some Java testing frameworks employing this approach are [http://jacareto.sourceforge.net  Jacareto] and [http://abbot.sourceforge.net/doc/overview.shtml Abbot].&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24267</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24267"/>
		<updated>2009-10-09T19:27:00Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
[http://www.gerrardconsulting.com/GUI/TestGui.html GUI testing] is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
•	The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
&lt;br /&gt;
•	A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
&lt;br /&gt;
•	Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
&lt;br /&gt;
•	Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
&lt;br /&gt;
•	We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
As the name suggests,[http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay tool] captures  the user interactions with the system under test.Inputs, outputs, and other information needed to reproduce a session with the system under test need to be recorded during the capture process.&lt;br /&gt;
&lt;br /&gt;
During the capture process, the tool will register as an event listener.Event notification method for the tool will record the details of all events that occurred.During the replay process, the tool will register as an event source (possibly also as a listener)and compare results.For mouse and keyboard events, the tool has to substitute for the actual devices as the event source.At test checkpoints, the tool can ask various controls for their state and record it, for eg GUI radio button properties.Replay events should be initiated at the same relative time as during the capture.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24245</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24245"/>
		<updated>2009-10-09T19:16:25Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
GUI testing is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
•	The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
&lt;br /&gt;
•	A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
&lt;br /&gt;
•	Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
&lt;br /&gt;
•	Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
&lt;br /&gt;
•	We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests,in [http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay] the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24243</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24243"/>
		<updated>2009-10-09T19:14:20Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Approach */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
GUI testing is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
•	The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
&lt;br /&gt;
•	A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
&lt;br /&gt;
•	Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
&lt;br /&gt;
•	Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
&lt;br /&gt;
•	We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests,in [http://www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay] the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24240</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24240"/>
		<updated>2009-10-09T19:13:15Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Different Approaches used for GUI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
GUI testing is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
===GUI Test Principles===&lt;br /&gt;
&lt;br /&gt;
To develop a test process which is applicable for GUI testing in general we need to follow a set of principles. These principles deal with errors involved with GUI and using the GUI to exercise tests so is very-oriented toward black-box testing.&lt;br /&gt;
&lt;br /&gt;
•	The errors can be broken down into types, and we can design tests to diagnose each type of error. So, we can channelize the efforts in the direction of testing.&lt;br /&gt;
&lt;br /&gt;
•	A divide and conquer approach helps to separate out concerns. A complex problem is broken down into a large number of simple ones thereby concentrating on designing test cases for specific types of error.&lt;br /&gt;
&lt;br /&gt;
•	Automating GUI tests is complicated as seen before. Thus we need to ensure that we include this feature only when needed in stead of  using it in general for everything.&lt;br /&gt;
&lt;br /&gt;
•	Layering as for everything helps separate complexity. Similarly layering of tests can be an effective solution as we implement the tests of individual components(low level tests) first and then test the integrated application at the end.&lt;br /&gt;
&lt;br /&gt;
•	We can use traditional techniques that are used for form based applications called black box test techniques wherever appropriate.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Approach ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests,in [www.site.uottawa.ca/~awilliam/seg3203/Capture.ppt Capture &amp;amp; Replay] the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24229</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24229"/>
		<updated>2009-10-09T19:03:14Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Different Approaches used for GUI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
GUI testing is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI testing] are as follows:&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24226</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24226"/>
		<updated>2009-10-09T19:02:37Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for [http://en.wikipedia.org/wiki/GUI_software_testing GUI Testing.]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
GUI testing is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24224</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24224"/>
		<updated>2009-10-09T19:01:28Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Graphical_user_interface Graphical User Interface] is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use. They are the assumed user interface for virtually all systems development using modern technologies.They deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of [http://en.wikipedia.org/wiki/Graphical_user_interface GUI], unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
GUI testing is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24218</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24218"/>
		<updated>2009-10-09T18:58:56Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* GUI Testing Difficulties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.GUIs are the assumed user interface for virtually all systems development using modern technologies.Graphical User Interface deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of GUI, unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
GUI testing is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsolicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus need to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24213</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24213"/>
		<updated>2009-10-09T18:55:54Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* GUI Testing Difficulties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.GUIs are the assumed user interface for virtually all systems development using modern technologies.Graphical User Interface deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of GUI, unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
GUI testing is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of events that occur when a user is using the application. This makes it really difficult for a coder to anticipate all contexts and include  event handlers for all of them.Also the number of potential paths from feature to feature within the application is so high that the scope for programmers to make errors is dramatically increased. The ‘infinite paths’ problem also makes it extremely unlikely that they will all be tested.&lt;br /&gt;
#Unsilicited events like a LAN printer going offline and an operating system popping up a dialog box asking the user to feed more paper can occur any time.Here not only is the number of test cases high but also special test drivers may be necessary to generate such events within the operating systems.&lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24200</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24200"/>
		<updated>2009-10-09T18:45:27Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* GUI Testing Difficulties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.GUIs are the assumed user interface for virtually all systems development using modern technologies.Graphical User Interface deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of GUI, unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
&lt;br /&gt;
GUI testing is  comparatively difficult because of the following reasons:&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24198</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24198"/>
		<updated>2009-10-09T18:44:40Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* GUI Testing Difficulties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.GUIs are the assumed user interface for virtually all systems development using modern technologies.Graphical User Interface deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of GUI, unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
 GUI testing is  comparatively difficult because of the following reasons-&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24196</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24196"/>
		<updated>2009-10-09T18:42:12Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* MVC Design Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.GUIs are the assumed user interface for virtually all systems development using modern technologies.Graphical User Interface deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of GUI, unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because of the following reasons-&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model View Controller pattern.] The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24193</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24193"/>
		<updated>2009-10-09T18:40:37Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* GUI Testing Difficulties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.GUIs are the assumed user interface for virtually all systems development using modern technologies.Graphical User Interface deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of GUI, unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because of the following reasons-&lt;br /&gt;
&lt;br /&gt;
#There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
#A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
#GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
#GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
#GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
#GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
#There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases.&lt;br /&gt;
#An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24191</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24191"/>
		<updated>2009-10-09T18:37:01Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.GUIs are the assumed user interface for virtually all systems development using modern technologies.Graphical User Interface deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of GUI, unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because&lt;br /&gt;
&lt;br /&gt;
1.	There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
&lt;br /&gt;
2.	A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
&lt;br /&gt;
3.	GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
&lt;br /&gt;
4.	GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
&lt;br /&gt;
5.	GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
&lt;br /&gt;
6.	GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
&lt;br /&gt;
7.	There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases&lt;br /&gt;
&lt;br /&gt;
8.	An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1: testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24190</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24190"/>
		<updated>2009-10-09T18:36:27Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.GUIs are the assumed user interface for virtually all systems development using modern technologies.Graphical User Interface deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of GUI, unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because&lt;br /&gt;
&lt;br /&gt;
1.	There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
&lt;br /&gt;
2.	A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
&lt;br /&gt;
3.	GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
&lt;br /&gt;
4.	GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
&lt;br /&gt;
5.	GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
&lt;br /&gt;
6.	GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
&lt;br /&gt;
7.	There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases&lt;br /&gt;
&lt;br /&gt;
8.	An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1 testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
*As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
*A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
*It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24188</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24188"/>
		<updated>2009-10-09T18:35:22Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.GUIs are the assumed user interface for virtually all systems development using modern technologies.Graphical User Interface deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of GUI, unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because&lt;br /&gt;
&lt;br /&gt;
1.	There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
&lt;br /&gt;
2.	A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
&lt;br /&gt;
3.	GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
&lt;br /&gt;
4.	GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
&lt;br /&gt;
5.	GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
&lt;br /&gt;
6.	GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
&lt;br /&gt;
7.	There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases&lt;br /&gt;
&lt;br /&gt;
8.	An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1 testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
•As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
•A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
•It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24186</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24186"/>
		<updated>2009-10-09T18:33:40Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Capture and Replay Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.GUIs are the assumed user interface for virtually all systems development using modern technologies.Graphical User Interface deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of GUI, unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because&lt;br /&gt;
&lt;br /&gt;
1.	There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
&lt;br /&gt;
2.	A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
&lt;br /&gt;
3.	GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
&lt;br /&gt;
4.	GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
&lt;br /&gt;
5.	GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
&lt;br /&gt;
6.	GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
&lt;br /&gt;
7.	There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases&lt;br /&gt;
&lt;br /&gt;
8.	An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Record.jpg|650px|thumb|center|figure 1 testing web applications with Capture &amp;amp; Replay – workflow.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
•	As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
&lt;br /&gt;
•	A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
&lt;br /&gt;
•	It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Record.jpg&amp;diff=24184</id>
		<title>File:Record.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Record.jpg&amp;diff=24184"/>
		<updated>2009-10-09T18:31:41Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24181</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24181"/>
		<updated>2009-10-09T18:25:54Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.GUIs are the assumed user interface for virtually all systems development using modern technologies.Graphical User Interface deliver the system functionality for the clients in the client/server system.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However testing systmes with GUIs becomes very difficult because of the event-driven nature of GUI, unsolicited events and a never ending input domain.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because&lt;br /&gt;
&lt;br /&gt;
1.	There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
&lt;br /&gt;
2.	A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
&lt;br /&gt;
3.	GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
&lt;br /&gt;
4.	GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
&lt;br /&gt;
5.	GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
&lt;br /&gt;
6.	GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
&lt;br /&gt;
7.	There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases&lt;br /&gt;
&lt;br /&gt;
8.	An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
A simple workflow explaining the test approach is shown below&lt;br /&gt;
&lt;br /&gt;
PLZ INSERT IMAGE&lt;br /&gt;
&lt;br /&gt;
figure 1 testing web applications with Capture &amp;amp; Replay – workflow&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
•	As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
&lt;br /&gt;
•	A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
&lt;br /&gt;
•	It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24176</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24176"/>
		<updated>2009-10-09T18:21:35Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Test Stubs and Drivers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However due to its nature there are many difficulties that arise with GUI testing.&lt;br /&gt;
&lt;br /&gt;
GUIs are the assumed user interface for virtually all systems development using modern technologies. Graphical User Interface deliver the system functionality for the clients in the client/server system. Testing systems become more complex with GUI because of the event-driven nature of GUI, unsolicited events and a never ending input domain. Thus there aren’t any developed or implemented testing patterns for GUI testing.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because&lt;br /&gt;
&lt;br /&gt;
1.	There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
&lt;br /&gt;
2.	A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
&lt;br /&gt;
3.	GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
&lt;br /&gt;
4.	GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
&lt;br /&gt;
5.	GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
&lt;br /&gt;
6.	GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
&lt;br /&gt;
7.	There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases&lt;br /&gt;
&lt;br /&gt;
8.	An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
The different approaches used for GUI testing are as follows&lt;br /&gt;
&lt;br /&gt;
==== Capture and Replay Tool ====&lt;br /&gt;
&lt;br /&gt;
In this approach, as the name suggests, the user starts testing the web applications manually thereby invoking the events and the test software starts recording all the actions. These actions identify the respective GUI widgets and are collected in the form of events.  The recording forms the basis of automating the test for web applications which are replayed via the GUI.&lt;br /&gt;
&lt;br /&gt;
A simple workflow explaining the test approach is shown below&lt;br /&gt;
&lt;br /&gt;
PLZ INSERT IMAGE&lt;br /&gt;
&lt;br /&gt;
figure 1 testing web applications with Capture &amp;amp; Replay – workflow&lt;br /&gt;
&lt;br /&gt;
'''Drawbacks'''&lt;br /&gt;
&lt;br /&gt;
•	As mentioned in the problems before, this can be tested only after the development has finished.&lt;br /&gt;
&lt;br /&gt;
•	A layout may change over the time and hence the test cases may become invalid owing to the changes in the physical interface.&lt;br /&gt;
&lt;br /&gt;
•	It lacks the necessary support to design the test cases and coverage criteria evaluation.&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://wiki.answers.com/Q/What_is_the_difference_between_stub_and_driver test driver.]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24169</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24169"/>
		<updated>2009-10-09T18:17:12Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Test Stubs and Drivers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However due to its nature there are many difficulties that arise with GUI testing.&lt;br /&gt;
&lt;br /&gt;
GUIs are the assumed user interface for virtually all systems development using modern technologies. Graphical User Interface deliver the system functionality for the clients in the client/server system. Testing systems become more complex with GUI because of the event-driven nature of GUI, unsolicited events and a never ending input domain. Thus there aren’t any developed or implemented testing patterns for GUI testing.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because&lt;br /&gt;
&lt;br /&gt;
1.	There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
&lt;br /&gt;
2.	A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
&lt;br /&gt;
3.	GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
&lt;br /&gt;
4.	GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
&lt;br /&gt;
5.	GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
&lt;br /&gt;
6.	GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
&lt;br /&gt;
7.	There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases&lt;br /&gt;
&lt;br /&gt;
8.	An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Test_stubs test stub] is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as [http://en.wikipedia.org/wiki/Test_stubs stub.]&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as driver.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24166</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24166"/>
		<updated>2009-10-09T18:15:32Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Test Stubs and Drivers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However due to its nature there are many difficulties that arise with GUI testing.&lt;br /&gt;
&lt;br /&gt;
GUIs are the assumed user interface for virtually all systems development using modern technologies. Graphical User Interface deliver the system functionality for the clients in the client/server system. Testing systems become more complex with GUI because of the event-driven nature of GUI, unsolicited events and a never ending input domain. Thus there aren’t any developed or implemented testing patterns for GUI testing.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because&lt;br /&gt;
&lt;br /&gt;
1.	There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
&lt;br /&gt;
2.	A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
&lt;br /&gt;
3.	GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
&lt;br /&gt;
4.	GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
&lt;br /&gt;
5.	GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
&lt;br /&gt;
6.	GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
&lt;br /&gt;
7.	There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases&lt;br /&gt;
&lt;br /&gt;
8.	An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A test stub is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called &lt;br /&gt;
as stub.&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as driver.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24165</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24165"/>
		<updated>2009-10-09T18:15:05Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Test Stubs and Drivers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However due to its nature there are many difficulties that arise with GUI testing.&lt;br /&gt;
&lt;br /&gt;
GUIs are the assumed user interface for virtually all systems development using modern technologies. Graphical User Interface deliver the system functionality for the clients in the client/server system. Testing systems become more complex with GUI because of the event-driven nature of GUI, unsolicited events and a never ending input domain. Thus there aren’t any developed or implemented testing patterns for GUI testing.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because&lt;br /&gt;
&lt;br /&gt;
1.	There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
&lt;br /&gt;
2.	A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
&lt;br /&gt;
3.	GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
&lt;br /&gt;
4.	GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
&lt;br /&gt;
5.	GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
&lt;br /&gt;
6.	GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
&lt;br /&gt;
7.	There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases&lt;br /&gt;
&lt;br /&gt;
8.	An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A test stub is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called &lt;br /&gt;
as stub.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
  ...&lt;br /&gt;
  p = price(x);&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as driver.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;//Driver program for the function get_input.&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
void get_input(x&amp;amp; cost, int&amp;amp; y);&lt;br /&gt;
//Precondition: User is ready to enters values correctly.Postconditions: The value of cost has been set to the.&lt;br /&gt;
//wholesale cost of one item. The value of turnover has been set to the expected number of days until the item is sold.&lt;br /&gt;
int main( )&lt;br /&gt;
{ double a;&lt;br /&gt;
    int b;&lt;br /&gt;
    char ans;&lt;br /&gt;
    do    {&lt;br /&gt;
        get_input(a, b);&lt;br /&gt;
        cout.setf(ios::fixed);&lt;br /&gt;
        cout.setf(ios::showpoint);&lt;br /&gt;
        cout.precision(2);&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;a is &amp;quot; &amp;lt;&amp;lt; a &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;b is &amp;quot; &amp;lt;&amp;lt; b &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Test again?&amp;quot;&lt;br /&gt;
             &amp;lt;&amp;lt; &amp;quot; (Type y for yes or n for no): &amp;quot;;&lt;br /&gt;
        cin &amp;gt;&amp;gt; ans;&lt;br /&gt;
        cout &amp;lt;&amp;lt; endl;&lt;br /&gt;
    } while (ans == 'y' || ans == 'Y');&lt;br /&gt;
    return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24155</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24155"/>
		<updated>2009-10-09T18:08:31Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Test Stub */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However due to its nature there are many difficulties that arise with GUI testing.&lt;br /&gt;
&lt;br /&gt;
GUIs are the assumed user interface for virtually all systems development using modern technologies. Graphical User Interface deliver the system functionality for the clients in the client/server system. Testing systems become more complex with GUI because of the event-driven nature of GUI, unsolicited events and a never ending input domain. Thus there aren’t any developed or implemented testing patterns for GUI testing.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because&lt;br /&gt;
&lt;br /&gt;
1.	There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
&lt;br /&gt;
2.	A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
&lt;br /&gt;
3.	GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
&lt;br /&gt;
4.	GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
&lt;br /&gt;
5.	GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
&lt;br /&gt;
6.	GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
&lt;br /&gt;
7.	There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases&lt;br /&gt;
&lt;br /&gt;
8.	An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs and Drivers====&lt;br /&gt;
A test stub is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically while intergrating all the modules in top to bottom approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called &lt;br /&gt;
as stub.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; If the function A you are testing, calls another function B,then use a simplified version of function B, called a stub.&lt;br /&gt;
&lt;br /&gt;
void function_under_test(int&amp;amp; x, int&amp;amp; y) {&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
  p = price(x);&lt;br /&gt;
&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
double price(int x) {return 10.00;}&lt;br /&gt;
&lt;br /&gt;
The value returned by function price is good enough for testing.The real price() function may not yet have been tested, or even&lt;br /&gt;
written.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Similarly, while integrating all the modules in bottom to top approach whenever any mandatory module is missing that module is replaced by a temperoary program which is called as driver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First, a test-specific implementation of an interface on which the System under testing(SUT) depends is defined. This implementation is configured to respond to calls from the SUT with the values (or exceptions) that will exercise the Untested Code within the SUT. Before exercising the SUT, we install the Test Stub so that the SUT uses it instead of the real implementation. When called by the SUT during test execution, the Test Stub returns the previously defined values. The test can then verify the expected outcome in the normal way. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24135</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24135"/>
		<updated>2009-10-09T17:55:41Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Test Stub */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However due to its nature there are many difficulties that arise with GUI testing.&lt;br /&gt;
&lt;br /&gt;
GUIs are the assumed user interface for virtually all systems development using modern technologies. Graphical User Interface deliver the system functionality for the clients in the client/server system. Testing systems become more complex with GUI because of the event-driven nature of GUI, unsolicited events and a never ending input domain. Thus there aren’t any developed or implemented testing patterns for GUI testing.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because&lt;br /&gt;
&lt;br /&gt;
1.	There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
&lt;br /&gt;
2.	A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
&lt;br /&gt;
3.	GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
&lt;br /&gt;
4.	GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
&lt;br /&gt;
5.	GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
&lt;br /&gt;
6.	GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
&lt;br /&gt;
7.	There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases&lt;br /&gt;
&lt;br /&gt;
8.	An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stub====&lt;br /&gt;
A test stub is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. More specifically it is programs which simulates the behavior of software components (or modules) that are the dependent modules of a under test module. It is a pattern used for testing interfaces in an application if the real components have not been implemented or are too expensive to use for testing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;A pattern is a recurring solution to a recurring problem in a context.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, a test-specific implementation of an interface on which the System under testing(SUT) depends is defined. This implementation is configured to respond to calls from the SUT with the values (or exceptions) that will exercise the Untested Code within the SUT. Before exercising the SUT, we install the Test Stub so that the SUT uses it instead of the real implementation. When called by the SUT during test execution, the Test Stub returns the previously defined values. The test can then verify the expected outcome in the normal way. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24119</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24119"/>
		<updated>2009-10-09T17:43:30Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Test Stubs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However due to its nature there are many difficulties that arise with GUI testing.&lt;br /&gt;
&lt;br /&gt;
GUIs are the assumed user interface for virtually all systems development using modern technologies. Graphical User Interface deliver the system functionality for the clients in the client/server system. Testing systems become more complex with GUI because of the event-driven nature of GUI, unsolicited events and a never ending input domain. Thus there aren’t any developed or implemented testing patterns for GUI testing.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because&lt;br /&gt;
&lt;br /&gt;
1.	There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
&lt;br /&gt;
2.	A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
&lt;br /&gt;
3.	GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
&lt;br /&gt;
4.	GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
&lt;br /&gt;
5.	GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
&lt;br /&gt;
6.	GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
&lt;br /&gt;
7.	There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases&lt;br /&gt;
&lt;br /&gt;
8.	An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stub====&lt;br /&gt;
A test stub is a dummy software component or object used (during development and testing) to simulate the behavior of a real component. It is a pattern used for testing interfaces in an application if the real components have not been implemented or are too expensive to use for testing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;A pattern is a recurring solution to a recurring problem in a context.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, a test-specific implementation of an interface on which the System under testing(SUT) depends is defined. This implementation is configured to respond to calls from the SUT with the values (or exceptions) that will exercise the Untested Code within the SUT. Before exercising the SUT, we install the Test Stub so that the SUT uses it instead of the real implementation. When called by the SUT during test execution, the Test Stub returns the previously defined values. The test can then verify the expected outcome in the normal way. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24032</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 Gui Testing Frameworks aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_Gui_Testing_Frameworks_aa&amp;diff=24032"/>
		<updated>2009-10-09T16:52:17Z</updated>

		<summary type="html">&lt;p&gt;Akimbo: /* Cucumber */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=='''GUI TESTING FRAMEWORKS'''==&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
A Graphical User Interface is a program interface that takes advantage of the computer's  graphics capabilities to make the program easier to use.Ideally, user interfaces should only be thin shells on top of the next layer in an application displaying information in a useful fashion, and passing user input as quickly as possible to some code that knows what to do with it.However due to its nature there are many difficulties that arise with GUI testing.&lt;br /&gt;
&lt;br /&gt;
GUIs are the assumed user interface for virtually all systems development using modern technologies. Graphical User Interface deliver the system functionality for the clients in the client/server system. Testing systems become more complex with GUI because of the event-driven nature of GUI, unsolicited events and a never ending input domain. Thus there aren’t any developed or implemented testing patterns for GUI testing.&lt;br /&gt;
&lt;br /&gt;
The article here describes the problems associated with GUI testing and several possible patterns and tools used for GUI Testing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===GUI Testing Difficulties===&lt;br /&gt;
   &lt;br /&gt;
As GUI hides the complexity from the user and from the programmers too on using development frameworks but the hidden issues become really obvious when it comes to testing. GUI testing is much more difficult comparatively because&lt;br /&gt;
&lt;br /&gt;
1.	There is an infinite number of unnoticed events that occur when a user is using the application making. This makes it really difficult for a code to include all of them and to complicate the issue further special test drivers are needed in the Operating system to generate such events. For instance when a printer in a LAN is switched off, and the operating system puts up a dialog box inviting the user to feed more paper into the printer. &lt;br /&gt;
&lt;br /&gt;
2.	A major problem involved with GUI testing is a large number of input spaces wherein user can click on any point on the screen at any time and there may be an undefined number of applications running simultaneously. This means that the application code needs to check the next event irrespective of whether it’s meant for it. This event driven approach makes testing an extremely complicated issue.&lt;br /&gt;
&lt;br /&gt;
3.	GUIs are better suited to object oriented paradigm. A large number of methods and attributes are associated with each object that deals with GUI events thus making it even more complex. For example even for a simple text box there may be around thirty attributes which means a larger set of test cases to deal with.&lt;br /&gt;
&lt;br /&gt;
4.	GUI environment deals with windows and user take the standard features of window management (re-size, move, maximize and minimize) for granted. These events do affect the application and thus needs to be taken care of. For instance testing backward, forward, refresh etc makes testing a challenging task.&lt;br /&gt;
&lt;br /&gt;
5.	GUI tests can’t be written until you finish the implementation phase. This is an issue considering the fact that there may be contractors developing the GUI who may not be available for testing thus forcing the tester to reverse engineer making life miserable for him.&lt;br /&gt;
&lt;br /&gt;
6.	GUIs involve complex dependencies thereby resulting in a synchronization problem. For example if an application involves two windows one showing a portfolio of your stock market investments and the other making transactions then as soon as you buy a stock the user would like to see it in the portfolio, now for that to happen you need the two windows to be synchronized. With a large number of windows involved with the application the dependencies are extremely complex. Now a user may also want his transaction history window, the order book window etc be synchronized too with the transaction window. This shows the problem of a large number of dependencies which makes synchronization complicated.&lt;br /&gt;
&lt;br /&gt;
7.	There can be many ways a user can reach a point in the application which may be a keyboard shortcut, function keys or mouse movements creating a never ending list of test cases&lt;br /&gt;
&lt;br /&gt;
8.	An infinite input domain problem is an issue wherein a user has an option of clicking anywhere on the window in view and entering data in any order he wishes too. This may result in a n factorial ways of inputting data where n is the number of fields in the GUI application. Greater the n larger the input domain and more the complexity for a tester.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Different Approaches used for GUI Testing===&lt;br /&gt;
&lt;br /&gt;
====MVC Design Pattern====&lt;br /&gt;
&lt;br /&gt;
It is typically more difficult to perform automated tests on code residing in the user interface, and the more logic contained there, the greater the need for automated testing. The solution is the Model View Controller pattern. The basic idea behind this approach is to add a new level of indirection behind the user interface and the domain model with the intention of isolating UI changes and prevent them from requiring changes to the domain logic of the application.&lt;br /&gt;
MVC divides an application into three concerns: &lt;br /&gt;
*Model - Encapsulates core application data and functionality domain logic.&lt;br /&gt;
*View - obtains data from the model and presents it to the user.&lt;br /&gt;
*Controller - receives and translates input to requests on the model or the view.&lt;br /&gt;
It pulls the complex part of the user interface code into a library that can be unit-tested, thus making GUI testing simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Test Stubs====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Capture and Replay Tool====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Guitar GUI Testing Framework====&lt;br /&gt;
&lt;br /&gt;
[http://guitar.sourceforge.net/ GUITAR] is an extensible framework for testing software applications. It presents a unified solution to the software testing problem. [http://guitar.sourceforge.net/ GUITAR’s] architecture allows testers to create new “process plug-ins” (i.e., tools/techniques/algorithms) to perform different testing activities. It currently contains a rich collection of plug-ins that may be used to test an application through its graphical user interface. For example, the “test case generator” plug-in, a tester can automatically generate various types of test cases for the Application Under Test (AUT);  the “replayer” plug-in may be used to execute these test cases on the AUT automatically; during the various development phases of the AUT, the “regression tester” plug-in can be used to efficiently perform regression testing on the AUT.&lt;br /&gt;
&lt;br /&gt;
[[Image:Guitar.jpg|650px|thumb|center|Overview of the [http://guitar.sourceforge.net/ GUITAR Guitar Framework].]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Cucumber====&lt;br /&gt;
&lt;br /&gt;
[http://wiki.github.com/aslakhellesoy/cucumber Cucumber] is a tool that can execute plain-text functional descriptions as automated tests. The language that [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin.] Here is an example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Feature: Search courses&lt;br /&gt;
  In order to ensure better utilization of courses&lt;br /&gt;
  Potential students should be able to search for courses&lt;br /&gt;
&lt;br /&gt;
  Scenario: Search by topic&lt;br /&gt;
    Given there are 240 courses which do not have the topic &amp;quot;biology&amp;quot;&lt;br /&gt;
    And there are 2 courses A001, B205 that each have &amp;quot;biology&amp;quot; as one of the topics&lt;br /&gt;
    When I search for &amp;quot;biology&amp;quot;&lt;br /&gt;
    Then I should see the following courses:&lt;br /&gt;
      | Course code |&lt;br /&gt;
      | A001        |&lt;br /&gt;
      | B205        |&amp;lt;/pre&amp;gt;&lt;br /&gt;
While [http://wiki.github.com/aslakhellesoy/cucumber Cucumber] can be thought of as a “testing” tool, the intent of the tool is to support [http://behaviour-driven.org/ BDD.] This means that the “tests” (plain text feature descriptions with scenarios) are typically written before anything else and verified by business analysts, domain experts, etc. non technical stakeholders. The production code is then written outside-in, to make the stories pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Akimbo</name></author>
	</entry>
</feed>