<?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=Rdflterr</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=Rdflterr"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Rdflterr"/>
	<updated>2026-08-21T15:43:05Z</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_5_rm&amp;diff=29300</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29300"/>
		<updated>2009-11-19T02:10:23Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon [http://en.wikipedia.org/wiki/Abstraction abstractions]. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to [http://www.webopedia.com/TERM/T/tight_coupling.html tight coupling] of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
''[http://www.oodesign.com/dependency-inversion-principle.html Source]''&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionality present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the [http://en.wikipedia.org/wiki/Abstract_type abstract classes]. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: [http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm Template Design Pattern]]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as [http://en.wikipedia.org/wiki/Factory_method_pattern Factory Method], [http://en.wikipedia.org/wiki/Abstract_factory_pattern Abstract Factory], Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle cannot be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
==Appendix==&lt;br /&gt;
*'''Abstraction''' - Abstraction is the process or result of generalization by reducing the information content of a concept or an observable phenomenon, typically to retain only information which is relevant for a particular purpose.&lt;br /&gt;
*'''Tight coupling''' -  tight coupling (or tightly coupled) is a type of coupling that describes a system in which hardware and software are not only linked together, but are also dependant upon each other.&lt;br /&gt;
*'''Factory factory''' - The factory method pattern is an object-oriented design pattern. Like other creational patterns, it deals with the problem of creating objects (products) without specifying the exact class of object that will be created.&lt;br /&gt;
*'''Abstract factory''' - Abstract Factory Pattern provides a way to encapsulate a group of individual factories that have a common theme. In normal usage, the client software creates a concrete implementation of the abstract factory and then uses the generic interfaces to create the concrete objects that are part of the theme.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29285</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29285"/>
		<updated>2009-11-19T02:06:11Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon [http://en.wikipedia.org/wiki/Abstraction abstractions]. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to [http://www.webopedia.com/TERM/T/tight_coupling.html tight coupling] of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
''[http://www.oodesign.com/dependency-inversion-principle.html Source]''&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionality present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the [http://en.wikipedia.org/wiki/Abstract_type abstract classes]. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: [http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm Template Design Pattern]]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as [http://en.wikipedia.org/wiki/Factory_method_pattern Factory Method], [http://en.wikipedia.org/wiki/Abstract_factory_pattern Abstract Factory], Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle cannot be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29274</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29274"/>
		<updated>2009-11-19T02:03:42Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* A design pattern based on dependency inversion policy (Template design pattern) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon [http://en.wikipedia.org/wiki/Abstraction abstractions]. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to [http://www.webopedia.com/TERM/T/tight_coupling.html tight coupling] of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
''[http://www.oodesign.com/dependency-inversion-principle.html Source]''&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionality present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the [http://en.wikipedia.org/wiki/Abstract_type abstract classes]. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: [http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm Template Design Pattern]]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29263</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29263"/>
		<updated>2009-11-19T02:02:14Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Example of Dependency inversion principle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon [http://en.wikipedia.org/wiki/Abstraction abstractions]. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to [http://www.webopedia.com/TERM/T/tight_coupling.html tight coupling] of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
''[http://www.oodesign.com/dependency-inversion-principle.html Source]''&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionality present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: [http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm Template Design Pattern]]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29259</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29259"/>
		<updated>2009-11-19T02:01:22Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon [http://en.wikipedia.org/wiki/Abstraction abstractions]. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to [http://www.webopedia.com/TERM/T/tight_coupling.html tight coupling] of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
''[http://www.oodesign.com/dependency-inversion-principle.html Source]''&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: [http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm Template Design Pattern]]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29249</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29249"/>
		<updated>2009-11-19T01:59:22Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon [http://en.wikipedia.org/wiki/Abstraction abstractions]. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
''[http://www.oodesign.com/dependency-inversion-principle.html Source]''&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: [http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm Template Design Pattern]]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29248</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29248"/>
		<updated>2009-11-19T01:59:05Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon [abstractions http://en.wikipedia.org/wiki/Abstraction]. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
''[http://www.oodesign.com/dependency-inversion-principle.html Source]''&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: [http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm Template Design Pattern]]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29245</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29245"/>
		<updated>2009-11-19T01:58:02Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* A design pattern based on dependency inversion policy (Template design pattern) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
''[http://www.oodesign.com/dependency-inversion-principle.html Source]''&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: [http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm Template Design Pattern]]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29244</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29244"/>
		<updated>2009-11-19T01:57:47Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* A design pattern based on dependency inversion policy (Template design pattern) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
''[http://www.oodesign.com/dependency-inversion-principle.html Source]''&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29232</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29232"/>
		<updated>2009-11-19T01:55:31Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Example of Dependency inversion principle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
''[http://www.oodesign.com/dependency-inversion-principle.html Source]''&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29228</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29228"/>
		<updated>2009-11-19T01:55:04Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Example of Dependency inversion principle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
[Source http://www.oodesign.com/dependency-inversion-principle.html]&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29227</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29227"/>
		<updated>2009-11-19T01:54:51Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Example of Dependency inversion principle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
''[Source http://www.oodesign.com/dependency-inversion-principle.html]''&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29221</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29221"/>
		<updated>2009-11-19T01:54:06Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Example of Dependency inversion principle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
''Source:http://www.oodesign.com/dependency-inversion-principle.html''&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29211</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=29211"/>
		<updated>2009-11-19T01:50:58Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Higher-level components depend upon lower-level components]]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: [http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Relationship diagram]]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28467</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28467"/>
		<updated>2009-11-18T18:47:16Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: Relationship diagram]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28464</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28464"/>
		<updated>2009-11-18T18:43:13Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: Relationship diagram]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Amazing article lots of stuff &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx----pics  in here as well &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[14] Martin, R. C. (1996, May). The Dependency Inversion Principle. C++ Report. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28461</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28461"/>
		<updated>2009-11-18T18:41:59Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: Relationship diagram]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Why call it dependency inversion policy?==&lt;br /&gt;
&lt;br /&gt;
The dependency structure of a well designed object oriented application is &amp;quot;inverted&amp;quot; with respect to the dependency structure that normally results from a &amp;quot;traditional&amp;quot; application which is implemented in a more procedural style. In a procedural application high level modules depend upon low level modules and abstractions depend upon details.&lt;br /&gt;
&lt;br /&gt;
Consider the implications of high level modules that depend upon low level modules. It is the high level modules that contain the important policy decisions and business models of an application. It is these models that contain the identity of the application. Yet, when these modules depend upon the lower level modules, then changes to the lower level modules can have direct effects upon them; and can force them to change.&lt;br /&gt;
It is the high level modules that ought to be forcing the low level modules to change. It is the high level modules that should take precedence over the lower level modules. High level modules simply should not depend upon low level modules in any way. Moreover, it is high level modules that we want to be able to reuse. When high level modules depend upon low level modules, it becomes very difficult to reuse those high level modules in different contexts. However, when the high level modules are independent of the low level modules, then the high level modules can be reused quite simply.&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Amazing article lots of stuff &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx----pics  in here as well &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28446</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28446"/>
		<updated>2009-11-18T18:04:58Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: Relationship diagram]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Benefits and Consequences==&lt;br /&gt;
Dependency Inversion Principle proposes a useful mechanism in decoupling the dependencies between the high and low level components of the system. This not only makes sure that the high level components don't directly depend on the low level components, it also makes sure that the  core functionality with n the application can be more easily reused in other contexts.Applying Dependency Inversion Principle makes it easier for reusing the higher level components, but the negative aspect of this is that it prevents the reuse of low level components. Further Dependency Inversion Principle does account for the reuse of lower-level components by maintaining the client interface in a separate package, assigning ownership of this package to one or more consumers of a lower-level component can itself be problematic.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Amazing article lots of stuff &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx----pics  in here as well &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28436</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28436"/>
		<updated>2009-11-18T17:52:42Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: Relationship diagram]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
 // Dependency Inversion Principle - Good example&lt;br /&gt;
 interface IWorker {&lt;br /&gt;
     public void work();&lt;br /&gt;
 }&lt;br /&gt;
 class Worker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker implements IWorker{&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     IWorker m_worker;&lt;br /&gt;
     public void setWorker(IWorker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Amazing article lots of stuff &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx----pics  in here as well &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28433</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28433"/>
		<updated>2009-11-18T17:49:00Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Example of Dependency inversion principle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: Relationship diagram]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
// Dependency Inversion Principle - Good example&lt;br /&gt;
interface IWorker {&lt;br /&gt;
public void work();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Worker implements IWorker{&lt;br /&gt;
public void work() {&lt;br /&gt;
// ....working&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class SuperWorker implements IWorker{&lt;br /&gt;
public void work() {&lt;br /&gt;
//.... working much more&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Manager {&lt;br /&gt;
IWorker m_worker;&lt;br /&gt;
&lt;br /&gt;
public void setWorker(IWorker w) {&lt;br /&gt;
m_worker=w;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public void manage() {&lt;br /&gt;
m_worker.work();&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Amazing article lots of stuff &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx----pics  in here as well &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28432</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28432"/>
		<updated>2009-11-18T17:48:35Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Example of Dependency inversion principle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: Relationship diagram]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
#Manager class should not be changed.&lt;br /&gt;
#Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
#No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
// Dependency Inversion Principle - Good example&lt;br /&gt;
interface IWorker {&lt;br /&gt;
public void work();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Worker implements IWorker{&lt;br /&gt;
public void work() {&lt;br /&gt;
// ....working&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class SuperWorker implements IWorker{&lt;br /&gt;
public void work() {&lt;br /&gt;
//.... working much more&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Manager {&lt;br /&gt;
IWorker m_worker;&lt;br /&gt;
&lt;br /&gt;
public void setWorker(IWorker w) {&lt;br /&gt;
m_worker=w;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public void manage() {&lt;br /&gt;
m_worker.work();&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Amazing article lots of stuff &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx----pics  in here as well &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28431</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28431"/>
		<updated>2009-11-18T17:48:05Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: Relationship diagram]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==Example of Dependency inversion principle==&lt;br /&gt;
 // Dependency Inversion Principle - Bad example&lt;br /&gt;
 class Worker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     // ....working&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 class Manager {&lt;br /&gt;
     Worker m_worker;&lt;br /&gt;
     public void setWorker(Worker w) {&lt;br /&gt;
         m_worker=w;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     public void manage() {&lt;br /&gt;
         m_worker.work();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 class SuperWorker {&lt;br /&gt;
     public void work() {&lt;br /&gt;
     //.... working much more&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code shown below implements the code above using Dependency Inversion principle.This helps us in solving the following problems.&lt;br /&gt;
1.Manager class should not be changed.&lt;br /&gt;
2.Minimized risk to affect old funtionallity present in Manager class.&lt;br /&gt;
3.No need to redone the unit testing for Manager class.&lt;br /&gt;
&lt;br /&gt;
// Dependency Inversion Principle - Good example&lt;br /&gt;
interface IWorker {&lt;br /&gt;
public void work();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Worker implements IWorker{&lt;br /&gt;
public void work() {&lt;br /&gt;
// ....working&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class SuperWorker implements IWorker{&lt;br /&gt;
public void work() {&lt;br /&gt;
//.... working much more&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Manager {&lt;br /&gt;
IWorker m_worker;&lt;br /&gt;
&lt;br /&gt;
public void setWorker(IWorker w) {&lt;br /&gt;
m_worker=w;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public void manage() {&lt;br /&gt;
m_worker.work();&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Amazing article lots of stuff &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx----pics  in here as well &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28429</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28429"/>
		<updated>2009-11-18T17:44:05Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* A design pattern based on dependency inversion policy (Template design pattern) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: Relationship diagram]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern. There are method calls to operation1() and operation2(). The definition of these methods are defined in the subclass which override them.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Amazing article lots of stuff &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx----pics  in here as well &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Wiki3_5_rm3.png&amp;diff=28425</id>
		<title>File:Wiki3 5 rm3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Wiki3_5_rm3.png&amp;diff=28425"/>
		<updated>2009-11-18T17:40:28Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28424</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28424"/>
		<updated>2009-11-18T17:40:13Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: Relationship diagram]]&lt;br /&gt;
As one can see in the above figure the component B doesn't depend on A but rather depends on the interface that is also used by A. The same relationship is additionally shown between components B and C. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior. It is this association of the interface with the client component which logically inverts the conventional dependency flow.&lt;br /&gt;
&lt;br /&gt;
==A design pattern based on dependency inversion policy (Template design pattern)==&lt;br /&gt;
The Template Design pattern implements the Dependency Inversion Principle by setting up the outline or skeleton of an algorithm, leaving the details to be implemented by the classes or modules implementing it. This way, the sub classes will be getting there information from the abstract classes. Further these abstract classes are not dependent on the details while the vice versa is true. The UML diagram below gives you better understanding of the Template design pattern.&lt;br /&gt;
[[Image:wiki3_5_rm3.png|450px|thumb|center|Figure 3: Template Design Pattern]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Amazing article lots of stuff &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx----pics  in here as well &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28415</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28415"/>
		<updated>2009-11-18T17:30:26Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: Relationship diagram]]&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Amazing article lots of stuff &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx----pics  in here as well &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/ &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28414</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28414"/>
		<updated>2009-11-18T17:29:50Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: Relationship diagram]]&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1] http://www.objectmentor.com/resources/articles/dip.pdf&lt;br /&gt;
[2] http://www.ctrl-shift-b.com/2008/12/examining-dependency-inversion.html Amazing article lots of stuff&lt;br /&gt;
[3] http://blogs.imeta.co.uk/jyoung/archive/2008/12/17/540.aspx----pics  in here as well&lt;br /&gt;
[4] http://en.wikipedia.org/wiki/Dependency_inversion_principle&lt;br /&gt;
[5] http://www.lostechies.com/blogs/gabrielschenker/archive/2009/01/30/the-dependency-inversion-principle.aspx&lt;br /&gt;
[6] http://www.oodesign.com/dependency-inversion-principle.html&lt;br /&gt;
[7] http://www.eventhelix.com/realtimemantra/Object_Oriented/dependency_inversion_principle.htm&lt;br /&gt;
[8] http://davidhayden.com/blog/dave/archive/2005/06/10/1261.aspx&lt;br /&gt;
[9] http://doodleproject.sourceforge.net/articles/2001/dependencyInversionPrinciple.html&lt;br /&gt;
[10] http://stackoverflow.com/questions/62539/what-is-the-dependency-inversion-principle-and-why-is-it-important&lt;br /&gt;
[11] http://www.surfscranton.com/architecture/DIPandOCP/img0.html&lt;br /&gt;
[12] http://iface.wordpress.com/2006/03/16/dependency-inversion-principle-and-interface/&lt;br /&gt;
[13] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/TemplatePattern.htm&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Wiki3_5_rm2.png&amp;diff=28413</id>
		<title>File:Wiki3 5 rm2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Wiki3_5_rm2.png&amp;diff=28413"/>
		<updated>2009-11-18T17:26:54Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28412</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28412"/>
		<updated>2009-11-18T17:26:38Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;br /&gt;
&lt;br /&gt;
From the above diagram we see that the component A depends on component B, which in turn depends on component C. These dependencies make the higher level modules or components more complex and inflexible. This also leads to tight coupling of higher and lower level components. Thus reducing the over all flexibility of the system.&lt;br /&gt;
&lt;br /&gt;
The primary motive of the ''dependency inversion principle'' is to decouple the high level components from their dependency on the low level components of the system. This can be obtained by creating  interfaces as a part of the higher level component package which define the components for the extra functionality required. This protects the component from depending on any specific implementation of the provided interface/functionality. Thus making the given function more portable.&lt;br /&gt;
The above example can be restructured as follows&lt;br /&gt;
&lt;br /&gt;
[[Image:wiki3_5_rm2.png|450px|thumb|center|Figure 2: Relationship diagram]]&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This principle is applied to make sure that the high level classes are not directly dependent on the low level classes, they are doing that using either by interfaces or abstract classes.In that case the creation of new low level objects inside the high level classes(if necessary) can not be done using the operator new. Instead, some of the Creational design patterns can be used, such as Factory Method, Abstract Factory, Prototype.&lt;br /&gt;
Of course, using this principle implies an increased effort and a more complex code, but more flexible. This principle can not be applied for every class or every module. If we have a class functionality that is more likely to remain unchanged in the future there is not need to apply this principle.When a component does not depend on lower level components directly but only through abstractions this component is mobile that is, the component is reusable in many different contexts.&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Wiki3_5_rm1.png&amp;diff=28409</id>
		<title>File:Wiki3 5 rm1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Wiki3_5_rm1.png&amp;diff=28409"/>
		<updated>2009-11-18T17:21:34Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28408</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28408"/>
		<updated>2009-11-18T17:21:20Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
The Dependency Inversion Principle is defined as follows:&lt;br /&gt;
&lt;br /&gt;
#High-level modules should not depend upon low-level modules. Both should depend upon abstractions.&lt;br /&gt;
#Abstractions should not depend upon details. Details should depend upon abstractions.&lt;br /&gt;
&lt;br /&gt;
The problem with the conventional design architecture is that the higher level components depends on the lower level components. This can be understood from the diagram below.&lt;br /&gt;
[[Image:wiki3_5_rm1.png|450px|thumb|center|Figure 1: Higher-level components depend upon lower-level components]]&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28406</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28406"/>
		<updated>2009-11-18T17:16:13Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Dependency Inversion policy=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Dependency Inversion Principle has been proposed by Robert C. Martin. It states that:&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
The principle is reverse the conventional philosophy of high level functions in softwares need to depend on the low level functions. &lt;br /&gt;
The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions. Further it also states that these abstractions should not depend on the details and inversely the details should depend on the abstractions.&lt;br /&gt;
According to this principle the way of designing a class structure is to start from high level modules to the low level modules:&lt;br /&gt;
&lt;br /&gt;
'''High Level Classes → Abstraction Layer → Low Level Classes'''&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28405</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 5 rm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_5_rm&amp;diff=28405"/>
		<updated>2009-11-18T17:07:19Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Dependency Inversion policy&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26316</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26316"/>
		<updated>2009-10-15T03:32:26Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* 7. jRapture: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests is that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests till the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools](Example provided in the appendix), and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen. Using manual tools to mimic the   usage of the GUI only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Rip the GUI structure of the AUT : To begin testing an application, the tester first needs to determine the GUI structure of the AUT. Running the Ripper applications on the AUT automatically does this. Types of rippers are available for analyzing the AUT. For analyzing an AUT developed using&lt;br /&gt;
**Java use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/JavaGUIRipper.htm JavaGUIRipper]&lt;br /&gt;
**Native Win32 use [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/GUIRipper.htm Windows GUI Ripper]&lt;br /&gt;
&lt;br /&gt;
*Generate the Event Flow Graph : The Event Flow Graph is generated from the GUI structure, ripped in the above step. The EFGGenerator generates the event-flow graph for an AUT’s GUI. To see how to analyzes a window-based application and understand its GUI integration tree. This is explained in detail [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/EFGGenerator.htm here]&lt;br /&gt;
&lt;br /&gt;
*Generate Test cases : To generate testcases from the event flow graphs use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/TCGenerator.htm TCGenerator]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases : &lt;br /&gt;
&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example [http://wiki.github.com/aslakhellesoy/cucumber source]:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
===7. jRapture:===&lt;br /&gt;
jRapture is a tool for capturing and replying Java program execution in the field.This works with the Java binaries and the Java virtual machine. It employs a lightweight , transparent capture process that permits unobtrusive of a Java programs executions. jRapture captures the interactions between a Java program and the system, which includes GUI.It has a profiling interface that permits a Java program to be instrumented for profiling after its executions have been captured.Using an XML-based profiling specification language a tester can specify various forms of profiling to be carried out during replay.&lt;br /&gt;
&lt;br /&gt;
[[Image:jRapture.jpg|450px|thumb|center|Figure 1:[http://portal.acm.org/citation.cfm?id=348993 Future API Modifications]]]&lt;br /&gt;
&lt;br /&gt;
==Appendix==&lt;br /&gt;
*'''ScreenScrapper''' - Software that automatically extracts data from interactive screens without user intervention.&lt;br /&gt;
*'''Regression testing''' - Regression testing is any type of software testing that seeks to uncover software regressions. Such regressions occur whenever previously working software functionality stops working as intended&lt;br /&gt;
*'''Test harness''' - In software testing, a test harness or automated test framework is a collection of software and test data configured to test a program unit by running it under varying conditions and monitoring its behavior and outputs. &lt;br /&gt;
*'''Model-based testing''' - Model-based testing is software testing in which test cases are derived in whole or in part from a model that describes some (usually functional) aspects of the system under test (SUT).&lt;br /&gt;
*'''WinRunner''' - WinRunner is an automated functional GUI testing tool that allows a user to record and play back UI interactions as test scripts.&lt;br /&gt;
*'''Abbot framework''' - The Abbot framework is a Java library that provides methods to reproduce user actions and examine the state of GUI components.&lt;br /&gt;
*'''Rational Robot''' - Rational Robot is a test automation tool for functional testing of client/server applications.&lt;br /&gt;
*'''Reverse engineering''' - Reverse engineering (RE) is the process of discovering the technological principles of a device, object or system through analysis of its structure, function and operation.&lt;br /&gt;
*'''Ontology''' -  a rigorous and exhaustive organization of some knowledge domain that is usually hierarchical and contains all the relevant entities and their relations.&lt;br /&gt;
*'''Unified Modeling Language''' - Unified Modeling Language is the industry-standard language for the specification, visualization, construction, and documentation of the components of software systems. UML helps to simplify the process of software design, making a model for construction with a number of different views.&lt;br /&gt;
*'''Use case''' - A use case in software engineering and systems engineering is a description of a system’s behavior as it responds to a request that originates from outside of that system. &lt;br /&gt;
*'''Activity diagram''' - Activity diagrams are diagram technique showing workflows of stepwise activities and actions, with support for choice, iteration and concurrency.&lt;br /&gt;
*'''Flow graph''' - A control flow graph (CFG) in computer science is a representation, using graph notation, of all paths that might be traversed through a program during its execution.&lt;br /&gt;
*'''GUITAR''' - GUITAR is a suite of models, components, and tools for automated testing of software applications that have a Graphical User Interface (GUI) front-end.&lt;br /&gt;
*'''Application under test''' -  refers to a system that is being tested for correct operation. The term is used mostly in software testing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26312</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26312"/>
		<updated>2009-10-15T03:28:57Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests is that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests till the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools](Example provided in the appendix), and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen. Using manual tools to mimic the   usage of the GUI only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Rip the GUI structure of the AUT : To begin testing an application, the tester first needs to determine the GUI structure of the AUT. Running the Ripper applications on the AUT automatically does this. Types of rippers are available for analyzing the AUT. For analyzing an AUT developed using&lt;br /&gt;
**Java use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/JavaGUIRipper.htm JavaGUIRipper]&lt;br /&gt;
**Native Win32 use [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/GUIRipper.htm Windows GUI Ripper]&lt;br /&gt;
&lt;br /&gt;
*Generate the Event Flow Graph : The Event Flow Graph is generated from the GUI structure, ripped in the above step. The EFGGenerator generates the event-flow graph for an AUT’s GUI. To see how to analyzes a window-based application and understand its GUI integration tree. This is explained in detail [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/EFGGenerator.htm here]&lt;br /&gt;
&lt;br /&gt;
*Generate Test cases : To generate testcases from the event flow graphs use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/TCGenerator.htm TCGenerator]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases : &lt;br /&gt;
&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example [http://wiki.github.com/aslakhellesoy/cucumber source]:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
===7. jRapture:===&lt;br /&gt;
jRapture is a tool for capturing and replying Java program execution in the field.This works with the Java binaries and the Java virtual machine. It employs a lightweight , transparent capture process that permits unobtrusive of a Java programs executions. jRapture captures the interactions between a Java program and the system, which includes GUI.It has a profiling interface that permits a Java program to be instrumented for profiling after its executions have been captured.Using an XML-based profiling specification language a tester can specify various forms of profiling to be carried out during replay.&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
==Appendix==&lt;br /&gt;
*'''ScreenScrapper''' - Software that automatically extracts data from interactive screens without user intervention.&lt;br /&gt;
*'''Regression testing''' - Regression testing is any type of software testing that seeks to uncover software regressions. Such regressions occur whenever previously working software functionality stops working as intended&lt;br /&gt;
*'''Test harness''' - In software testing, a test harness or automated test framework is a collection of software and test data configured to test a program unit by running it under varying conditions and monitoring its behavior and outputs. &lt;br /&gt;
*'''Model-based testing''' - Model-based testing is software testing in which test cases are derived in whole or in part from a model that describes some (usually functional) aspects of the system under test (SUT).&lt;br /&gt;
*'''WinRunner''' - WinRunner is an automated functional GUI testing tool that allows a user to record and play back UI interactions as test scripts.&lt;br /&gt;
*'''Abbot framework''' - The Abbot framework is a Java library that provides methods to reproduce user actions and examine the state of GUI components.&lt;br /&gt;
*'''Rational Robot''' - Rational Robot is a test automation tool for functional testing of client/server applications.&lt;br /&gt;
*'''Reverse engineering''' - Reverse engineering (RE) is the process of discovering the technological principles of a device, object or system through analysis of its structure, function and operation.&lt;br /&gt;
*'''Ontology''' -  a rigorous and exhaustive organization of some knowledge domain that is usually hierarchical and contains all the relevant entities and their relations.&lt;br /&gt;
*'''Unified Modeling Language''' - Unified Modeling Language is the industry-standard language for the specification, visualization, construction, and documentation of the components of software systems. UML helps to simplify the process of software design, making a model for construction with a number of different views.&lt;br /&gt;
*'''Use case''' - A use case in software engineering and systems engineering is a description of a system’s behavior as it responds to a request that originates from outside of that system. &lt;br /&gt;
*'''Activity diagram''' - Activity diagrams are diagram technique showing workflows of stepwise activities and actions, with support for choice, iteration and concurrency.&lt;br /&gt;
*'''Flow graph''' - A control flow graph (CFG) in computer science is a representation, using graph notation, of all paths that might be traversed through a program during its execution.&lt;br /&gt;
*'''GUITAR''' - GUITAR is a suite of models, components, and tools for automated testing of software applications that have a Graphical User Interface (GUI) front-end.&lt;br /&gt;
*'''Application under test''' -  refers to a system that is being tested for correct operation. The term is used mostly in software testing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26298</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26298"/>
		<updated>2009-10-15T03:09:32Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Some problems of GUI testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests is that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests till the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools](Example provided in the appendix), and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen. Using manual tools to mimic the   usage of the GUI only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Rip the GUI structure of the AUT : To begin testing an application, the tester first needs to determine the GUI structure of the AUT. Running the Ripper applications on the AUT automatically does this. Types of rippers are available for analyzing the AUT. For analyzing an AUT developed using&lt;br /&gt;
**Java use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/JavaGUIRipper.htm JavaGUIRipper]&lt;br /&gt;
**Native Win32 use [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/GUIRipper.htm Windows GUI Ripper]&lt;br /&gt;
&lt;br /&gt;
*Generate the Event Flow Graph : The Event Flow Graph is generated from the GUI structure, ripped in the above step. The EFGGenerator generates the event-flow graph for an AUT’s GUI. To see how to analyzes a window-based application and understand its GUI integration tree. This is explained in detail [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/EFGGenerator.htm here]&lt;br /&gt;
&lt;br /&gt;
*Generate Test cases : To generate testcases from the event flow graphs use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/TCGenerator.htm TCGenerator]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases : &lt;br /&gt;
&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example [http://wiki.github.com/aslakhellesoy/cucumber source]:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26267</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26267"/>
		<updated>2009-10-15T02:29:48Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Tools for GUI testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests is that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests till the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen. Using manual tools to mimic the   usage of the GUI only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Rip the GUI structure of the AUT : To begin testing an application, the tester first needs to determine the GUI structure of the AUT. Running the Ripper applications on the AUT automatically does this. Types of rippers are available for analyzing the AUT. For analyzing an AUT developed using&lt;br /&gt;
**Java use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/JavaGUIRipper.htm JavaGUIRipper]&lt;br /&gt;
**Native Win32 use [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/GUIRipper.htm Windows GUI Ripper]&lt;br /&gt;
&lt;br /&gt;
*Generate the Event Flow Graph : The Event Flow Graph is generated from the GUI structure, ripped in the above step. The EFGGenerator generates the event-flow graph for an AUT’s GUI. To see how to analyzes a window-based application and understand its GUI integration tree. This is explained in detail [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/EFGGenerator.htm here]&lt;br /&gt;
&lt;br /&gt;
*Generate Test cases : To generate testcases from the event flow graphs use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/TCGenerator.htm TCGenerator]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases : &lt;br /&gt;
&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example [http://wiki.github.com/aslakhellesoy/cucumber source]:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26266</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26266"/>
		<updated>2009-10-15T02:28:20Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Tools for GUI testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests is that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests till the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen. Using manual tools to mimic the   usage of the GUI only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Rip the GUI structure of the AUT : To begin testing an application, the tester first needs to determine the GUI structure of the AUT. Running the Ripper applications on the AUT automatically does this. Types of rippers are available for analyzing the AUT. For analyzing an AUT developed using&lt;br /&gt;
 Java use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/JavaGUIRipper.htm JavaGUIRipper]&lt;br /&gt;
 Native Win32 use [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/GUIRipper.htm Windows GUI Ripper]&lt;br /&gt;
&lt;br /&gt;
*Generate the Event Flow Graph : The Event Flow Graph is generated from the GUI structure, ripped in the above step. The EFGGenerator generates the event-flow graph for an AUT’s GUI. To see how to analyzes a window-based application and understand its GUI integration tree. This is explained in detail [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/EFGGenerator.htm here]&lt;br /&gt;
&lt;br /&gt;
*Generate Test cases : To generate testcases from the event flow graphs use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/TCGenerator.htm TCGenerator]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases : &lt;br /&gt;
&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example [http://wiki.github.com/aslakhellesoy/cucumber source]:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26265</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26265"/>
		<updated>2009-10-15T02:25:41Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Tools for GUI testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests is that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests till the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen. Using manual tools to mimic the   usage of the GUI only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Rip the GUI structure of the AUT&lt;br /&gt;
To begin testing an application, the tester first needs to determine the GUI structure of the AUT. Running the Ripper applications on the AUT automatically does this. Types of rippers are available for analyzing the AUT. For analyzing an AUT developed using&lt;br /&gt;
**Java use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/JavaGUIRipper.htm JavaGUIRipper]&lt;br /&gt;
**Native Win32 use [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/GUIRipper.htm Windows GUI Ripper]&lt;br /&gt;
&lt;br /&gt;
*Generate the Event Flow Graph&lt;br /&gt;
The Event Flow Graph is generated from the GUI structure, ripped in the above step. The EFGGenerator generates the event-flow graph for an AUT’s GUI. To see how to analyzes a window-based application and understand its GUI integration tree. This is explained in detail [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/EFGGenerator.htm here]&lt;br /&gt;
&lt;br /&gt;
*Generate Test cases&lt;br /&gt;
To generate testcases from the event flow graphs use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/TCGenerator.htm TCGenerator]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example [http://wiki.github.com/aslakhellesoy/cucumber source]:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26262</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26262"/>
		<updated>2009-10-15T02:20:02Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* 1. GUITAR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests is that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests till the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen. Using manual tools to mimic the   usage of the GUI only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Rip the GUI structure of the AUT&lt;br /&gt;
To begin testing an application, the tester first needs to determine the GUI structure of the AUT. Running the Ripper applications on the AUT automatically does this.&lt;br /&gt;
 &lt;br /&gt;
Types of rippers are available for analyzing the AUT. &lt;br /&gt;
For analyzing an AUT developed using&lt;br /&gt;
**Java use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/JavaGUIRipper.htm JavaGUIRipper]&lt;br /&gt;
**Native Win32 use [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/GUIRipper.htm Windows GUI Ripper]&lt;br /&gt;
&lt;br /&gt;
*Generate the Event Flow Graph&lt;br /&gt;
The Event Flow Graph is generated from the GUI structure, ripped in the above step. The EFGGenerator generates the event-flow graph for an AUT’s GUI. To see how to analyzes a window-based application and understand its GUI integration tree. This is explained in detail [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/EFGGenerator.htm here]&lt;br /&gt;
&lt;br /&gt;
*Generate Test cases&lt;br /&gt;
To generate testcases from the event flow graphs use the [http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/TCGenerator.htm TCGenerator]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example [http://wiki.github.com/aslakhellesoy/cucumber source]:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26002</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=26002"/>
		<updated>2009-10-14T16:26:42Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests is that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests till the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen. Using manual tools to mimic the   usage of the GUI only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example [http://wiki.github.com/aslakhellesoy/cucumber source]:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25997</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25997"/>
		<updated>2009-10-14T16:10:02Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* 6. Cucumber: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests is that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests till the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen. Using manual tools to mimic the   usage of the GUI only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example [http://wiki.github.com/aslakhellesoy/cucumber source]:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25489</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25489"/>
		<updated>2009-10-10T03:01:22Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Some problems of GUI testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests is that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests till the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen. Using manual tools to mimic the   usage of the GUI only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25486</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25486"/>
		<updated>2009-10-10T03:00:46Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Some problems of GUI testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests is that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests till the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen. Using manual tools to mimic the   usage of the GUI, only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25483</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25483"/>
		<updated>2009-10-10T02:58:58Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* Some problems of GUI testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests is that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests till the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen using manual tools to mimic the   usage of the GUI, only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25473</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25473"/>
		<updated>2009-10-10T02:53:48Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* 1. GUITAR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests are that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests ill the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen using manual tools to mimic the   usage of the GUI, only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25472</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25472"/>
		<updated>2009-10-10T02:53:13Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* 5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests are that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests ill the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen using manual tools to mimic the   usage of the GUI, only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage when no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project which helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25468</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25468"/>
		<updated>2009-10-10T02:50:18Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* 3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests are that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests ill the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen using manual tools to mimic the   usage of the GUI, only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system.&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage upon no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project which helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25467</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25467"/>
		<updated>2009-10-10T02:50:05Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* 3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests are that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests ill the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen using manual tools to mimic the   usage of the GUI, only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage upon no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project which helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25465</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 10 mk</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_10_mk&amp;diff=25465"/>
		<updated>2009-10-10T02:49:29Z</updated>

		<summary type="html">&lt;p&gt;Rdflterr: /* 2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GUI Testing Frameworks=&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
Most software developed in recent years has a graphical user interface (GUI). The only way for the end-user to interact with the software application is through the GUI. Hence, acceptance and system testing of the software requires GUI testing.  In this wiki we aim at covering the different approaches, including patterns and tools for GUI testing.&lt;br /&gt;
&lt;br /&gt;
==Some problems of GUI testing==&lt;br /&gt;
*GUIs are tested manually, often by the developers themselves. This is very unreliable and expensive. For new GUIs or those being significantly changed, quality is low, and failures at integration time or during user acceptance tests are common. &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping ScreenScrapper] based GUI test does a nice job but to a certain extent. Even though they are cheap, the problem with these tests are that if you change the screen layout all existing tests become useless, which means you have no [http://en.wikipedia.org/wiki/Regression_testing regression tests]. Another problem here is that test creators can't start writing tests ill the GUIs are finished. Example: [http://en.wikipedia.org/wiki/Test_harness test harnesses], [http://www.citeulike.org/user/V/article/2682599 capture/replay tools], and [http://en.wikipedia.org/wiki/Model-based_testing model-based methods]&lt;br /&gt;
*The user has an extremely wide choice of actions. The user could click on any pixel on the screen using manual tools to mimic the   usage of the GUI, only provides limited testing.&lt;br /&gt;
*There are tools which try to capture [http://en.wikipedia.org/wiki/GUI_widget GUI widgets] rather than mouse coordinates. These tools, however, require a significant amount of manual effort to be effective, including developing test scripts and manually detecting failures.Modifications to the GUI require changes to the scripts as well. Example: [http://en.wikipedia.org/wiki/HP_WinRunner Winrunner], [http://www.testingfaqs.org/t-gui.html#Abbot Abbot], and [http://www-01.ibm.com/software/awdtools/tester/robot/index.html Rational Robot]&lt;br /&gt;
&lt;br /&gt;
==Approaches for GUI testing==&lt;br /&gt;
&lt;br /&gt;
===1. An Ontology-Based Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2009.92]===&lt;br /&gt;
&lt;br /&gt;
In the approach an GUI testing [http://en.wikipedia.org/wiki/Ontology ontology] is established by analyzing the source code with [http://en.wikipedia.org/wiki/Reverse_engineering reverse engineering] techniques. Then from the user experience the generation rules are extracted to create test cases. GUI testing is proposed for the purpose of making use of the knowledge provided by GUI systems and testers’ experience. GUI ontology is used to store potential&lt;br /&gt;
information in a GUI system, while test case generation rules extract useful information from testers’ experience. In a word, ontology based GUI testing is a new branch of software testing, which not only takes the knowledge intensive features of GUI testing into account, but also sufficiently make use of them.&lt;br /&gt;
&lt;br /&gt;
===2. Automation of GUI testing using a model-driven approach [http://portal.acm.org/citation.cfm?id=1138932]===&lt;br /&gt;
In this approach the generated test cases are based on [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modelling Language]. This introduces data into the UML model via the [http://portal.acm.org/citation.cfm?id=62964 Category-Partition method]. The functions that have to be tested are specified using the [http://en.wikipedia.org/wiki/Use_case use cases] and [http://en.wikipedia.org/wiki/Activity_diagram activity diagrams]. This also specifies how they have to be tested. A combination like this has the potential to generate large number of test cases.The test can be managed in two ways.Firstly the Category-partitioned data which allows the designer full control over the possible and impossible paths for the system to run.Secondly automation allows different configuration for both data and graph coverage.Using all this we can generate test scripts which can be used for GUI testing.&lt;br /&gt;
&lt;br /&gt;
[[Image:usecase.png|450px|thumb|center|Figure 1:Example Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
===3. Plan Generation GUI testing [http://www.cs.virginia.edu/~soffa/research/SE/AIPS00.pdf]===&lt;br /&gt;
This is based on the AI techniques, for partially automating GUI testing.In this method of the testing the tester specifies the initial and the final goal states for the users of the system.The automated system produces a set of sequences or plans which will start with the initial state and end with the final state specified by the user. Each of the plans generated will represent a test case of a user of the system&lt;br /&gt;
&lt;br /&gt;
===4. A practical approach to testing GUI systems [http://www.springerlink.com/content/d08681k5081553r7/]===&lt;br /&gt;
In this approach, GUI is divided into two tires. One the component and other the system. [http://en.wikipedia.org/wiki/Control_flow_graph Flow graphs] will be created for each GUI component. The flow graph represents a set of preconditions, event sequences and post conditions of the corresponding component. On the system tire we build a viewpoint by integrating the components of the system. This will ensure that the components are working fine and are interacting as required. This is a simple, effective and practical method of performing GUI testing.&lt;br /&gt;
&lt;br /&gt;
===5. A Dynamic Partitioning Approach for GUI Testing [http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94]===&lt;br /&gt;
The above approaches specify how to generate the test cases without actually specifying how to run them. This approach specifies how the test cases have to run in order to make GUI testing effective and useful. Th GUI primitive actions are partitioned into two classes. They are prioritized primitive actions and non-prioritized primitive actions.  This further divides the testing into two stages which contains two feed back loops.The first stage prioritizes primitive actions and the second stage selects and performs prioritized primitive actions. The first feedback loop is local and occurs in the second stage, which adjusts the memberships of primitive actions after they are performed. The second feedback loop is global and occurs between the first and second stages. It switches GUI testing from the second stage to the first stage upon no prioritized primitive actions are available. The two testing experiments with real GUI applications show that the proposed dynamic partitioning approach can really work in practice and may significantly outperform the random testing approach.&lt;br /&gt;
&lt;br /&gt;
==Tools for GUI testing==&lt;br /&gt;
===1. GUITAR===&lt;br /&gt;
The [http://guitar.sourceforge.net/ GUITAR] (GUI Testing frAmewoRk) project which helps in simplifying GUI testing by automatically creating test cases that intelligently challenge a GUI's functionality. 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|figure 1:[http://guitar.sourceforge.net/ Guitar Framework]]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to test the GUI of the AUT, the tester has to perform a certain set of steps. These steps are detailed below&lt;br /&gt;
*Initialize configurations in GUITAR for the AUT. This can be done using the below window&lt;br /&gt;
[[Image:guitar1.jpg|650px|thumb|center|figure 2:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Initialise Preferences window for initializing the application type]]]&lt;br /&gt;
&lt;br /&gt;
*Replay the Testcases&lt;br /&gt;
[[Image:guitar2.jpg|650px|thumb|center|figure 3:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Replayer Testcase execution]]]&lt;br /&gt;
&lt;br /&gt;
*Coverage Evaluation&lt;br /&gt;
Execute the coverage evaluator to analyze the coverage generated when the testcases were executed on the instrumented AUT. A coverage report is generated by the instrumented code, when the testcases are replayed on it. The coverage evaluator analyzes this report and a summary report is generated.&lt;br /&gt;
[[Image:guitar3.jpg|650px|thumb|center|figure 4:[http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Coverager Running the coverage evaluator]]]&lt;br /&gt;
&lt;br /&gt;
===2. Planning Assisted Tester for grapHical user interface Systems (PATHS)===&lt;br /&gt;
This is based on the event interaction sequences. This tests the GUI software using interactions which are mostly likely to be used in actual scenarios. This accepts an operator, initial state and a final state, with which the planning sequence produces a series of sequences which transforms the system form the initial state to the final state. The GUI tester can use this to generate interactions sequences by specifying the final state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===3. GUIdancer===&lt;br /&gt;
[http://www.bredex.de/en/guidancer/first.html GUIdancer] is an [http://en.wikipedia.org/wiki/Eclipse_(software) Eclipse]-based automated GUI test-tool which runs as a standalone application or as an Eclipse Plugin.  &lt;br /&gt;
&lt;br /&gt;
GUIdancer is different from other GUI test-tools because automated tests can be written before the Application Under Test (AUT) is ready. This means that GUIdancer is not a tool which tests an application by recording user actions and replaying them. Tests can be created from the requirements without access to the AUT, and involve no programming, script or code. GUIdancer tests can be created, run and maintained without support from automation experts.&lt;br /&gt;
&lt;br /&gt;
Each Test Step (the smallest unit in GUIdancer) consists of three pieces of information chosen from interactive dialogs: the GUI-component to be tested, the action to execute on this component, and the parameters (or data) the action requires. A Test Step to enter “hello” into a text field would look like this:&lt;br /&gt;
&lt;br /&gt;
 * GUI-component: Text field&lt;br /&gt;
 * Action: Enter Text&lt;br /&gt;
 * Parameter: Hello&lt;br /&gt;
&lt;br /&gt;
===4. SeliniumHQ===&lt;br /&gt;
[http://seleniumhq.org/ Selenium] is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.&lt;br /&gt;
'''How Selenium Works'''&lt;br /&gt;
&lt;br /&gt;
[[Image:selenium.png|650px|thumb|center|Figure 1:[http://seleniumhq.org/about/how.html How Selenium Works]]]&lt;br /&gt;
&lt;br /&gt;
===6. Cucumber:===&lt;br /&gt;
Cucumber is a tool that can execute plain-text functional descriptions as automated tests. The language that Cucumber understands is called [http://wiki.github.com/aslakhellesoy/cucumber/gherkin Gherkin]. Here is an example:&lt;br /&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        |&lt;br /&gt;
&lt;br /&gt;
Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby or other languages including but not limited to Java, C# and Python. Cucumber only requires minimal use of Ruby programming and Ruby is easy, so don’t be afraid even if the code you’re developing in is not Ruby.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
In summary, GUI testing is a complicated task. Systematic test design helps us to focus on the important tests and gives us an objective way of addressing risks. Tools are appropriate for many but not all tests and a staged approach to testing enables us to identify which tests to automate much more easily. Tools can therefore be used to detect errors pro-actively as well as to execute regression tests. &lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[1] http://c2.com/cgi/wiki?GuiTesting &amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://chandlerproject.org/Journal/AutomatedGuiTestingProject &amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/GUI_software_testing &amp;lt;br&amp;gt;&lt;br /&gt;
[4] http://www.open-xchange.com/wiki/index.php?title=Automated_GUI_Tests &amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://agilistas.org/presentations/codecamp06/ &amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.ranorex.com/?gclid=CNvA_YnesJ0CFchW2godpT5YrQ &amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.gerrardconsulting.com/GUI/TestGui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://www.slideshare.net/rpires/GUI-Test-Patterns &amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://en.wikipedia.org/wiki/List_of_GUI_testing_tools &amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.junit.org/taxonomy/term/6 &amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://www.cs.umd.edu/~atif/papers/MemonSQW2000.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://www.testingfaqs.org/t-gui.html &amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://www.springerlink.com/content/d08681k5081553r7/ &amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.cs.umd.edu/~atif/GUITAR-distribution/manuals/Perform%20Tests%20on%20the%20AUT.htm#Rip &amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://seleniumhq.org/ &amp;lt;br&amp;gt;&lt;br /&gt;
[16] http://www2.computer.org/portal/web/csdl/doi/10.1109/COMPSAC.2006.94&lt;/div&gt;</summary>
		<author><name>Rdflterr</name></author>
	</entry>
</feed>