Software Testing Revealed By International Software Test .

Transcription

SOFTWARE TESTINGREVEALEDTRAINING BOOKSECOND EDITIONBY INTERNATIONAL SOFTWARE TEST INSTITUTE www.test-institute.org COPYRIGHT INTERNATIONAL SOFTWARE TEST INSTITUTE

DedicationTo all of the International Software Test Institute students, thank you for inspiring us,keeping us focused, and making sure we do our best to help you grow in your career withyour skills and knowhow. Without you, your engagement and your loyal support,International Software Test Institute could not come where it is today.

TABLE OF CONTENTSCLICKABLEWELCOME .6ABOUT INTERNATIONAL SOFTWARE TEST INSTITUTE .7Introduction To Software Testing .8What is Software Quality Assurance? .12What Is Software Testing? .18Fundamentals of Software Testing.21Software Testing Roles and Responsibilities .30Software Testing Methods .36Software Testing Levels .38Software Testing Types .43Manual Software Testing .49

Automated Software Testing.51Waterfall Software Engineering Life Cycle .55Agile Software Engineering Life Cycle.59Software Project Management .62Software Testing Life Cycle And Software Testing Operations .64Deliverables Of Software Testing Team .66What Is Software Risk And Software Risk Management? .71Processes to Support Software Testing .75Thank you .80

WELCOMEHi! I’m Yeliz.I love that you are taking your time to read yourSoftware Testing book. I want to briefly share withyou why we wanted to write this book for you andhow you can get the best use out of it.Within the context of our Software Testingcertification program we made a thorough researchin Software Testing education space.The conclusion was: We failed to find one singletextbook, we could sincerely recommend to ourstudents!We talked to our successful students and found outthat, almost none of the Software Testing books inthe market could really help them make a smoothentry to Software Testing. Significant number ofSoftware Testing books in the marketplace claim thatthey cover all details of Software Testing, but whatthey are not telling is that, they don't haveunderstandable, clear and logical content to helptheir readers comprehend and most importantly loveSoftware Testing!Therefore, we wrote for you Software TestingRevealed and brought it for your service!We are absolutely confident that Software TestingRevealed will make you proficient in SoftwareTesting, so that you will have an outstandingopportunity to love Software Testing and keep ontaking the tangible benefits of being a SoftwareTesting professional.Take some coffee to enjoy and some paper totake your notes, and spend some quiet time toread your Software Testing book!Afterwards you will have a great understandingabout Software Testing domain and be prepared topass your Software Testing certification exam. Youwill be ready to deliver great products and services toyour clients and employers and to build your brightcareer and future!Yeliz ObergfellVice President - Student ExperienceInternational Software Test Institute 6

ABOUT INTERNATIONAL SOFTWARE TEST INSTITUTE International Software Test Institute is anindependent institute which helps organisations andprofessionals get accredited with worldwiderenowned and valid Software Testing certificationprograms and prove their competence in SoftwareTesting domain. We empower professionals worldwide to build their careers, and companies to createand sell their outstanding products and services.Your Accredited Software Tester, Accredited SoftwareTest Manager and Accredited Software TestAutomator Certification Programs have proven theirworldwide Acceptance and Reputation by being thechoice of more than 349'000 Software TestingPractitioners in 143 Countries.Software Testing is an open process which can becombined with other Software Engineering Processesand Frameworks, and yet before InternationalSoftware Test Institute was established, there usedto be no reasonable way for Software TestingProfessionals like yourself to obtain Software TestingCertifications and to prove your competence inSoftware Testing domain. Software TestingProfessionals had to pay expensive fees for the oneway profit-driven Software Testing CertificationPrograms of other Certification Entities.International Software Test Institute aims toremove the barriers set in front of the SoftwareTesting Professionals in developed and emergingmarkets by saving them from paying unreasonablefees for Software Testing Classroom Trainings andSoftware Testing Certification Examinations beforethey certify their knowhow in Software Testing.Moreover, feel free to check out "What makes YourCertification Programs Best of the Industry?" sectionon our www.test-institute.org web portal to readwhy we perform and serve you far more better thanour competition.International Software Test Institute provides 3major online Software Testing Certification Programswhich are designed by our consortium of renownedbusiness and people Leaders, coaches, mentors,experts and authorities from all major industries.You can check your Software Testing CertificationPrograms from this List of Software TestingCertifications.7

