Lab. #1 – Defect (Bug) Reporting - Ut

Transcription

MTAT.03.159-Software TestingMTAT.03.159-Software Testing1/15Lab. #1 – Defect (Bug) Reporting, Manual Testing,and Regression TestingInstitute Of Computer ScienceUniversity of TartuTABLE OF CONTENTS1.1Due Date and Late Marking Policy.21.2Pre-lab.21.2.1Example Repositories of Real Defects.21.2.2System Under Test.32.1Familiarization with the System Under Test.32.1.1Perform a deposit.32.2Familiarization with JIRA.42.2.1Logging in.42.2.2 Reporting a defect.42.2.3 Displaying all defects for a projects.52.2.4 Editing a project.52.3Manual Functional Testing.52.4Defect Correction Verification and Regression Testing.62.5Summary.63.1 In-Lab Demonstration of Progress (10%).63.2 JIRA Deffect Reports (60%).63.3 Lab Report (30%).7Page 1 of 15

MTAT.03.159-Software Testing2/151INTRODUCTIONThis lab can be divided into three main parts: Familiarization Manual functional testing, and Regression testingThis lab is a simple introduction to some of the concepts inherent to software testing. This includes handson experience in testing an example software system, and following industrial defect tracking practicesthrough several phases of defects’ life cycles. The focus of this lab is to provide good issue reportingpractice. Also students will be able to compare manual and regression testing strategies.Sections 2.1 through 2.3 will be performed in pairs. The lab report will be completed and submitted byeach student group. Make sure to include the names of both students in the lab report.1.1DUE DATE AND LATE MARKING POLICYLab report should be submitted through the submission form on the course home Main/Submission). Deadline for submissions is 7 daysfrom current lab session. For example if the lab has been done on Tuesday 16.15, the deadline is onfollowing Monday at 23:59.Late reports: There will be 50% penalty for one day delay. There will be no credit points for reports turnedafter the one day delay date.1.2PRE-LAB1.2.1 Example Repositories of Real DefectsThe following are example repositories of real defects for real projects in the software industry. Make sureto review many examples to see how other experienced testers write defect reports. ues.apache.org/jira/browse/FLEX/?selectedTab ectedTab elAn example with explanations can be found in Appendix A (the screen shot has been taken from Bugzillabug tracking tool).1.2.2 System Under TestThe system under test for this lab is an ATM simulation system. To use the ATM simulation systemsimply download “ATM System – Lab 1 Version 1.0.jar” from course page, save it in a known location,Page 2 of 15

MTAT.03.159-Software Testing3/15and run that file from the saved location. The system should begin execution with the GUI as shown inAppendix B.There are two valid hard-coded card numbers and PINs:Card Number: 1PIN: 42Available Accounts: Checking and SavingsCard Number: 2PIN: 1234Available Accounts: Checking and Money MarketNote: Both of these cards access the same checking account.The initial balances are:Checking: 100Savings: 1000Money Market: 50002INSTRUCTIONS2.1FAMILIARIZATION WITH THE SYSTEM UNDER TEST1.2.If you haven’t done so already, download the ATM simulation system version 1.0 from coursepage.Run the JAR file version 1.0 file to show the GUI as shown in Appendix A.2.1.1 Perform a deposit3.Turn the system on using the “On” button.4.Enter the number of 20 bills that the system is assumed to start of with, noting that this is thenumber of bills, not the total value of the bills. Entering a value of 10 for instance indicates thatthe ATM is starting with 200 (10 twenty dollar bills). Any number greater than 0 will suffice fornow.5.Click on the “Click to insert card” button which has now appeared on the main interface belowthe simulated ATM display.6.The screen now changes to a prompt for the user to input the card number (since there is noactual physical card reader). Enter 1 for the card number and press Enter. Upon returning to themain screen, the display is now requesting the PIN be entered.7.Type 42 using the simulated keypad and press Enter. The display now prompts the user toperform one of four transactions: withdraw, deposit, balance inquiry, or transfer.8.Press 2 on the simulated keypad to perform a deposit. The display now prompts the user toindicate which account they would like to deposit to: checking, savings, or the money marketaccount.9.Press 2 on the simulated keypad to deposit to the savings account. The display now prompts theuser to enter the deposit amount.10. Enter any positive amount and press Enter. A button which represents the user inserting thedeposit envelope now appears.11. Click that button to simulate inserting the envelope. The display now prompts the user whetherthey wish to perform another transaction or not.12. Press 2 on the simulated keypad to indicate you do not wish to perform another transaction. Themain window shows a button appearing, simulating the ejecting of the user’s card.Page 3 of 15

