Lab. #1 – Defect (Bug) Reporting

Transcription

MTAT.03.159-Software Testing1/13MTAT.03.159-Software TestingLab. #1 – Defect (Bug) Reporting, Manual Testing, and RegressionTestingInstitute Of Computer ScienceUniversity of Tartu1INTRODUCTIONThis lab can be divided into three main parts: Familiarization Manual functional testing 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 1 day delay. There will be no credit points for reports turnedin after the 1 day delay date.1.2EXAMPLE REPOSITORIES OF REAL DEFECTSThe following are example repositories of real defects for real projects in the software industry. Makesure to 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).Page 1 of 13

MTAT.03.159-Software Testing2/132INSTRUCTIONSThe 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 locationand 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: 1002.1Savings: 1000Money Market: 5000FAMILIARIZATION 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 B.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 off 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.13. Press the System Power Button once again to turn the ATM system off.Page 2 of 13

MTAT.03.159-Software Testing3/132.2FAMILIARIZATION WITH JIRA2.2.1Logging 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.2Reporting 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).Click the “Create” button at the bottom of the page.2.2.3Displaying all defects for a projectsChoose Issues Search for Issues. The issue navigator is displayed.Page 3 of 13

MTAT.03.159-Software Testing4/13Select 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.4Editing 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 oflinks to edit the components, versions or group access rights. This is where you can alter the productsettings later 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 differ 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.2.4DEFECT 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 thiswe must 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” buttonPage 4 of 13

MTAT.03.159-Software Testing5/13and 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 inthe ATM system version 1.1, change the status to Reopened by clicking “QA not satisfied” andwrite a 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 effectively 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: If you work in a pair, 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 thereport contain all the defects in the same level of detail? Does it contain the input, theexpected output, and the faulty output for each defect?2. Clarity and adherence to defect reporting guidelines: Is it obvious where to start(what state to bring the program to) to replicate the defect? Is it obvious what youwould type? Is it obvious what files to use (if any)?3 points3 pointsImportant: we will not count points for the defects reported in JIRA if the lab report in pdf format is notsubmitted through the course page.3.3LAB 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:Page 5 of 13

MTAT.03.159-Software Testing6/13Lab Report (3 POINTS)3. Number of defects found. Outline defects and corresponding test cases (it’s enoughto put a reference to the JIRA bug report). Also mark whether defect has been fixed inversion 1.1 or not. We expect to see at least 10 issue reports.4. General comments and conclusions on performing the lab. Did you find it a usefulpractice? Was it easy to follow? Did you spend too little/too much time on it? Shouldsome parts be dropped or explained better? Is something missing? Etc. Please try to beconstructive.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 SoftwareTesting New York: John Wiley & Sons Inc., 2002.[2]C. Kaner, "Assignment - Replicate and Edit Bugs," 2008.Page 6 of 13

MTAT.03.159-Software Testing7/13APPENDIX A BUG REPORT EXAMPLEPage 7 of 13

MTAT.03.159-Software Testing8/137APPENDIX B – USER INTERFACE FOR ATM SIMULATION SYSTEMPage 8 of 13

MTAT.03.159-Software Testing9/138APPENDIX C – DEFECT LIFECYCLE FROM INITIAL REPORT TO CLOSEDPage 9 of 13

MTAT.03.159-Software Testing10/139Test Case#APPENDIX D - FUNCTIONAL TEST SUITEUse CaseFunction BeingTestedInitial System StateInputExpected Output1SystemStartupSystem is startedwhen the switch isturned "on"System is offActivate the"on" switchSystem requests initial cashamount2SystemStartupSystem accepts initialcash amountSystem is requestingcash amountEnter alegitimateamountSystem is on3SystemStartupConnection to thebank is establishedSystem has just beenturned onPerform alegitimateinquirytransactionSystem output shoulddemonstrate that a connection hasbeen established to the Bank4SystemShutdownSystem is shut downwhen the switch isturned "off"System is on andnot servicing acustomerActivate the"off" switchSystem is off5SessionSystem reads acustomer's ATM cardSystem 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 asking forentry of PINEnter a PINSystem displays a menu oftransaction types8SessionSystem allowscustomer to performa transactionSystem is displayingmenu of transactiontypesPerform atransactionSystem asks whether customerwants another transaction9SessionSystem allowsmultiple transactionsin one sessionSystem is askingwhether customerwants anothertransactionAnswer yesSystem displays a menu oftransaction types10SessionSession ends whencustomer chooses notto do anothertransactionSystem is askingwhether customerwants anothertransactionAnswer noSystem ejects card and is ready tostart a new session11TransactionSystem handles aninvalid PIN properlyA readable card hasbeen enteredEnter anincorrect PINand thenattempt atransactionThe Invalid PIN Extension isperformed12WithdrawalSystem askscustomer to choosean account towithdraw fromMenu of transactiontypes is beingdisplayedChooseWithdrawaltransactionSystem displays a menu ofaccount types13WithdrawalSystem asksMenu of accountChooseSystem displays a menu ofPage 10 of 13