Introduction To Software TestingSoftware testing is nothing but an art of investigatingsoftware to ensure that its quality under test is in linewith the requirement of the client. Software testing iscarried out in a systematic manner with the intent offinding defects in a system. It is required forevaluating the system. As the technology is advancing we see that everything is getting digitalized. Youcan access your bank online, you can shop from thecomfort of your home, and the options are endless.Have you ever wondered what would happen if thesesystems turn out to be defective?One small defectcan cause a lot of financial loss. It is for this reasonthat software testing is now emerging as a verypowerful field in IT.Although like other products software never suffersfrom any kind of wear or tear or corrosion but yes,design errors can definitely make your life difficult ifthey go undetected. Regular testing ensures that thesoftware is developed as per the requirement of theclient. However, if the software is shipped with bugsembedded in it, you never know when they cancreate a problem and then it will be very difficult torectify defect because scanning hundreds andthousands of lines of code and fixing a bug is not aneasy task. You never know that while fixing one bugyou may introduce another bug unknowingly in thesystem.Software Testing Methodology in SoftwareEngineeringSoftware testing is now a very significant and integralpart of software development. Ideally, it is best tointroduce software testing in every phase of softwaredevelopment life cycle. Actually a majority ofsoftware development time is now spent on testing.8

6Introduction To Software TestingSo, to summarize we can say that:1 Software testing is required to check thereliability of the software2 Software testing ensures that the system isfree from any bug that can cause any kind offailure3 Software testing ensures that the product is inline with the requirement of the client4 It is required to make sure that the finalproduct is user friendly5 At the end software is developed by a team ofhuman developers all having differentviewpoints and approach. Even the smartestperson has the tendency to make an error. It isnot possible to create software with zerodefects without incorporating software testingin the development cycle.No matter how well the software design lookson paper, once the development starts andyou start testing the product you will definitelyfind lots of defects in the design.You cannot achieve software quality withoutsoftware testing. Even if testers are not involved inactual coding they should work closely withdevelopers to improve the quality of the code. Forbest results it is important that software testing andcoding should go hand in hand.Software Testing OverviewDefects arise in software due to many reasons. As amatter of fact it is said that every softwareapplication has some defects embedded in it but notevery defect is a threat to the system. There is a lotthat can be accomplished with the help of softwaretesting. Testing helps in evaluating the quality ofsoftware.There are many reasons why software testing hasgained so much of importance in the field of9

information technology. Firstly, testing helps inreducing the overall cost of the software development project. If testing is ignored in the initialdevelopment stages to save a small amount ofmoney then it may turn out to be a very expensivematter later because as you move on with development process it becomes more and more difficult totrace back defects and rectifying one defect somewhere can introduce another defect in some othermodule.The requirement is finalized after several discussionswith the client. Testing ensures that the softwarebehaves and looks exactly like what is mentioned inthe requirements specification document, so thatwhen software is delivered to the client there are noarguments about the variation from the originalrequirements. Software testing helps in strengthening the market reputation of a company. Well testedsoftware is of good quality and good quality meansbetter feedback and reviews.In order to achieve best results it is important toorganize all your testing efforts and this is what thisSoftware Testing Training provided by InternationalSoftware Test Institute is all about. Software testingcannot be fruitful without proper planning. To live upto the expectations of the client it is important toplan every step carefully. A lot of things need to beconsidered in order plan your testing efforts.Software testing should be planned keeping budget,schedule and performance in mind in order toachieve best results.All testing activities require planning. It is importantto outline a test plan that will give in details abouthow each activity will be carried out. Test plan is alsorequired to ensure that all aspects of the softwareare covered thoroughly and there is no repetition oftesting process so that time and effort is not wasted.The latest trend now is to involve the testing team inspecification writing process. It is important that thetesting team understands the requirements of theclient clearly as the entire development is based onthe requirement defined by the client.Anything that is not in line with the requirement is adefect. So, the testing team should have a clear ideaabout what the final outcome of running softwareshould be like. As a matter of fact it is important tostart writing test cases in parallel to specificationwriting. This will help the testers analyze whether allthe requirements are testable or not. When you writetest cases in parallel to specification writing process10

you will think critically about the specifications andyou will know if there is an issue with therequirement or if there is something that cannot bedeveloped.11

