Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Email: xavier@warzee.fr
Blog: http://warzee.fr
Site: http://www.agilescale.com
Insurance applications
Talk based on one year engagement
In an insurance company
A subsidiary of one of the largest french bank
6 insurance applications
Used by several networks of regional insurance
agencies
Running in a datacenter (Mainframes, Unix servers)
Legacy systems
Applications
Implemented in Java/J2EE running on Unix
servers
No dependency injection, no cool frameworks
(Spring, Hibernate, …)
Various size and maturity
Start
Start Stop
Stop Look
?
Mike Cohn tests pyramid adoption
> target practices: the pyramid of Mike Cohn
• Small number of tests
• Try automate these tests
Acceptance
tests with the
GUI
• Define accurate functional tests
FitNesse
Start
Start Stop
Stop Look
?
Mike Cohn tests pyramid
adoption
> pragmatic target practices!
Acceptance
tests with the • Try to reduce the number of tests
GUI
(if any, use FitNesse + Selenium)
Automated
acceptance
tests • Use Fit/FitNesse
EIARD Application
Business Component Business
DAS MQ Service
Application DAO
Business Process (Cobol)
Process
Service
Service
HTML/JS/JSP
Pages Business Service
Business Component
xml/http mq
Functional testing with FitNesse
> Business layer
Black box approach
Wiki to easy functional data injection!
Business layer Mainframe layer
Dossier component
DAO DAS Functional
PMListeDossiers MQ
Service
SUT (Cobol)
Business
PMColumnFixture Service
Personne component
DAO DAS Functional
MQ
PMGestionCompte Service
SUT (Cobol)
Business
Service
ElementStructure component
Functional testing with FitNesse
> Presentation layer with Selenium
Selenium is powerful
Issues to set timeout when MQ access not mocked!
(JDBC/DB2)
Presentation layer Business layer Mainframe layer
Dossier component
Functional
SAD MQ Service
(Cobol)
OM CAD
DevisA4
SeleniumRunner
Personne component
Functional
CAD
MQ Service
PUPerteMdp PMGestionCompte (Cobol)
Selenium RC
Pages
OM
HTML/JS/JSP Request
EIARD application
ElementStructure component
Other systems
Testing scenarios
> Car insurance quote scenario
Write scenario in natural language with the FitNesse wiki
Use the SeleniumRunner fixture to translate natural
languages into Selenium verbs (open, click, select, …)
The SeleniumRunner fixture invokes a Selenium instance
The Selenium instance interacts with the application !
FitNesse Tests & Continuous integration
1/3
3
4 5
6
1 2
1 – Check in (restitution)
2 – Projects updated on the continuous
integration server
3 – Projects built :
compilation, application and tests resources
generation, unit tests and components tests
execution, code review,
SCM repository 4 – Projects deployment (when needed : EAR)
5 – Acceptation tests executed using FitNesse
(Clearcase, SVN, …)
(and Selenium)
6 – Notification by email
FitNesse Tests & Continuous integration
2/3
> Maven command called by Cruisecontrol
Definition of a Maven profile:
“fitnesse”
To declare and configure Fitnesse
plugin
To set FitNesse parameters to use
Here for the Dossier project:
<fitNesseServerName>s00sic001.ca-pacifica.fr</fitNesseServerName>
<fitNesseServerPort>8081</fitNesseServerPort>
<fitNesseServerPage>TestsAcceptation.TestsNm.TestsDossier</fitNe
sseServerPage>
Wiki à Fit)
How to define scenarios? (1/3)
Launch an application with Firefox (here e-
IARD)
Select Tools -> “Selenium IDE”
How to define scenarios? (2/3)
Complete forms for Car Insurance
Quote (“Simulation Assurance
Automobile”)
Events captures by Selenium IDE
How to define scenarios? (3/3)
FitNesse
Page
FitNesse reports
> included in the web site generated by
Maven
Integration of
The FitNesse report
Eclipse/RAD plugins
> Plugin Eclipse FitNesse (Band XI)
Boutons d’accés aux serveurs Fitnesse
En local
En remote
Incremental releases
Iterative releases