SWAT: Simple Web Automation Tool - ulti-swat

heavyweightuttermostΜηχανική

5 Νοε 2013 (πριν από 3 χρόνια και 10 μήνες)

97 εμφανίσεις

SWAT: Simple Web
Automation Toolkit

What is SWAT?


The Simple Web Automation Toolkit
(SWAT) is a library written in C# designed
to provide an interface to interact with
several different web browsers.



SWAT also includes components to
integrate with Fitnesse allowing Q/A
engineers to automate web app testing.

Demo 1


Test Goal


Confirm “Manifesto for Agile Software Development”
is still present


Demonstrate both Firefox and IE functionality


Test Plan


Go to Google


Search for “Agile Alliance”


Go to the correct website


Click on the Manifesto link


Confirm page is the Manifesto by checking <H1> tag


Why SWAT?


Written in C# and takes full advantage of
the .Net platform


Supports both IE and FireFox


Can be easily extended to support
additional browsers


Fitnesse plug
-
in allows easy
development of tests in a standard wiki
language

Why SWAT? (Continued)


Tests page rendering and dynamic
events such as JavaScript and Ajax


Allows your testers to write page tests
before the page is written


SWAT Editor allows tests to be written
outside of the Fitnesse environment


Open source project supported by
Ultimate Software

SWAT and Continuous Integration


Can be driven by any C# based testing tool


Fitnesse


NUnit


MbUnit


Examples for MbUnit and Fitnesse can be
found at:


http://ulti
-
swat.wiki.sourceforge.net/QuickStartGuides

Simple Interface using Fitnesse


Clicking a link (id = lnkMyLink)


|StimulateElement|id|lnkMyLink|onclick|A|



Asserting a Label Exists (id=lblMyLabel)


|AssertElementExists|id|lblMyLabel|LABEL|



Setting a textbox (id=txbMyTB, value = “test”)


|SetElementAttribute|id|txbMyTB|value|test|INPUT|


The Power of Expressions


What if you need to find a checkbox with
no id, but it is checked and has a
class=“myClass”


|AssertElementExists|Expression|checked:true;cla
ss:myclass|INPUT|


Can use regular expressions


Can use any attribute of an element
including innerhtml


Optional final parameter helps refine the
search and makes tests go faster

Demo 2


Simple test


Test Goal


Navigate to the conference website from Google


Test Plan


Go to Google


Search for “Agile Alliance”


Go to the correct website


Confirm page has the top Agile 2007 Conference
image

SWAT Editor


Allows you to run tests outside of Fitnesse


Passes and fails show up on the bottom

Open Source Site


Main Site


http://sourceforge.net/projects/ulti
-
swat/


Download site


http://sourceforge.net/project/showfiles.php?g
roup_id=199701


Mailing List


http://sourceforge.net/mail/?group_id=199701

Available Documentation


Available at:


http://ulti
-
swat.wiki.sourceforge.net/


Includes:


User Guides


Method Signatures


Examples

Questions???


Additional questions can be e
-
mailed to


ulti
-
swat
-
annoucements@lists.sourceforge.net


New Features can be requested at


http://sourceforge.net/tracker/?group_id=199701&atid=970
557


Slides and Demos available at


http://ulti
-
swat.wiki.sourceforge.net/Information+about+SWAT