Confidential 9/13/2015 Slide 1. FitNesse + WATIJ = WitNesse (Or is it FATIJ) Paul Lamb Vik Anantha.
-
Upload
willis-martin -
Category
Documents
-
view
212 -
download
0
Transcript of Confidential 9/13/2015 Slide 1. FitNesse + WATIJ = WitNesse (Or is it FATIJ) Paul Lamb Vik Anantha.
Confidential 04/21/23 Slide 1
FitNesse + WATIJ = WitNesse(Or is it FATIJ)
Paul Lamb
Vik Anantha
Confidential 04/21/23 Slide 3
SummaryBrowser simulation vs Browser automation
(why we chose WATIJ)
Testing by programmers vs Testing by business analysts
(why we chose FitNesse)
The happy co-incidence
(putting them both together)
Browser simulation vs Browser automation
Confidential 04/21/23 Slide 5
HttpUnitcom.meterware.httpunit.WebConversation simulates a browser.
maintains session context via cookies returned by the server.
WebConversation wc = new WebConversation();
WebResponse resp = wc.getResponse("http://google.com" );
WebForm form = resp.getFormWithName("f");
form.setParameter("q", "httpunit");
resp = form.submit();
Confidential 04/21/23 Slide 6
HttpUnitPackage com.meterware.httpunit.parsing contains classes to control HTML parsing.
Does it emulate the same type of parsing that IE Supports?
com.meterware.httpunit.scripting contains classes to evaluate javascript.
Does it evaluate javascript the way IE does?
“JavaScript support is very basic at present. The near-term goal is full JavaScript 1.1 support.”
Confidential 04/21/23 Slide 7
WATIJ(Web Application Testing in Java)
watij.ie automates a browser
Creates new instance of IE or attaches to an instance
IE ie = new IE();
ie.start("http://google.com");
ie.textField(name,"q").set("Watij");
ie.button("Google Search").click();
Confidential 04/21/23 Slide 8
Other Browser Automation toolsWATIR (wtr.rubyforge.org)
Ruby based
SAMIE (samie.sourceforge.net)
Perl based
PAMIE (pamie.sourceforge.net)
Python
Selenium (www.openqa.org/selenium)
Is it really Browser automation?
Testing by programmers vs Testing by business analysts
Confidential 04/21/23 Slide 10
FitNesse (Tests)Tests are expressed as wiki tables of input data and expected output data
Written by non programmers
numerator denominator quotient
10 2 5
12.6 3 4.2
100 4 24
Confidential 04/21/23 Slide 11
FitNesse (Fixtures)
Enables System Under Test to be testable by wiki table based tests.
Written by programmers
public class Division extends ColumnFixture {
public double numerator, denominator;
public double quotient() {
return numerator/denominator;
}
}
Confidential 04/21/23 Slide 12
Sweet SpotLets non programmers write automated tests.
Allows tests to be written directly against the relevant business logic code.
Provides a modular structure for organizing test cases.
Fixtures provide a way of defining a testable “unit”.
The happy co-incidence
Confidential 04/21/23 Slide 14
WitNesseIs a WATIJ Fixture for FitNesse
Allows WATIJ tests to be written with wiki tables.