What is Software QualityAssurance?When we talk about software quality, we are actuallytalking about the evaluation of the software basedon certain attributes. A software quality is definedbased on the study of external and internal featuresof the software. The external quality is defined basedon how software performs in real time scenario inoperational mode and how useful it is for its users.The internal quality on the other hand focuses onthe intrinsic aspects that are dependent on thequality of the code written. The user focuses moreon how the software works at the external level, butthe quality at external level can be maintained only ifthe coder has written a meaningful good qualitycode.What Is Software Quality Assurance?Presently there are two important approaches thatare used to determine the quality of the software:1 Defect Management Approach2 Quality Attributes approachSoftware QualityAs mentioned before anything that is not in line withthe requirement of the client can be considered as adefect. Many times the development team fails tofully understand the requirement of the client whicheventually leads to design error. Besides that, theerror can be caused due to poor functional logic,wrong coding or improper data handling. In order tokeep a track of defect a defect managementapproach can be applied. In defect management,categories of defects are defined based on severity.The number of defects is counted and actions aretaken as per the severity defined. Control charts canbe created to measure the development processcapability.12

Defect Management ApproachQuality Attributes ApproachQuality Attribute Approach on the other handfocuses on six quality characteristics that are listedbelow:1. Functionality: refers to complete set of importantfunctions that are provided by the software Suitability: whether the functions of thesoftware are appropriate Accurateness: are the functions implementedcorrectly? Interoperability: how does the softwareinteract with other components of the system? Compliance: is the software in compliance withthe necessary laws and guidelines?Security: Is the software able to handle datarelated transaction securely?2. Reliability: this refers to the capability of softwareto perform under certain conditions for a definedduration. This also defines the ability of the systemto withstand component failure. Maturity: Frequency of failure of software13

Recoverability: this gives an idea of a system’sability to get back into full operation afterfailure.3. Usability: refers to the ease of use of a function. Understandability: how easily the functions canbe understood Learn ability: How much effort the users ofdifferent level need to put in to understand thefunctions.4. Efficiency: generally depends on good architecture and coding practices followed while developingsoftware.5. Maintainability: also known as supportability. It isgreatly dependant on code readability andcomplexity and refers to the ability to identify and fixa fault in a software: Analyzability: identification of the main causeof failure. Changeability: defines the effort that goes inmodification of code to remove a fault. Stability: how stable a system is in itsperformance when there are changes made toit Testability: how much effort goes in testing thesystem.6. Portability: Ability of the system to adopt tochanges in its environment Adaptability: how easily a system adapts to thechanges made in specifications Installability: how easily a system can beinstalled. Conformance: this is same as compliance infunctionality. Replaceability: how easy it is to replace acomponent of the system in a given environment.Cost of Software QualityCost of quality is important because when youdecide to conduct software testing for your productyou are actually going to invest your time, moneyand effort in getting quality checks done. Byconducting an analysis of cost of software qualityyou would know what the return on that investment(ROI) is.14

Cost of Software QualityCost of quality is calculated by analyzing theconformance costs and non conformance costs. Aconformance cost is related to:12Prevention costs: amount spent on ensuringthat all quality assurance practices are followedcorrectly. This includes tasks like training theteam, code reviews and any other QA relatedactivity etc.Appraisal costs: this is the amount of moneyspent on planning all the test activities andthen carrying them out such as developing testcases and then executing them.The non conformance cost on the other hand is theexpense that arises due to:1 Internal failures: it is the expense that ariseswhen test cases are executed for the first timeat internal level and some of them fail. Theexpenses arise when the programmer has torectify all the defects uncovered from his pieceof code at the time of unit or componenttesting.2 External failures: it is the expense that occurswhen the defect is found by the customerinstead of the tester. These expenses are muchmore than what arise at internal level,especially if the customer gets unsatisfied orescalates the software failure.Cost of Software FailureWe know that a software failure is caused when:1 It displays lack of ability to keep up: thisgenerally happens when the software startsaging. As it grows old the size increasesbecause the easiest way of adding a feature isby adding new code without touching any partof code written earlier. Over a period of time itbecomes bulky and it becomes difficult toidentify the sections of code that need to bechanged.15

