• Save
Continuous Integration
Upcoming SlideShare
Loading in...5
×
 

Continuous Integration

on

  • 611 views

This training material describes basics of Continuous Integration practice

This training material describes basics of Continuous Integration practice

Statistics

Views

Total Views
611
Views on SlideShare
611
Embed Views
0

Actions

Likes
1
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Continuous Integration Continuous Integration Presentation Transcript

  • Continuous IntegrationStanislav Tyurikov
  • Business GoalProfit increasingTotal Profit = Project Profit [1] + … + Project Profit [N]Project Profit = Project Revenue – Project CostsIncrease projectcountIncrease projectpriceDecrease projectcosts
  • Lean Software Development: Wastes• Defects• Overproduction• Transportation• Waiting• Inventory• Motion• Extra processing
  • Cost of changeRequarements Design Coding Testing ProductionCostofchangeProject phase
  • What Continuous Integration is?Continuous integration (CI) implements continuous processes ofapplying quality control - small pieces of effort, appliedfrequently. Continuous integration aims to improve the quality ofsoftware, and to reduce the time taken to deliver it, by replacingthe traditional practice of applying quality control aftercompleting all development.© http://en.wikipedia.org/wiki/Continuous_integration
  • FeedbackMechanismcommit changes(1)VersionControl SystemContinuousIntegration SystemBuild ScriptDevelopersPoll (2)Report (4)Execute (3)Compile Source CodeRun InspectionsRun DB ScriptsRun TestsDeploy SoftwareLook (5)CI Scenario
  • • 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
  • • Separate Build Scripts from Your IDE• Automate Builds• Perform Single Command Builds• Build for Any Environment• Fail Builds FastBuild Script
  • • Centralize Software Assets• Create a Consistent Directory StructureVersion Control System
  • • CI Server always available• Use a Dedicated Integration Build Machine• Stage BuildsCI Server
  • • Getting the right information to the right people atthe right time and in the right way—CI is the besttool for making this feedback automated, targeted,and real-time (continuous).• Email, IM, SMS an other feedback mechanisms canbe used.Feedback Mechanism
  • • Reduce Code Complexity• Perform Design Reviews Continuously• Maintain Organizational Standards with Code Audits• Reduce Duplicate Code• Assess Test Code Coverage (after test execution)Continuous InspectionCompilation Inspection Testing DeploymentContinuous Integration
  • What Continuous Testing is?• Is a part of continuous integration process• Test are created on development phase• All test are automated• Tests are frequently executedContinuous IntegrationCompilation Inspection Testing Deployment
  • Continuous Test Types• Unit Tests• Component (Integration) Tests• System Tests• Functional (Acceptance, Story) TestsDBAPIUI
  • Automate Unit TestUnit Test verifies the behavior of small elements in a softwaresystem, which are most often a single class or method. Every UTmust have several characteristics (F.I.R.S.T.):• Fasttakes a little time to execute (less than 0,01 sec).• Isolateddoes not interact with over parts of a system, failure reasons become obvious.• Repeatablerun repeatedly in any order, any time.• Self-Checkingno manual evaluation required.• Timelywritten before the code.DBAPIUI
  • Automate Component Tests• Component or subsystem tests verify portions of asystem and may require a fully installed system orsome external dependencies, such as databases, filesystems, or network endpoints, to name a few.• Tend to run longer than UT.DBAPIUI
  • Automate System Tests• System tests exercise a complete software systemand therefore require a fully installed system, suchas a servlet container and associated database.• Tend to run longer than CT.• Use system API to perform testing.DBAPIUI
  • Automate Functional Tests• Functional tests, as the name implies, test thefunctionality of an application from the viewpoint ofa client, which means the tests themselves mimicclients (for example, using Silenium).• Tend to run longer than ST.DBAPIUI
  • Functional TestsSystem TestsTest ScopesData AccessObjectBusinessLogic ServiceWeb ServiceDBWeb PageUnit TestsIntegrationTests
  • Run Faster Test FirstUnit Test Component Test System Test Functional TestAlso known as Integration TestAcceptance/StoryTestDepends onExecution Time ms sec min hourDescriptionCheck class,methodTest componentintegrity, DBqueries.System API (WS,JNDI, etc), externalclient interactionCustomer oriented.Use UI controls,pages, links, etc.execution orderEach kind of test has its own area of responsibility, setup efforts, and accordingly,different execution time.
  • • Set of test works like safety net. Once a new test is added, it will alwayscover 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 preventdefect reappearance.add new test cases to makethe safety net much effectiveSafety Net & Defect-Driven Development
  • • 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 ReleaseContinuous DeploymentCompilation Inspection Testing DeploymentContinuous Integration
  • 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 DuplicationTypical problems
  • Without Continuous Testing:With Continuous Testing:timetimeWithout CT lots of efforts and time are spent to find bugs and apply CR. CTs makethese 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 ModificationCoding Bug Fixing Functionality ModificationTime Saving Hypothesis
  • Additional InformationBooks & 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! =)