7. • Write Automated Developer Tests
• Run Private Builds
• All Tests and Inspections Must Pass
• Don’t Commit Broken Code
• Fix Broken Builds Immediately
• Commit Code Frequently
• Avoid Getting Broken Code
• Run Manual Integration Builds (optional)
Developer
8. • Separate Build Scripts from Your IDE
• Automate Builds
• Perform Single Command Builds
• Build for Any Environment
• Fail Builds Fast
Build Script
9. • Centralize Software Assets
• Create a Consistent Directory Structure
Version Control System
10. • CI Server always available
• Use a Dedicated Integration Build Machine
• Stage Builds
CI Server
11. • Getting the right information to the right people at
the right time and in the right way—CI is the best
tool for making this feedback automated, targeted,
and real-time (continuous).
• Email, IM, SMS an other feedback mechanisms can
be used.
Feedback Mechanism
13. What Continuous Testing is?
• Is a part of continuous integration process
• Test are created on development phase
• All test are automated
• Tests are frequently executed
Continuous Integration
Compilation Inspection Testing Deployment
14. Continuous Test Types
• Unit Tests
• Component (Integration) Tests
• System Tests
• Functional (Acceptance, Story) Tests
DB
API
UI
15. Automate Unit Test
Unit Test verifies the behavior of small elements in a software
system, which are most often a single class or method. Every UT
must have several characteristics (F.I.R.S.T.):
• Fast
takes a little time to execute (less than 0,01 sec).
• Isolated
does not interact with over parts of a system, failure reasons become obvious.
• Repeatable
run repeatedly in any order, any time.
• Self-Checking
no manual evaluation required.
• Timely
written before the code.
DB
API
UI
16. Automate Component Tests
• Component or subsystem tests verify portions of a
system and may require a fully installed system or
some external dependencies, such as databases, file
systems, or network endpoints, to name a few.
• Tend to run longer than UT.
DB
API
UI
17. Automate System Tests
• System tests exercise a complete software system
and therefore require a fully installed system, such
as a servlet container and associated database.
• Tend to run longer than CT.
• Use system API to perform testing.
DB
API
UI
18. Automate Functional Tests
• Functional tests, as the name implies, test the
functionality of an application from the viewpoint of
a client, which means the tests themselves mimic
clients (for example, using Silenium).
• Tend to run longer than ST.
DB
API
UI
19. Functional Tests
System Tests
Test Scopes
Data Access
Object
Business
Logic Service
Web Service
DB
Web Page
Unit Tests
Integration
Tests
20. Run Faster Test First
Unit Test Component Test System Test Functional Test
Also known as Integration Test
Acceptance/Story
Test
Depends on
Execution Time ms sec min hour
Description
Check class,
method
Test component
integrity, DB
queries.
System API (WS,
JNDI, etc), external
client interaction
Customer oriented.
Use UI controls,
pages, links, etc.
execution order
Each kind of test has its own area of responsibility, setup efforts, and accordingly,
different execution time.
21. • Set of test works like safety net. Once a new test is added, it will always
cover target functionality.
• If defect has been found, you can create additional test case for it (defect-
driven development). This makes your safety net much effective to prevent
defect reappearance.
add new test cases to make
the safety net much effective
Safety Net & Defect-Driven Development
22. • Release Working Software Any Time, Any Place
• Label a Repository’s Assets
• Produce a Clean Environment
• Label Each Build
• Run All Tests
• Create Build Feedback Reports
• Possess Capability to Roll Back Release
Continuous Deployment
Compilation Inspection Testing Deployment
Continuous Integration
23. The most typical problems which CI solves:
• “It Works on My Machine”
• “The Missing Click“
• “Did You Get the Memo?”
• Regression Testing
• Inability to Visualize Software
• Coding Standard Adherence
• Code Duplication
Typical problems
24. Without Continuous Testing:
With Continuous Testing:
time
time
Without CT lots of efforts and time are spent to find bugs and apply CR. CTs make
these activities more painless, but we have to create and support test as well.
Automated Tests:
1) Increase coding time.
2) Decrease bug searching/debugging time.
3) Decrease functionality modification time.
Coding Bug Fixing Functionality Modification
Coding Bug Fixing Functionality Modification
Time Saving Hypothesis
25. Additional Information
Books & articles:
• Continuous Integration: Improving Software Quality and Reducing Risk.
• Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation.
• Implementing Lean Software Development: From Concept to Cash.
• The Art of Lean Software Development.
• Continuous Integration by Martin Fowler.
Google it! =)