23P e r f o r m a n c e d ro p i s o b s e r v e d : E v e r yapplication generally slows down with age andtends to occupy more and more computermemory therefore it is better to switch to othersoftware.It doesn’t seem to be reliable: It is a known factthat every time when changes are made to thecode of the software to fix an error, moredefects are introduced in the system.Surprisingly, this is one of the major reasonsfor increased failure rates and in order to savesituation it is always better to ditch the projector give up bug fixing.Software Testing VS Quality AssuranceIn IT industry it is often observed that peoplegenerally don’t differentiate between the softwarequality assurance and software testing. Testers areoften looked upon as Software Quality Assuranceprofessionals because the objectives of softwaretesting as well as quality assurance are the same .i.e.to ensure that the software is of top quality.As the name suggests quality assurance processesare carried out to assure the quality of the product isin line with the requirement of the client. The qualityassurance professionals work on development andimplementation of all the necessary processes toensure that all the necessary procedures of softwaredevelopment lifecycle are followed correctly. Qualityassurance is a proactive activity that is focused on:1 Defect Prevention2 Processes3 Continuous improvement of this processesSoftware testing on the other hand is carried toidentify or uncover defect and errors in the software.It involves actual rigorous testing of the software tosee if there are any defects or variations from theclient’s requirement that needs to be fixed. Softwaretesting is a part of quality control process and itfocuses only on product oriented activities. Softwaretesting is carried out during the testing phase andonly defects are identified and not corrected in thisprocess. Fixing defects is not a part of softwaretesting.Quality Assurance VS Quality ControlAnother subject that is closely related to qualityassurance is quality control. People often getconfused between the two but there is a hugedifference. While quality assurance is all aboutpreventive activities, quality control focuses oncorrective processes.16

Here is what you need to understand: softwaretesting is a subset of quality control and qualitycontrol is a subset of quality assurance. The entirefocus of Quality assurance is on implementation ofprocesses and procedures that are required for theverification of the software under development andthe requirements of the client.Quality Assurance VS Quality ControlQuality control on the other hand deals with actualactivities that ensure that the product is beingdeveloped as per the defined requirements. It dealswith all the actions that are important to control andverify certain characteristics of the product includingtesting. Examination and testing of the products isthe most important aspect of quality control.Companies employ quality control team to identify ifthere is any product or service that does not meetthe company’s standard of quality. If there is an issuethe quality control team has the authority to stop theproduction of that product till the issue is resolved.Importance of Audit and InspectionAudit comprises of some very systematic processesthat define how the software testing is taking place inthe organization. The audit team examines all theprocesses that are conducted at the time of testing.IEEE defines audit as a review of documentedprocesses to ensure that the organization or a teamis following all the processes as per the definedstandards.Inspection can be a formal or an informal review ofsoftware requirement, designer or code. It isconducted by a team or an individual person otherthan the author to check if there are any violations ordeviations from the defined development standards.The following processes are considered as part ofInspection:1 Planning2 Overview Preparation3 Inspection Meeting4 Rework5 Follow up17

What Is Software Testing?carried out at all levels of software testing – unit,integration, system and acceptance.So, finally we come to the main topic that is softwaretesting itself. You have already understood themeaning of software testing and why it is importantwhile going through the previous sections. Here,from this section onwards we will take an in-depthlook at the subject, but before we move on let’s justrevise the definition of software testing.Software testing is nothing but the process ofassessing the functionality of software to ensure thatit is in line with the requirements of the customer.Testing is broadly classified into:1 Dynamic Testing: carried out by executing theprogram2 Static Testing: involves examination of codeand related documents.Dynamic and static testing is often used together.Black Box TestingBlack box testing focuses only on the functionality ofthe software. The tester does not look into theinternal details of the software. Black box testing isBlack Box TestingThe testing procedures for black box testing are verysimple. The tester only focuses on what the softwareis supposed to do. The tester is not supposed tofocus on how the software is managing the functioninternally. The test cases for black box testing arecreated keeping only the specifications andrequirements in mind. No test case is created tocheck the internal logic of the software. The testerjust feeds in valid and invalid inputs and checks theoutput for these values.18

White Box TestingUnlike black box testing, white box testing is carriedout in depth to the level of the source code. In thisform of testing the internal logic, its implementationand working is examined and the test cases arewritten to check the how the software is working atthe internal level. White box testing can be carriedout at the level of unit, integration and system level.White box testing is often used to detect internaldesign errors which are otherwise very difficult touncover however, this form of testing does not checkfor missing requirements or specifications.the code is executed at least once. The idea behindthis form of testing is to ensure that every statementin every block of code is executed at least once andthe results are observed. This form of testing is alsoreferred to as line coverage or segment coverageform of testing.The point to be noted here is that every statement isexecuted once which means that there may be someconditions in some blocks that may not get tested inthis manner. Therefore there is a possibility thatsome errors may go undetected in statementcoverage process.Decision CoverageDecision coverage or branch coverage deals withtesting of all true and false conditions of the code.The reason why it is also called branch coverage isbecause a branch is an outcome of decision. It isconsidered to be a more effective form of testingthan simple statement coverage. A decisionstatement can be:White Box TestingStatement CoverageStatement coverage is a form of testing in whichcode is tested in such a way that each statement of123An IF statementA loop control statement such as do-whileA statement that can have two or moreoutcomes also known as CASE statement.19

