1 / 23

Software Testing

Software Testing. Tutorial 6. IT323 - Software Engineering 2. Q1. Using your java, C# or other programming language skill, derive a checklist of common errors (NOT syntax errors) that could not be detected by a compiler but that could be detected in a program inspection? . Answer :.

erma
Download Presentation

Software Testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Software Testing Tutorial 6 IT323 - Software Engineering 2

  2. Q1 • Using your java, C# or other programming language skill, derive a checklist of common errors (NOT syntax errors) that could not be detected by a compiler but that could be detected in a program inspection?

  3. Answer : • Dynamic variables are cleared properly when they’re no longer needed • Recursive functions have logic to prevent infinite recursion • Iterative loops have logic to prevent infinite loops • Variables are not in danger of being too limited with large numbers • Logic statements are defined correctly

  4. Q2 • An item in inventory can have a quantity of - 9999 to + 9999, identify the test cases from this specification using partition testing.

  5. Answer : The equivalence partitions are: • If x < -9999 • If -9999 ≤x ≤+9999 • If x > +9999 Test cases: {-10000, -9999, 0, +9999, 10000}

  6. Q3 • A headmaster enter the students level . She will enter P if the student in primary school . She will enter I if the student in Intermediate school . She will enter S if the student in Secondary school. identify the test cases from this specification using partition testing

  7. Answer : The equivalence partitions are: • If code = P • If code = I • If code = S • If code is not one of P, I, S Test cases: {P, I, S, any other character}

  8. Q4 • What are the test data that best demonstrates equivalence partitioning for a program that checks the weather in Boston. It's snowing if the degree is less than -10, cold if it (between -10 and 10), cool if it (between 10 and 26) and hot if it more than 26?

  9. Answer : The equivalence partitions are: • If -10> Weather • If -10<=Weather<=10 • If 10< Weather <=26 • If 26< Weather Test cases: {-11,-10,0,10,18,26,27}

  10. Q5 • According to the following Ticket price for theme park table, derive the test cases using partition testing. The Discount Table

  11. Answer : The equivalence partitions are: • If 0<=age<=6 • If 7<=age<=17 • If 18<=age<=64 • If 64<age • If x < age Test cases: {-1 ,0, 3, 6, 7, 12, 17, 18, 41, 64, 65}  

  12. Report Font NumberOfPages Orientation Margins PrintReport() ClearContents() UndoClearContents() EditingDate() ChangeFont(fontType) Q6 • Given this object: Derive the test cases that cover this object. Also, derive three state sequence tests.

  13. Answer : • Test attribute values (different values , boundaries) • Test each method • Test combination of methods Example of state sequence: • ChangeFont() > ClearContents() > UndoClearContents() • EditingDate() > PrintReport() > EditingDate() • ChangeFont() > PrintReport() > EditingDate()

  14. Report Component Format ( str color, str font, int fontSize) Formatting Component Format ( str color, str font, int fontSize) Q7 • Given these two components: Derive Guidelines for this type of component interface. Also, list the test cases for each guideline.

  15. Answer : Guidelines are the same of guidelines for testing Parameter Interface, They are briefly: • Test parameters with valid and invalid values • Test parameter with extreme ends of their ranges • Test null pointers

  16. Q8 • Given this part from Pizza restaurant website requirements: -If a customer orders on Monday between 12 and 4 p.m., then the website shall ask the customer if he like to order Monday’s offer (Take 2 medium pizzas for 40 SR). -If the customer’s order is the 10th order, then the website shall provide 20% discount for his recent order.

  17. Answer : Req-1- • Test if the day and the time are known in the system • Set up the time and day to be another day than Monday or another time not between 12 and 4 p.m.., test if the system display msg to ask the customer about the offer. • Set up the time and day to be Monday from 12-4 p.m., test if the system display msg to ask the customer about Monday offer or not. • If the msg is displayed, test if it is correctly issued.

  18. Answer : Req-2- • Test if the system counts orders for each customer • Set the order number to be < or > the 10th order, test if a discount is applied or not. • Set the order number to be the 10th order, test if the discount is applied or not. • If the system applies discount for the 10th order, check if it is 20% or not • Test if the system applies 20% correctly

  19. Q9 • Explain the relation between Agile methods and Alpha testing, Beta testing and acceptance testing.

  20. Answer : Agile and Alpha testing: agile advocate user involvement in the development process and that users should play a key role in designing test for the system. So, it is a part of agile. Agile and Beta testing: No beta testing in agile because the developers in agile do not make the releases available in the open market or in public. Agile and acceptance testing: in agile, acceptance testing has a rather different meaning. The tests in agile are automated and development does not proceed until the story acceptance tests have passed. So, there is acceptance testing in agile but it is not as a separated activity.

  21. Q10 • What is the difference between stress testing and regression testing?

  22. Answer : Stress testing: stressing the system by making demands that are outside the design limits of the software. It is used in the performing testing (release testing) and for Message interface testing (component testing >> development testing). Regression testing: is testing the system to check that changes have not ‘broken’ previously working code. It is used when adding new function or apply new change ( in TDD and integration testing).

  23. Thank you 

More Related