Eim Intro - Sdlc Test

Embed Size (px)

Citation preview

  • 8/9/2019 Eim Intro - Sdlc Test

    1/19

  • 8/9/2019 Eim Intro - Sdlc Test

    2/19

    Definitions

    Integration:assemble the product from the product components, ensure that the product, as integrated, functionsproperly, and deliver the product CMMI-DEV

    the management and engineering activity consisting of the cohesive collection of all tasks that are primarilyperformed to connect together components to produce a working system or application OPEN

    Component:

    implementation work product consisting of an encapsulated cohesive piece of computer software that:

    Offers a cohesive set of services via one or more interfaces.

    Is designed, implemented, and tested as a unit prior to integration.

    Is part of an application, contact center, or data center OPEN PF

    System:

    a work product consisting of a major, functionally cohesive, executable, integrated aggregation of components OPEN PF

  • 8/9/2019 Eim Intro - Sdlc Test

    3/19

    SDLC basic phases

    The SDLC, in any process modelhas at least some variation of these 4 phases

    Integration and testingactivities happen throughout

    the SDLCIntegration activities can beassigned to either test ordevelopment teams

    Transition

    Final Integration DeploymentIntegrationDeployment

    Testing

    Construction

    Component Integration Unit Testing UI

    Elaboration

    Integration Cases Test Case

    Inception

    Integration Plan Test Plan

  • 8/9/2019 Eim Intro - Sdlc Test

    4/19

    Integration and testing activities

    Testing activities include:Planning documentation

    Process documentation

    Implementation testing

    Integration activities include:

    Planning documentation

    Process documentation

    Implementation of integration and build

  • 8/9/2019 Eim Intro - Sdlc Test

    5/19

    Constructing a system

    A system is composed of multiple types of entities thall must be tested separatelyand as an integrated whole

    Only the last area,components, contains codedeveloped in the effort itsel

    Components in this contemay include customframeworks as well

  • 8/9/2019 Eim Intro - Sdlc Test

    6/19

    Testing areas

    All of the constituent partscontributing to the system mustbe tested

    UI testing is only one part of thesystem

    Integration points between

    custom components and COTScomponents / frameworks mustbe tested

    Unit testing must occur for allcomponents

  • 8/9/2019 Eim Intro - Sdlc Test

    7/19

    Unit testing

    Each developed piece of code is a unit to be tested

    A component is a collection of one or more units

    Unit tests must include cases that cover all types of inputs withassertions being made about the results

    Each input argument to a function must be tested

    Each component must be evaluated for code coverage of the unit tests

  • 8/9/2019 Eim Intro - Sdlc Test

    8/19

    Code coverage

    For a component, each functional unit of code (class, procedure,function) will be tested under a unit test

    For a given function, the code coverage is the proportion of lines of thecode that are actually executed during the test.

    A fixed minimum percentage of code coverage should be defined inthe testing process methodology to ensure an acceptable level of riskfor bugs.

  • 8/9/2019 Eim Intro - Sdlc Test

    9/19

    Parameter testing

    For any given function tested, that function will be defined by itsinputs and output

    Each input parameter must be tested to its full range of values toensure proper operation

    If a function expects an integer as input in the range of -1 to 100, then thatparameter must be tested with at least:

    INF, -2, -1,0,99,100,101,INF

    This is repeated for every other input parameter

    The output must also be tested, to include proper exception throwsand handling based upon assertion given fixed inputs

  • 8/9/2019 Eim Intro - Sdlc Test

    10/19

    The good news for test

    Developers are responsible in all process methodologies for thecreation of the unit testing code

    Testers are responsible for providing the developers with guidelines onhow to construct the unit tests

    Testers are responsible for validating and verifying code coverage forall unit tests

    That includes examining the source code to ensure the unit tests arecorrect per process

  • 8/9/2019 Eim Intro - Sdlc Test

    11/19

    How big is unit testing?

    Each component is unit testedEach entity in the component is tested (class)

    Each method in the entity is tested (function)

    Each method parameter is tested for a full range

    Every combination therein is tested

    A single function may have hundreds or thousands of test runs alone!

    Dont panic, they should run relatively quickly

    Unit testing in the large (as a system) is only performed by the testers

  • 8/9/2019 Eim Intro - Sdlc Test

    12/19

    Builds

    Developers need to rely on the code they leverageA developer should be confident that the code they are using (but not writing) isfree of defects that will impede their effort

    Testing is responsible for ensuring the developers have these checked builds

    A checked build is a component that is compiled (e.g. a dll, jar, war, ear,

    etc) that has passed unit testing for the current level of completenessEach component can evolve over time to have additional functions

    Test cases for a given function should not have to change once completed(ideally at least)

  • 8/9/2019 Eim Intro - Sdlc Test

    13/19

    Who builds and how?

    Integration is generally responsible for the builds that are being integrated

    Test is generally responsible for the builds that are being tested

    Developers are generally responsible for the build scripts for their own component

    However:

    Integration and Test will have to edit those build scripts for integration activities

    The build process is dependant on the technologies being used

    TFS Build for .NET TFS

    Nant, MSBuild for .NET without TFS

    Ant for Java/C/C++

    Also potential for continuous integration building / nightly builds

  • 8/9/2019 Eim Intro - Sdlc Test

    14/19

    Integration concepts

    Each component is developed to connect to specific other componentsVersions of dependant components can cause issues

    Changes to interfaces / packaging of code can cause issues

    Code moved from one component to another

    Connection of these components is implemented at compile (build) time

    Each boundary between components is an integration point that must betested

    Integration of components developed together are easiest to test

    Part of integration also includes migration and integration of configurationdata between components

  • 8/9/2019 Eim Intro - Sdlc Test

    15/19

    Component integration

    To maintain modularity of design, components are intended to be loosely coupledLoose coupling describes a resilient relationship between two or more systems ororganizations with some kind of exchange relationship

    Development teams are often assigned different portions of a system (components)and expected to develop those components with minimal interaction between teams

    This is increasingly common in distributed teams

    The separation can also increase modularity as there is little opportunity for crosscompiling

    Integration is a key factor in maintaining this loose coupling and ensuring thecomponent merge properly

  • 8/9/2019 Eim Intro - Sdlc Test

    16/19

    Integration planning

    For a component to need to be integrated, it must have a dependencyon another component

    Due to the dependency, the dependent component must be availablefor integration prior to the start of development of the dependentcomponent

    Therefore, a big part of integration is the planning of timelines fordevelopment of the components

    Coupled with this concept is the packaging of code units into components

  • 8/9/2019 Eim Intro - Sdlc Test

    17/19

    Packaging

    Integration is the connecting of component packages

    Packaging is the process of identifying which components are placedtogether in a single unit (e.g. classes in a dll)

    The planning of packages is an activity of the architect and senior level

    designersIntegration is responsible for planning the integration activities oncepackaging decisions are made

  • 8/9/2019 Eim Intro - Sdlc Test

    18/19

    RolesIntegration

    Integration engineer

    Build engineer

    Integration manager

    Testing

    Build engineer

    Unit tester

    User interface testerUsability tester

    Testing manager

    Often, in small teams the roles of integration are placed with testers

    Developers are still responsible for the hard work of constructing the necessary code

  • 8/9/2019 Eim Intro - Sdlc Test

    19/19

    Questi