The good thing about decision coverage is that youare able to validate all branches in the code and it isable to check the efficiency of the code in a bettermanner than statement coverage approach.Condition CoverageCondition coverage testing is carried out to checkconditions which are generally Boolean expressionsand provide result in TRUE or FALSE. Conditioncoverage may or may not cover the entire decisioncoverage. In this process only those conditions thatreturn true or false are tested. The expressions thatreturns a Boolean condition generally plays a veryimportant role in the final decision. This is the reasonwhy condition coverage testing is carried out.Decision / Condition CoverageAs the name suggests decision/condition coveragemethodology includes testing all decisions and all thelogical conditions with all possible scenarios that cangenerate a true or false outcome. It is considered tobe a very strong way of testing software.For example:If (x true OR y true)ThenPrint (“Hello”)ElsePrint (“Bye”)Here, in this case there are four possible conditioncombinations:Testcase1: x true; y trueTestcase2: x true; y falseTestcase3: x false; y trueTestcase4: x false; y falseSimilarly, for 3 expressions there will be 8combinations of conditions.Multiple Condition CoverageMultiple condition coverage or conditioncombination coverage is carried out to check outputfor multiple combinations of conditions.20

Fundamentals of SoftwareTestingSoftware testing is a vast subject. There are softwareapplications and system engineered for numerousdomains and industries, and for a tester, everytesting project is a new challenge because he has tounderstand the client’s point of view and the domainbefore moving on with testing activities. From projectto project, a tester may have to change the testingmethodologies as well. It is therefore very importantto keep the fundamentals right. Getting thefundamentals right in the first place is biggestprerequisite to become successful in softwaretesting.Why Software Testing Is Necessary?An error, defect or a bug can be caused bydevelopers. It is not intentional but considering thecomplexity with which various software are beingdeveloped these days, it is quite possible for adeveloper to misunderstand and implement wronglogic and produce wrong code.Testing is necessary because it helps us in identifyingthe faults in software. Once these defects have beendetected they can be easily rectified and quality ofthe software can be improved. So, software testing isnecessary so that bug free applications can bedeveloped and delivered. When a company decidesto develop software for a client there are certainlegal, contractual and industry-specific requirementsbased on the deal is made. A quality consciouscompany will definitely include software testing in itsbest practices.It is difficult to say how much testing is enough butthe fact is that if testing is planned carefully andgood test cases are made then it is very muchpossible to deliver high quality software.Who Does The Software Testing?There is often a debate on who should actually testthe software. People often question that whydevelopers are not allowed to test. Well, a developergenerally checks his code several times before hesubmits it for testing and still in most cases it isnever error free because a developer is generallyblind to his own mistakes.A tester on the other hand looks at software fromthe point of view of the client. He is unbiased and hisfocus is only on the specifications and the21

requirements. So, a tester is able to look into areasthat a developer may have ignored. So, the testingshould always be carried out by independent testers.This approach does have some disadvantages. Whenthe development and testing teams are differentthere is often a communication gap and sometimes,developers become careless towards coding and donot revise their code because they think that it is all atester’s job thereby increasing the burden on thetester.Many times developers share their work amongsteach other and test each other’s work. This is knownas buddy testing. Every development team shouldhave dedicated testers and every project generallyhas at least one dedicated testing team. Somecompanies believe in having separate teams fordifferent types of testing, this means different teamsfor usability, performance, security and other formsof testing. Some companies believe in outsourcingsoftware testing work which means they hire a firmor independent testers or consultants to have a lookat and test their project.What Has To Be Really Tested?The tester should have a good understanding aboutthe project requirements. A fair idea about the realtim e scenar io where the softwa re will beimplemented can help the tester understand how tocarry out testing for the project. It is very importantto know what has to be really tested in order todevise a testing strategy.What Has To Be Really Tested?When Is The Software Testin

Software Testing book. I want to briefly share with you why we wanted to write this book for you and how you can get the best use out of it. Within the context of our Software Testing certification program we made a thorough research in Software Testing education s