MTAT.03.159-Software Testing4/1513. Press the System Power Button once again to turn the ATM system of.2.2FAMILIARIZATION WITH JIRA2.2.1 Logging inLog in to JIRA account that has been created for you. If you didn't receive an e-mail about accountcreation or not sure which e-mail address has been used, please ask the TA for the assistance. Follow thelink in your e-mail notification. You should now be logged in and viewing the JIRA main page.2.2.2 Reporting a defectBegin by clicking on the “Create issue” button on the navigation bar to begin reporting a new defect for aspecific project. Select the relevant “Group N project” and Issue Type “Bug” on the Create Issue dialogbox. A screen shot of the form is shown below:Type a Summary for the issue and complete any appropriate fields — at least required ones which aremarked by an asterisk. If you want to access fields that are not shown on this dialog box, then click theConfigure Fields button at the top right of the screen. Click Custom and select the fields you want toshow or hide by selecting or clearing the relevant check boxes, respectively, or click All to show all fields.Think of a defect that you have seen (or make one up) in your least favorite piece of software, and enterdetails in the Summary and Description fields. When filling in the description, try to include high leveldescription of the defect, the steps to reproduce, the actual results (what happened), and the expectedresults (what should have happened).Page 4 of 15

MTAT.03.159-Software Testing5/15Click the “Create” button at the bottom of the page.2.2.3 Displaying all defects for a projectsChoose Issues Search for Issues. The issue navigator is displayed.Select the “Group N project” project from the project list. A list of all defects logged for the product isdisplayed. You can search against specific fields and/or search for specific text.There is also a possibility to switch to Advanced searching mode.2.2.4 Editing a projectTo edit the settings of a project, first navigate to this project (Projects “Group N project”), then click onthe “Administration” link on one of the navigation bars. Along the left side of the page are a series of linksto edit the components, versions or group access rights. This is where you can alter the product settingslater on. For now just make note of the options available to you.2.3MANUAL FUNCTIONAL TESTINGThis section is to be performed in pairs. One student can ‘drive’ the testing (operate the computerexecuting the system under test), while the other student keeps track of which tests have been performed,reports any defects found, and determines what order to execute tests in.14. In Appendix D, a basic test suite has been provided for this SUT. You can pick arbitrary numberof test cases from the test suite. Execute selected test cases at least once, verifying that the actualresults match the expected results for each case. Report any defects found as described below. Weexpect you to find and report at least 9 defects.15. Reporting defects: While performing your testing, make sure to record the following informationfor each test case into description field: The function being tested (e.g., Login) The initial state of the system (e.g., System is on and is idle, i.e., not already serving a customer) The action to take (e.g., Insert a card, enter correct card number and PIN) The expected outcome (e.g., the system successfully accepts the customer, and shows the bankingmenu) While performing the tests, if any of the actual results difer from the expected results, report thatas a defect in the report.16. Reporting defects in a simple, concise manner. When reporting defects, follow the guidelines inthe Sample Bug Report article ort), anduse the same style as in Appendix A.17. When reporting these defects, ensure that version 1.0 is selected in the Affect Version/s field.Page 5 of 15

