Software testing and software development process

  • View

  • Download

Embed Size (px)


  • 1.SOFTWARETESTING ANDSOFTWARETESTING ANDSOFTWARE DEVELOPMENTSOFTWARE DEVELOPMENTPROCESS (SDP)PROCESS (SDP)Aloysius Ochola2010/HD18/431UMAKERERE UNIVERSITYSchool of Computing and InformaticsTechnologyMCN 8108MCN 8108 Software Quality Assurance & TestingSoftware Quality Assurance & TestingMscCS Class Presentations. Nov. 2011

2. SoftwareTestingSoftwareTestingPrograms are implemented to provide a concreterepresentation of an algorithm major concern is with the correctness and performance of theimplementation.Engineers must then ensure that their softwaresystems achieve an appropriate level of qualitySoftware verification (through correctness proof) Technique to assist during the specification, design, andimplementation of a software systemSoftware testing (alternative for verification) Process of assessing the functionality and correctness of aprogram through execution or analysis Basically a methodology to find bugs in a software with anintent to fix them2 Software Testing and the SDP 3. SoftwareTesting (cont)SoftwareTesting (cont)Software testing is more than just error detection.Looked at as operating the software undercontrolled conditions to verifythat it behaves asspecified to detect errors and validate that what hasbeen specified is what the user actually wanted. Verification- check or test items, including software,for conformance and consistency by evaluating theresults against pre-specified requirements. Check if we are building what the customer wants Qn. Are we building the system right? Error Detection - Testing should intentionally attemptto make things go wrong. Determine if things happen when they shouldnt or things donthappen when they should.3 Software Testing and the SDP 4. SoftwareTesting (cont)SoftwareTesting (cont) Validation(system correctness) - process ofchecking that what has been specified is whatthe user actually wanted. Check if we are building that system correctly Qn. Are we building the right system?Both verification and validation arenecessary, but different components of anytesting activity.4 Software Testing and the SDP 5. Limits of SoftwareTestingLimits of SoftwareTestingCan not test a program completely Completeness means that at the end of testing,there are no undiscovered software errors.Whether theyve been fixed is a different issue,but all problems must be known andunderstood Why complete testing is impossible The domain of possible inputs is too large to test There are too many possible paths through theprogram to test The user interface issues (and thus the design issues)are too complex to completely test5 Software Testing and the SDP 6. Limits of S.T(cont)Limits of S.T(cont)Testing can only prove the presence of bugsbut never their absenceYou can not test the programs response toevery possible input The number of test inputs, even for this simple aprogram, is huge.You can not test every path the program cantake As with testing input data, it is important to realizethat you have not completely tested the programunless you have exercised every path. No such paths as safe to skipSoftware Testing and the SDP6 7. Limits of S.T(cont)Limits of S.T(cont)You can not find every design error A program meets the specification by doingexactly what a specification says it should If specification goes wrong? Ex.Asks for 1x1=11 Being in the specification doesnt make them right You cant completely test a program if you cantfind all of its design errorsYou can not prove programs correct usinglogic can only validate the internal consistency of theprogram What if the specifications were wrong?Software Testing and the SDP7 8. Limits of S.T(cont)Limits of S.T(cont)You can not verify that the program workscorrectly A tester is interested in verifying the program How? If the program can not be testedcompletelySoftware Testing and the SDP8 9. Objectives of Testing SoftwareObjectives of Testing SoftwareThe purpose of testing is verification,validation and error detection in order tofind problems. And the purpose of findingthose problems is to get them fixed.Testing Software to Find Problems Executing a program with the intent of finding anerror Check if the system meets the requirements andbe executed successfully in the Intendedenvironment Check if the system is Fit for purpose Check if system does what it is expected to do9 Software Testing and the SDP 10. Objectives of Testing SoftwareObjectives of Testing SoftwareFinding Problems to Fix them One benefit of testing is that it results inimproved quality uncovering yet undiscovered errors Fixing bugs You take a destructive attitude toward theprogram when you testSoftware Testing and the SDP10 11. Testing Life-Cycle PhasesTesting Life-Cycle PhasesBasically 5 stages involved includeRequirements Study Understanding of the requirements is very essential fortesting a product So we set a starting point to the study of the clientsrequirements Involves the analysis and planning phase, encapsulates Test objective and coverage Overall schedule Standards and Methodologies Resources required, including necessary training Roles and responsibilities of the team members Tools usedSoftware Testing and the SDP11 12. Testing Life-cycle phasesTesting Life-cycle phasesTest Case Design and Development Identify Components Test Specification Design Test Specification ReviewsTest Execution Code Review Test execution and evaluation Performance and simulationTest Closure Test summary report Project DocumentationTest Process Analysis Done on the reports and improving the performance ofapplication by implementing new technology.Software Testing and the SDP12 13. SoftwareTesting TechniquesSoftwareTesting Techniques Different techniques are used for software techniques.The commonly used are the following Black BoxTesting (functional/behavioural) No knowledge of internal design or code required.13 Software Testing and the SDP focus on outputs inresponse toselected inputs andexecutionconditions Tests are based onrequirements andfunctionality. 14. White box testingWhite box testing (Glass box) Takes into account the internal mechanism of thesystem White Box is most appropriate when we mustassure that the calculations are correct. Covering every possible path through a module isusually not practical Goal is to ensure that all conditional statements havebeen executed at least once Requirements fulfilments and interface availabilityand working assurance Grey BoxTestingGrey BoxTesting The combination of White and Black box testingSoftware Testing and the SDP14 15. Stages of SoftwareTestingStages of SoftwareTestingUnitTesting Micro scale of testing done on particular functions or codemodules Internal program design and code knowledge is required Thus, done by Programmers after modules have been coded. Objectives To test the function of a program or unit of code such as a module To test internal logic To verify internal design To test path and conditions coverage To test exception conditions & error handling White box testing and test coverage techniques deployed Tools guiding unit testing include; Debug, Re-structure, codeanalyzers and path coverage toolsSoftware Testing and the SDP15 16. IntegratedTesting Testing of combined parts of an application to determinetheir functional correctness Done to technically verify proper interfacing between modulesand within sub-systems. Always carried out by developers after modules are unittested White Box, Black box and configuration management,techniques used. Types of Integrated Testing Bottom - up testing (test harness) Top - down testing (stubs). Modified top - down testing - test levels independently. Big Bang Sandwich testingSoftware Testing and the SDP16 17. SystemTestingMajor objectives include Verify that system components perform controlfunctions To perform inter-system test To perform appropriate types of tests relating totransaction flows, installation, reliability, regression, etcIt is done by both users and the developmentteam after integration testingSystem integrated testing is often carried outafter system testing but outside the project lifecycle Tests the co-existence of products and applicationsthat are required to perform together in a production-like operational environmentSoftware Testing and the SDP17 18. AcceptanceTestingThis is performed by the end usersTo verify that the system meets theirrequirements.Black box technique is appliedTools used may include: Comparison Keystroke capture Playback Regression testingSoftware Testing and the SDP18 19. Types of SoftwareTestingTypes of SoftwareTestingWe have come across so manytypes ofsoftware testingTwo major approaches of software testing Manual testing done by man. Tester runs thesoftware for errors. Consumes a lot of timebecause testing has to be repeated after everychange (regression testing) Automated testing Testing employing softwaretools which execute tests without manualintervention performed by writing test drivers that can runautomatically and produce test results19 Software Testing and the SDP 20. Major Types of TestingMajor Types of Testing LoadTesting Testing an application under heavy loads Ex,Testing of a web site under a range of loads to determine,when the system response time degraded or fails. StressTesting Program is checked to see how well it deals with abnormalresource demands Testing under heavy loads, heavy repetition of certain actionsor inputs Ex. input of large numerical values, large complex queries to adatabaseSoftware Testing and the SDP20 21. PerformanceTesting Tests the run-time performance of software How well does the application comply to performancerequirements? RecoveryTesting Checks systems ability to recover from failures How well can it recovers from crashes, hardware failures orother problems? ConversionTesting Testing of programs or procedures used to convert data fromexisting systems for use in replacement system Ensures that the existing datashould not change,whileconverting it into thenew upda