30
0 W E WPI First Experience Teaching First Experience Teaching Software Testing Software Testing Lessons Learned Lessons Learned Gary Pollice Gary Pollice Worcester Polytechnic Institute and Worcester Polytechnic Institute and Rational Software Corp. Rational Software Corp.

First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

0

W E

WPI

First Experience Teaching First Experience Teaching Software TestingSoftware Testing

Lessons LearnedLessons Learned

Gary PolliceGary PolliceWorcester Polytechnic Institute andWorcester Polytechnic Institute and

Rational Software Corp.Rational Software Corp.

Page 2: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

1

W E

WPI

AgendaAgenda

BackgroundBackgroundThings that workedThings that workedThings that didn’t workThings that didn’t workWish listWish listQuestionsQuestions

Page 3: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

2

W E

WPI

AgendaAgenda

BackgroundBackgroundThings that workedThings that workedThings that didn’t workThings that didn’t workWish listWish listQuestionsQuestions

Page 4: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

3

W E

WPI

CS525T: Fall 2002CS525T: Fall 2002Graduate course: Graduate course: Software TestingSoftware Testing

http://www.cs.wpi.edu/~gpollice/cs525thttp://www.cs.wpi.edu/~gpollice/cs525t--f02/f02/14 weeks14 weeksText: Text: A Practical Guide to Testing ObjectA Practical Guide to Testing Object--Oriented SoftwareOriented Software, McGregor and Sykes, McGregor and SykesGoalsGoals

General understanding of testing principlesGeneral understanding of testing principlesThe role of testing in modern SDLCsThe role of testing in modern SDLCsExperience testing software and using toolsExperience testing software and using toolsPrepare students for further researchPrepare students for further research

Page 5: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

4

W E

WPI

CS525T: Fall 2002CS525T: Fall 2002StudentsStudents

28 graduate students28 graduate studentsNo previous testing coursesNo previous testing courses

Student motivationStudent motivationWill help entry into industryWill help entry into industryNeeded a project courseNeeded a project course

Department motivationDepartment motivationAdd to software engineering offeringsAdd to software engineering offerings

Page 6: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

5

W E

WPI

CS525T: Fall 2002CS525T: Fall 2002Two projectsTwo projects

Small teams, 2Small teams, 2--5 students5 studentsEvaluate a testing toolEvaluate a testing tool

•• Commercial or nonCommercial or non--commercialcommercial•• Prepare an evaluation report (template provided)Prepare an evaluation report (template provided)•• No two teams could do the same toolNo two teams could do the same tool

Test an openTest an open--source productsource product•• radical Java GUI builder from SourceForgeradical Java GUI builder from SourceForge•• Several types of testing (left mostly up to the team)Several types of testing (left mostly up to the team)•• Prepare a software readiness reportPrepare a software readiness report

Page 7: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

6

W E

WPI

CS525T: Fall 2002CS525T: Fall 2002Templates provided for several artifactsTemplates provided for several artifacts

Tool evaluation reportTool evaluation reportTest planTest planDefect reportDefect reportTest reportTest reportSimple test casesSimple test casesJUnit TestCase and TestSuite filesJUnit TestCase and TestSuite files

Several templates taken from, or adapted Several templates taken from, or adapted from the Rational Unified Processfrom the Rational Unified Process®®

Page 8: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

7

W E

WPI

AgendaAgenda

BackgroundBackgroundThings that workedThings that workedThings that didn’t workThings that didn’t workWish listWish listQuestionsQuestions

Page 9: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

8

W E

WPI

Black Box TestingBlack Box Testing

Easiest for students to understandEasiest for students to understandSimple examplesSimple examples

Triangle problemTriangle problemRoman numeral converterRoman numeral converter

Easy to grasp the concept of test casesEasy to grasp the concept of test casesIt was fun for the studentsIt was fun for the students

Free pizza challengeFree pizza challenge

Page 10: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

9

W E

WPI

Project 1: Tool EvaluationProject 1: Tool Evaluation

Goals:Goals:Understand something about a “real” testing Understand something about a “real” testing tooltoolLearn how to evaluate a tool for its Learn how to evaluate a tool for its appropriateness to different situationsappropriateness to different situationsLearn how to use the toolLearn how to use the tool

TemplateTemplate providedprovided

Page 11: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

10

W E

WPI

Project 1: ResultsProject 1: Results

Ten reports producedTen reports producedOne ended up on tool vendor’s Web pagesOne ended up on tool vendor’s Web pages

What I didn’t doWhat I didn’t doProvide enough time for presentation and Provide enough time for presentation and discussiondiscussion

Page 12: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

11

W E

WPI

(Semi)Formal Methods(Semi)Formal Methods

Used OCL to specify software and develop Used OCL to specify software and develop constraint test casesconstraint test cases

Focus on the technique rather than strict Focus on the technique rather than strict adherence to the formal methodadherence to the formal method