MTAT.03.159-Software Testing2.46/15DEFECT CORRECTION VERIFICATION AND REGRESSION TESTINGThis section is to be performed in pairs. The defects reported in the two previous stages of testing can bedivided among the group and can be retested individually.18. Download the updated version (version 1.1) of the ATM simulation system from course page.This version of the system has been partially fixed by imaginary developers based on the defectreports previously existing.19. Retest each of these defects to determine which have been fixed and which have not. To do this wemust follow the defect lifecycle as shown in Appendix C. Since we do not know which defectshave been fixed exactly, assume that all defects have had an attempt to fix them (to emulate thedeveloper's progress on the bug open the issue by clicking on it and click “Start Progress” buttonand then “Fixed”). If the defect has actually been fixed in the ATM system version 1.1, change thestatus to Verified by clicking “QA verifies solution”. If the defect has not actually been fixed in theATM system version 1.1, change the status to Reopened by clicking “QA not satisfied” and writea comment stating “Defect still exists in version 1.1”.20. When reporting these defects, ensure that version 1.1 is selected.2.5SUMMARYWithin your group, you should now each have a general understanding of how to efectively report andtrack defects. You have also progressed through a short iteration of manual functional testing and aniteration of regression testing.3DELIVERABLES AND GRADINGBoth students of each group must attend the lab session. The maximum number of points is 10. Points areallocated as follows:3.1IN-LAB DEMONSTRATION OF PROGRESS (1 POINT)You will be required to demonstrate your progress to the TA during lab time.Note: Both students of each group should be present in the demo times.3.2JIRA DEFECT REPORTS (6 POINTS)Students will be graded on their defect reports AS SAVED IN THE JIRA SYSTEM. Please do not repeatyour bug reports in your lab reports! The grading criteria (rubric) for defect reports are as follows.JIRA Defect Report (6 POINTS)1. Correctness: Do the defect reports contain the detailed defect information? Does the report3 pointscontain all the defects in the same level of detail? Does it contain the input, the expected output,and the faulty output for each defect?2. Clarity and adherence to defect reporting guidelines: Is it obvious where to start (what state to3 pointsbring the program to) to replicate the defect? Is it obvious what you would type? Is it obviouswhat files to use (if any)?Important: we will not count points for the defects reported in JIRA if the lab report in pdf format is notsubmitted through the course page.Page 6 of 15

MTAT.03.159-Software Testing3.37/15LAB REPORT (3 POINTS)Important: lab report should be submitted through the submission form on the course home page. LABREPORT SUBMISSION IS TREATED AS A TIMESTAMP OF FINISHED WORK. IF STUDENTS DO NOTSUBMIT THE REPORT WE ASSUME THAT THE WORK IS NOT DONE. Lab reports should besubmitted in PDF format only. Deadline for submissions is 7 days from current lab session.Students will be required to submit one report from group. In the report should be included:Lab Report (3 POINTS)3. Number of defects found. Outline defects and corresponding test cases. Also mark whetherdefect has been fixed in version 1.1 or not. We expect to see at least 9 issue reports.4. General comments and conclusions on performing the lab. Did you find it a useful practice?Was it easy to follow? Did you spend too little/too much time on it? Should some parts bedropped or explained better? Is something missing? Etc. Please try to be constructive.4INTERESTING QUOTES AND WEB LINKS “Bug Advocacy: Lesson 59 - Take the time to make your bug reports valuable” “Bug Advocacy: Lesson 57 - Make your bug report an effective sales tool” “Bug Advocacy: Lesson 62 - Report perceived quality gaps as bugs” “Bug Advocacy: Lesson 67 - Report defects promptly” “Bug Advocacy: Lesson 68 - Never assume that an obvious bug has already been filed” “Bug Advocacy: Lesson 72 - Minor bugs are worth reporting and fixing” “Bug Advocacy: Lesson 84 - Never exaggerate your bugs” “Bug Advocacy: Lesson 85 - Report the problem clearly, but don't try to solve it”2 points1 pointFrom Cem Kaner’s book “Lessons Learned in Software Testing” Cem Kaner's slides on Bug Advocacy: MENTSThe original version of this lab package was developed by Prof. Vahid Garousi at the University ofCalgary and is part of a large software testing laboratory courseware available under a CreativeCommons license for other testing educators.We are also grateful for improvement suggestions proposed and introduced into these lab instructions byOliver Vilson of Celeg Hannas OÜ.6REFERENCES[1]J. B. Cem Kaner, Bret Pettichord, "Chapter 4 - Bug Advocacy," in Lessons Learned in Software TestingNew York: John Wiley & Sons Inc., 2002.[2]C. Kaner, "Assignment - Replicate and Edit Bugs," 2008.Page 7 of 15

MTAT.03.159-Software TestingAPPENDIX A DUG REPORT EXAMPLE8/15Page 8 of 15

MTAT.03.159-Software Testing9/157APPENDIX B – USER INTERFACE FOR ATM SIMULATION SYSTEMPage 9 of 15

MTAT.03.159-Software Testing10/158APPENDIX C – DEFECT LIFECYCLE FROM INITIAL REPORT TO CLOSEDPage 10 of 15

MTAT.03.159-Software Testing11/159Test Case#APPENDIX D - FUNCTIONAL TEST SUITEUse CaseFunction BeingTestedInitial SystemStateInputExpected Output1SystemStartupSystem is startedwhen the switch isturned "on"System is ofActivate the"on" switchSystem requests initial cashamount2SystemStartupSystem acceptsinitial cash amountSystem isrequesting cashamountEnter alegitimateamountSystem is on3SystemStartupConnection to thebank is establishedSystem has justbeen turned onPerform alegitimateinquirytransactionSystem output shoulddemonstrate that a connectionhas been established to the Bank4SystemShutdownSystem is shutdown when theswitch is turned"of"System is on andnot servicing acustomerActivate the"of" switchSystem is of5SessionSystem reads acustomer's ATMcardSystem is on andnot servicing acustomerInsert areadable cardCard is accepted;System asks for entry of PIN6SessionSystem rejects anunreadable cardSystem is on andnot servicing acustomerInsert anunreadablecardCard is ejected;System displays an error screen;System is ready to start a newsession7SessionSystem acceptscustomer's PINSystem is askingfor entry of PINEnter a PINSystem displays a menu oftransaction types8SessionSystem allowscustomer toperform atransactionSystem isdisplaying menu oftransaction typesPerform atransactionSystem asks whether customerwants another transaction9SessionSystem allowsmultipletransactions in onesessionSystem is askingwhether customerwants anothertransactionAnswer yesSystem displays a menu oftransaction types10SessionSession ends whencustomer choosesnot to do anothertransactionSystem is askingwhether customerwants anothertransactionAnswer noSystem ejects card and is readyto start a new session11TransactionSystem handles aninvalid PINproperlyA readable cardhas been enteredEnter anincorrect PINand thenThe Invalid PIN Extension isperformedPage 11 of 15

MTAT.03.159-Software Testing12/15Test Case#Use CaseFunction BeingTestedInitial SystemStateInputExpected Outputattempt atransaction12WithdrawalSystem askscustomer to choosean account towithdraw fromMenu oftransaction types isbeing displayedChooseWithdrawaltransactionSystem displays a menu ofaccount types13WithdrawalSystem askscustomer to choosea dollar amount towithdrawMenu of accounttypes is beingdisplayedChoosecheckingaccountSystem displays a menu ofpossible withdrawal amounts14WithdrawalSystem performs alegitimatewithdrawaltransaction properlySystem isdisplaying themenu ofwithdrawalamountsChoose anamount thatthe systemcurrently hasand which isnot greaterthan theaccountbalanceSystem dispenses this amount ofcash;System prints a correct receiptshowing amount and correctupdated balance;System records transactioncorrectly in the log (showingboth message to the bank andapproval back)15WithdrawalSystem verifies thatit has sufficient cashon hand to fulfillthe requestSystem has beenstarted up withless than themaximumwithdrawalamount in cash onhand;System isrequesting awithdrawalamountChoose anamountgreater thanwhat thesystemcurrently hasSystem displays an appropriatemessage and asks customer tochoose a diferent amount16WithdrawalSystem verifies thatcustomer's balanceis sufficient to fulfillthe requestSystem isrequesting awithdrawalamountChoose anamount thatthe systemcurrently hasbut which isgreater thanthe accountbalanceSystem displays an appropriatemessage and ofers customer theoption of choosing to do anothertransaction or not.17WithdrawalA withdrawaltransaction can becancelled by thecustomer any timeprior to choosingthe dollar amountSystem isdisplaying menu ofaccount typesPress "Cancel"keySystem displays an appropriatemessage and ofers customer theoption of choosing to do anothertransaction or not.Page 12 of 15

MTAT.03.159-Software Testing13/15Test Case#Use CaseFunction BeingTestedInitial SystemStateInputExpected Output18WithdrawalA withdrawaltransaction can becancelled by thecustomer any timeprior to choosingthe dollar amountSystem isdisplaying menu ofdollar amountsPress "Cancel"keySystem displays an appropriatemessage and ofers customer theoption of choosing to do anothertransaction or not.19DepositSystem askscustomer to choosean account todeposit toMenu oftransaction types isbeing displayedChooseDeposittransactionSystem displays a menu ofaccount types20DepositSystem askscustomer to enter adollar amount todepositMenu of accounttypes is beingdisplayedChoosecheckingaccountSystem displays a request for thecustomer to type a dollaramount21DepositSystem askscustomer to insertan envelopeSystem isdisplaying arequest for thecustomer to type adollar amountEnter alegitimatedollar amountSystem requests that customerinsert an envelope22DepositSystem performs alegitimate deposittransaction properlySystem isrequesting thatcustomer insert anenvelopeInsert anenvelopeSystem accepts envelope;System prints a correct receiptshowing amount and correctupdated balance;System records transactioncorrectly in the log (showingmessage to the bank, approvalback, and acceptance of theenvelope)23DepositA deposittransaction can becancelled by thecustomer any timeprior to inserting anenvelopeSystem isdisplaying menu ofaccount typesPress "Cancel"keySystem displays an appropriatemessage and ofers customer theoption of choosing to do anothertransaction or not.24DepositA deposittransaction can becancelled by thecustomer any timeprior to inserting anenvelopeSystem isrequestingcustomer to enter adollar amountPress "Cancel"keySystem displays an appropriatemessage and ofers customer theoption of choosing to do anothertransaction or not.25DepositA deposittransaction can becancelled by theSystem isrequestingcustomer to insertPress "Cancel"keySystem displays an appropriatemessage and ofers customer theoption of choosing to do anotherPage 13 of 15

MTAT.03.159-Software Testing14/15Test Case#Use CaseFunction BeingTestedInitial SystemStatecustomer any timeprior to inserting anenvelopean envelopeInputExpected Outputtransaction or not.26TransferSystem askscustomer to choosean account totransfer fromMenu oftransaction types isbeing displayedChooseTransfertransactionSystem displays a menu ofaccount types specifying transferfrom27TransferSystem askscustomer to choosean account totransfer toMenu of accounttypes to transferfrom is beingdisplayedChoosecheckingaccountSystem displays a menu ofaccount types specifying transferto28TransferSystem askscustomer to enter adollar amount totransferMenu of accounttypes to transfer tois being displayedChoosesavingsaccountSystem displays a request for thecustomer to type a dollaramount29TransferSystem performs alegitimate transfertransaction properlySystem isdisplaying arequest for thecustomer to type adollar amountEnter alegitimatedollar amountSystem prints a correct receiptshowing amount and correctupdated balance;System records transactioncorrectly in the log (showingboth message to the bank andapproval back)30TransferA transfertransaction can becancelled by thecustomer any timeprior to enteringdollar amountSystem isdisplaying menu ofaccount typesspecifying transferfromPress "Cancel"keySystem displays an appropriatemessage and ofers customer theoption of choosing to do anothertransaction or not.31TransferA transfertransaction can becancelled by thecustomer any timeprior to enteringdollar amountSystem isdisplaying menu ofaccount typesspecifying transfertoPress "Cancel"keySystem displays an appropriatemessage and ofers customer theoption of choosing to do anothertransaction or not.32TransferA transfertransaction can becancelled by thecustomer any timeprior to enteringdollar amountSystem isrequestingcustomer to enter adollar amountPress "Cancel"keySystem displays an appropriatemessage and ofers customer theoption of choosing to do anothertransaction or not.33InquirySystem askscustomer to chooseMenu oftransaction types isChooseInquirySystem displays a menu ofaccount typesPage 14 of 15

MTAT.03.159-Software Testing15/15Test Case#Use CaseFunction BeingTestedInitial SystemStateInputan account toinquire aboutbeing displayedtransactionExpected Output34InquirySystem performs alegitimate inquirytransaction properlySystem isdisplaying menu ofaccount typesChoosecheckingaccountSystem prints a correct receiptshowing correct balance;System records transactioncorrectly in the log (showingboth message to the bank andapproval back)35InquiryAn inquirytransaction can becancelled any timeprior to choosing anaccountSystem isdisplaying menu ofaccount typesPress "Cancel"keySystem displays an appropriatemessage and ofers customer theoption of choosing to do anothertransaction or not.Page 15 of 15

2.2 FAMILIARIZATION WITH JIRA 2.2.1 Logging in Log in to JIRA account that has been created for you. If you didn't receive an e-mail about account creation or not sure which e-mail address has been used, please ask the TA for the assistance. Follow the link in your e-mail notification. You should now be l