MTAT.03.159-Software Testing11/13Test Case#Use CaseFunction BeingTestedInitial System StateInputExpected Outputcustomer to choose adollar amount towithdrawtypes is beingdisplayedcheckingaccountpossible withdrawal amounts14WithdrawalSystem performs alegitimatewithdrawaltransaction properlySystem is displayingthe menu 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 (showing bothmessage to the bank and approvalback)15WithdrawalSystem verifies that ithas sufficient cash onhand to fulfill therequestSystem has beenstarted up with lessthan the maximumwithdrawal amountin cash on hand;System is requestinga withdrawalamountChoose anamount greaterthan what thesystemcurrently hasSystem displays an appropriatemessage and asks customer tochoose a different amount16WithdrawalSystem verifies thatcustomer's balance issufficient to fulfill therequestSystem is requestinga withdrawalamountChoose anamount thatthe systemcurrently hasbut which isgreater thanthe accountbalanceSystem displays an appropriatemessage and offers customer theoption of choosing to do anothertransaction or not.17WithdrawalA withdrawaltransaction can becancelled by thecustomer any timeprior to choosing thedollar amountSystem is displayingmenu of accounttypesPress "Cancel"keySystem displays an appropriatemessage and offers customer theoption of choosing to do anothertransaction or not.18WithdrawalA withdrawaltransaction can becancelled by thecustomer any timeprior to choosing thedollar amountSystem is displayingmenu of dollaramountsPress "Cancel"keySystem displays an appropriatemessage and offers customer theoption of choosing to do anothertransaction or not.19DepositSystem askscustomer to choosean account to deposittoMenu of transactiontypes is beingdisplayedChooseDeposittransactionSystem displays a menu ofaccount types20DepositSystem askscustomer to enter adollar amount todepositMenu of accounttypes is beingdisplayedChoosecheckingaccountSystem displays a request for thecustomer to type a dollar amount21DepositSystem askscustomer to insert anenvelopeSystem is displayinga request for thecustomer to type aEnter alegitimateSystem requests that customerinsert an envelopePage 11 of 13

MTAT.03.159-Software Testing12/13Test Case#Use CaseFunction BeingTestedInitial System StateInputdollar amountdollar amountExpected Output22DepositSystem performs alegitimate deposittransaction properlySystem is requestingthat customer insertan envelopeInsert 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 deposit transactioncan be cancelled bythe customer anytime prior toinserting an envelopeSystem is displayingmenu of accounttypesPress "Cancel"keySystem displays an appropriatemessage and offers customer theoption of choosing to do anothertransaction or not.24DepositA deposit transactioncan be cancelled bythe customer anytime prior toinserting an envelopeSystem is requestingcustomer to enter adollar amountPress "Cancel"keySystem displays an appropriatemessage and offers customer theoption of choosing to do anothertransaction or not.25DepositA deposit transactioncan be cancelled bythe customer anytime prior toinserting an envelopeSystem is requestingcustomer to insertan envelopePress "Cancel"keySystem displays an appropriatemessage and offers customer theoption of choosing to do anothertransaction or not.26TransferSystem askscustomer to choosean account to transferfromMenu of transactiontypes is beingdisplayedChooseTransfertransactionSystem displays a menu ofaccount types specifying transferfrom27TransferSystem askscustomer to choosean account to transfertoMenu 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 displayedChoose savingsaccountSystem displays a request for thecustomer to type a dollar amount29TransferSystem performs alegitimate transfertransaction properlySystem is displayinga request for thecustomer to type adollar amountEnter alegitimatedollar amountSystem prints a correct receiptshowing amount and correctupdated balance;System records transactioncorrectly in the log (showing bothmessage to the bank and approvalback)30TransferA transfertransaction can becancelled by thecustomer any timeprior to enteringSystem is displayingmenu of accounttypes specifyingtransfer fromPress "Cancel"keySystem displays an appropriatemessage and offers customer theoption of choosing to do anothertransaction or not.Page 12 of 13

MTAT.03.159-Software Testing13/13Test Case#Use CaseFunction BeingTestedInitial System StateInputExpected Outputdollar amount31TransferA transfertransaction can becancelled by thecustomer any timeprior to enteringdollar amountSystem is displayingmenu of accounttypes specifyingtransfer toPress "Cancel"keySystem displays an appropriatemessage and offers customer theoption of choosing to do anothertransaction or not.32TransferA transfertransaction can becancelled by thecustomer any timeprior to enteringdollar amountSystem is requestingcustomer to enter adollar amountPress "Cancel"keySystem displays an appropriatemessage and offers customer theoption of choosing to do anothertransaction or not.33InquirySystem askscustomer to choosean account to inquireaboutMenu of transactiontypes is beingdisplayedChoose InquirytransactionSystem displays a menu ofaccount types34InquirySystem performs alegitimate inquirytransaction properlySystem is displayingmenu of accounttypesChoosecheckingaccountSystem prints a correct receiptshowing correct balance;System records transactioncorrectly in the log (showing bothmessage to the bank and approvalback)35InquiryAn inquirytransaction can becancelled any timeprior to choosing anaccountSystem is displayingmenu of accounttypesPress "Cancel"keySystem displays an appropriatemessage and offers customer theoption of choosing to do anothertransaction or not.Page 13 of 13

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