Homework assignment: Develop OCL Homework assignment: Develop OCL specifications for Java TreeMap class and specifications for Java TreeMap class and implement tests in JUnitimplement tests in JUnit

Page 13: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

12

W E

WPI

Formal Methods ResultsFormal Methods ResultsCoupled theory and practiceCoupled theory and practiceHelped develop good techniques for test Helped develop good techniques for test implementationimplementationCommon errorsCommon errors

Using a method to test itselfUsing a method to test itselfMaking tests too specificMaking tests too specific

Grading OCL took a long timeGrading OCL took a long timeGrading the JUnit tests was easyGrading the JUnit tests was easy

Page 14: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

13

W E

WPI

ExamplesExamples

Page 15: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

14

W E

WPI

ExamplesExamples

Page 16: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

15

W E

WPI

ExamplesExamples

Page 17: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

16

W E

WPI

Project 2: Test Real SoftwareProject 2: Test Real Software

ChallengesChallengesWhere do you get the softwareWhere do you get the softwareLike the 3 Bears’ porridge, not too easy, not too Like the 3 Bears’ porridge, not too easy, not too hard, but just righthard, but just rightCan you test multiple builds / iterations?Can you test multiple builds / iterations?

Open source provides a lot of possibilitiesOpen source provides a lot of possibilitiesOver 7000 projects on SourceForge in JavaOver 7000 projects on SourceForge in JavaWe used the Radical Java GUI builder projectWe used the Radical Java GUI builder project

Page 18: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

17

W E

WPI

Project 2: Minimum DeliverablesProject 2: Minimum Deliverables

Test planTest planCoverage of at least 80% line coverageCoverage of at least 80% line coverageUse case testUse case test

Students had to write the use caseStudents had to write the use caseUI testingUI testingExploratory testingExploratory testingDefect ReportDefect Report

Page 19: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

18

W E

WPI

Project 2: ResultsProject 2: ResultsAll teams achieved coverage goalsAll teams achieved coverage goalsAutomated GUI testing was not effectiveAutomated GUI testing was not effective

Only a single snapshot so record/playback was not Only a single snapshot so record/playback was not necessarynecessary

Number of defects reported was lowNumber of defects reported was lowLargest number was 16Largest number was 16Lowest number was 5Lowest number was 5

Students learned coverage tool wellStudents learned coverage tool wellSome students worried more about form than Some students worried more about form than resultsresults

Page 20: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

19

W E

WPI

AgendaAgenda

BackgroundBackgroundThings that workedThings that workedThings that didn’t workThings that didn’t workWish listWish listQuestionsQuestions

Page 21: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

20

W E

WPI

Testing in an Iterative ProcessTesting in an Iterative Process

You need iterations and the materials that You need iterations and the materials that go with themgo with themLearning about iterations and process is not Learning about iterations and process is not the same as participating in an iterative the same as participating in an iterative projectproject

Page 22: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

21

W E

WPI

Iterative Development TestingIterative Development Testing

Code

Tests

Page 23: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

22

W E

WPI

Building Test ToolsBuilding Test Tools

Significant part of the software tester’s jobSignificant part of the software tester’s jobNot enough timeNot enough time

Perhaps a separate course on toolsmithing, not Perhaps a separate course on toolsmithing, not just test toolsjust test tools

Emphasizing the need for good Emphasizing the need for good development skills for testersdevelopment skills for testers

Page 24: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

23

W E

WPI

Miscellaneous DisastersMiscellaneous Disasters

OATSOATSDifficult to motivateDifficult to motivate

DistributionDistributionLack of resourcesLack of resources

Product lines and frameworksProduct lines and frameworksTime and resourcesTime and resources

Page 25: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

24

W E

WPI

AgendaAgenda

BackgroundBackgroundThings that workedThings that workedThings that didn’t workThings that didn’t workWish listWish listQuestionsQuestions

Page 26: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

25

W E

WPI

Teaching ResourcesTeaching Resources

Notes and slidesNotes and slidesRecommended readingsRecommended readingsTechniquesTechniques

Page 27: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

26

W E

WPI

Tool ResourcesTool Resources

CommercialCommercialFreeFreeWhere to get themWhere to get themApplicabilityApplicabilityReviewsReviews

Page 28: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

27

W E

WPI

Software ResourcesSoftware Resources

The software testing tutorial resources!The software testing tutorial resources!CodeCodeModelsModelsMultiple technologiesMultiple technologies

Allow instructors to mixAllow instructors to mix--andand--matchmatchOpen source projects may be a place to mineOpen source projects may be a place to mine

Current individual study at WPI looking into thisCurrent individual study at WPI looking into this

Page 29: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

28

W E

WPI

AgendaAgenda

BackgroundBackgroundThings that workedThings that workedThings that didn’t workThings that didn’t workWish listWish listQuestionsQuestions

Page 30: First Experience Teaching Software Testing · 0 W E WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software

29

W E

WPI

Thank You!

[email protected]

[email protected]