Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Speaker
Jan Van Reusel
1997
Speaker
Jan Van Reusel
1997
1999
Speaker
Jan Van Reusel
1997
1999
2002
Speaker
Jan Van Reusel
1997
1999
2002
2003
2003
Speaker
Jan Van Reusel
Speaker
Development Manager
Speaker
What keeps me awake at night?
...sometimes...
...more often...
...summer 2005...
...summer 2006...
12
Load factor
10
This Session
What did we do about it?
Context
Ventouris Renewal Program
Accountancy Bank Self-employed activity Look up and process income data Career data Continued insurance Payments receive reassign reimburse
Bailiff
Modifications
FCP
Calculation
File
Family allowance
Discharge Pension Decease Failure (insurance) Normal suspension: request equalization continued insurance
NISSE
Self-employed Affiliation Suspension
customers
team size
60
100 my 3 year
Application clients
HTML Browser Web Service Client NISSE Batch Client
Presentation Layer
<<JSF>> Web User Interface
Service Layer
<<Session Bean>> Application Services <<JCAPS>> BPEL Engine <<POJO / MDB>> NISSE Gateway <<POJO / MDB>> Batch Dispatcher
Domain Layer
<<POJO>> Business Object <<JESS>> Rule Engine
Application Infrastructure
<<Oracle>> Database File System <<Scriptura>> Document Generator
Why TDD?
Business Facing Support Programming Exploratory (proxy) Integration (XML) Exploratory (customer) System Alfa Beta Unit Integration (Java) Data conversion Performance Fail over Critique Product
Technology Facing
Brian Marick
Test Strategy
Developer 1 Machine Build/Test Process Developer 2 Machine Build/Test Process Developer 3 Machine Build/Test Process Application Server Application Server Application Server
Database Server
Client
Browser
Presentation
Faces Servlet
Service
Session Facade
Domain
Data Source
Infrastructure
JSF Component
Facade Impl
Gateway
Managed Bean
Persistence Manager
JDO
RDBMS
Client
Browser
Presentation
Faces Servlet
Service
Session Facade
Domain
Data Source
Infrastructure
JSF Component
Facade Impl
Gateway
Managed Bean
Persistence Manager
JDO
RDBMS
http://xunitpatterns.com
http://xunitpatterns.com
http://xunitpatterns.com
http://xunitpatterns.com
http://xunitpatterns.com
Client
Browser
Presentation
Faces Servlet
Service
Session Facade
Domain
Data Source
Infrastructure
JSF Component
Facade Impl
Managed Bean
Persistence Manager
JDO
RDBMS
Client
Browser
Presentation
Faces Servlet
Service
Session Facade
Domain
Data Source
Infrastructure
JSF Component
Facade Impl
Gateway
Managed Bean
Persistence Manager
JDO
RDBMS
Test Helper
Client
Browser
Presentation
Faces Servlet
Service
Session Facade
Domain
Data Source
Infrastructure
JSF Component
Facade Impl
Gateway
Managed Bean
Persistence Manager
JDO
RDBMS
http://xunitpatterns.com
http://www.thoughtworks.com/object-mother-easing-test-object-creation.pdf
Object Mother
Object Mother
Test Helper
Client
Browser
Presentation
Faces Servlet
Service
Session Facade
Domain
Data Source
Infrastructure
Humble Object
JSF Component Facade Impl
Gateway
Managed Bean
Persistence Manager
JDO
RDBMS
Mock Object
Client
Browser
Presentation
Faces Servlet
Service
Session Facade
Domain
Data Source
Infrastructure
JSF Component
Facade Impl
Gateway
Managed Bean
Persistence Manager
JDO
RDBMS
Client
Browser
Presentation
Faces Servlet
Service
Session Facade
Domain
Data Source
Infrastructure
JSF Component
Facade Impl
Gateway
Managed Bean
Persistence Manager
JDO
RDBMS
Client
Browser
Presentation
Faces Servlet
Service
Session Facade
Domain
Data Source
Infrastructure
JSF Component
Facade Impl
Gateway
Managed Bean
Persistence Manager
JDO
RDBMS
http://www.openqa.org/selenium
AUT
http://www.openqa.org/selenium
AUT
http://www.openqa.org/selenium
AUT
2. Requests command
http://www.openqa.org/selenium
AUT
2. Requests command
Selenium Server
3. Waits
http://www.openqa.org/selenium
AUT
2. Requests command
Selenium Server
3. Waits
http://www.openqa.org/selenium
AUT
2. Requests command
Selenium Server
3. Waits
http://www.openqa.org/selenium
AUT
2. Requests command 5. Go to AUT
Selenium Server
3. Waits
http://www.openqa.org/selenium
AUT
2. Requests command 5. Go to AUT
Selenium Server
3. Waits
http://www.openqa.org/selenium
AUT
2. Requests command 5. Go to AUT 7. HTTP Request
Selenium Server
3. Waits
http://www.openqa.org/selenium
AUT
2. Requests command 5. Go to AUT 7. HTTP Request 8. HTTP Response
Selenium Server
3. Waits
http://www.openqa.org/selenium
AUT
2. Requests command 5. Go to AUT 7. HTTP Request 8. HTTP Response
Selenium Server
3. Waits
http://www.openqa.org/selenium
AUT
7. HTTP Request 8. HTTP Response
2. Requests command
5. Go to AUT
Selenium Server
3. Waits
http://www.openqa.org/selenium
AUT
7. HTTP Request 8. HTTP Response
2. Requests command
5. Go to AUT
Selenium Server
3. Waits
http://www.openqa.org/selenium
AUT
7. HTTP Request 8. HTTP Response
2. Requests command
5. Go to AUT
Selenium Server
3. Waits
http://www.openqa.org/selenium
Selenium Driver
4. Go to AUT & request result 12. Result
AUT
7. HTTP Request 8. HTTP Response
2. Requests command
5. Go to AUT
Selenium Server
3. Waits
import com.thoughtworks.selenium.*; import junit.framework.*; public class GoogleTest extends TestCase { private Selenium sel; public void setUp() { sel = new DefaultSelenium("localhost", 4444, "*firefox", "http://www.google.com"); sel.start(); } public void testGoogle() { sel.open("http://www.google.com/webhp"); sel.type("q", "hello world"); sel.click("btnG"); sel.waitForPageToLoad("5000"); assertEquals("hello world - Google Search", sel.getTitle()); } public void tearDown() { sel.stop(); } }
Test Smells
12
Load factor
10
Buggy Tests
Buggy Tests
12
Load factor
10
http://xunitpatterns.com
Client
Browser
Presentation
Faces Servlet
Service
Session Facade
Data Source
Infrastructure
Gateway
JSF Component
Facade Impl
Managed Bean
Persistence Manager
JDO
RDBMS
Mock Object
12
Load factor
10
Slow Tests
Slow Tests
Slow Tests
Slow Tests
Presentation
Faces Servlet
Service
Session Facade
Domain
Data Source
Infrastructure
JSF Component
Facade Impl
Gateway
Managed Bean
Persistence Manager
JDO
RDBMS
Slow Tests
Slow Tests
Slow Tests
Not Enough
test maintenance
Client
Browser
Presentation
Faces Servlet
Service
Session Facade
Domain
Data Source
Infrastructure
JSF Component
Facade Impl
Gateway
Managed Bean
Persistence Manager
JDO
RDBMS
Not Enough
Test type predeploy postdeploy number 5020 2606 % 66 34 time 170 5072 % 3 97
Not Enough
Test type predeploy postdeploy number 5020 2606 % 66 34 time 170 5072 % 3 97
Result!
10 minute build
Client
Browser
Presentation
Faces Servlet
Service
Session Facade
Domain
Data Source
Infrastructure
JSF Component
Facade Impl
Gateway
Managed Bean
Persistence Manager
JDO
RDBMS
Continuous design well! sts as Te Educate your team Be agile with test strategy
Conclusion
More? Agile Applied on The Largest J2EE Project in The Benelux by Johan Lybaert Agile Development Workshop by Kathleen Cornelis www.ardatissoftwarefactory.com