0 wpi first experience teaching software testing lessons learned gary pollice worcester polytechnic...

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

Upload: josie-roundtree

Post on 14-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

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

1

W E

WPI

First Experience Teaching First Experience Teaching Software TestingSoftware Testing

Lessons LearnedLessons Learned

Gary PolliceGary Pollice

Worcester Polytechnic Institute andWorcester Polytechnic Institute and

Rational Software Corp.Rational Software Corp.

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

2

W E

WPI

AgendaAgenda

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

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

3

W E

WPI

AgendaAgenda

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

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

4

W E

WPI

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

http://www.cs.wpi.edu/~gpollice/cs525t-f02/http://www.cs.wpi.edu/~gpollice/cs525t-f02/14 weeks14 weeksText: Text: A Practical Guide to Testing Object-Oriented A Practical Guide to Testing Object-Oriented

SoftwareSoftware, McGregor and Sykes, McGregor and SykesGoalsGoals

General understanding of testing principlesGeneral understanding of testing principles The role of testing in modern SDLCsThe role of testing in modern SDLCs Experience testing software and using toolsExperience testing software and using tools Prepare students for further researchPrepare students for further research

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

5

W E

WPI

CS525T: Fall 2002CS525T: Fall 2002StudentsStudents

28 graduate students28 graduate students No previous testing coursesNo previous testing courses

Student motivationStudent motivation Will help entry into industryWill help entry into industry Needed a project courseNeeded a project course

Department motivationDepartment motivation Add to software engineering offeringsAdd to software engineering offerings

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

6

W E

WPI

CS525T: Fall 2002CS525T: Fall 2002Two projectsTwo projects

Small teams, 2-5 studentsSmall teams, 2-5 students Evaluate a testing toolEvaluate a testing tool

• Commercial or non-commercialCommercial or non-commercial

• 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 open-source productTest an open-source 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: 0 WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software Corp

7

W E

WPI

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

Tool evaluation reportTool evaluation report Test planTest plan Defect reportDefect report Test reportTest report Simple test casesSimple test cases JUnit TestCase and TestSuite filesJUnit TestCase and TestSuite files

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

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

8

W E

WPI

AgendaAgenda

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

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

9

W E

WPI

Black Box TestingBlack Box Testing

Easiest for students to understandEasiest for students to understandSimple examplesSimple examples

Triangle problemTriangle problem Roman 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: 0 WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software Corp

10

W E

WPI

Project 1: Tool EvaluationProject 1: Tool Evaluation

Goals:Goals: Understand something about a “real” testing Understand something about a “real” testing

tooltool Learn how to evaluate a tool for its Learn how to evaluate a tool for its

appropriateness to different situationsappropriateness to different situations Learn how to use the toolLearn how to use the tool

Template providedTemplate provided

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

11

W E

WPI

Project 1: ResultsProject 1: Results

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

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

discussiondiscussion

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

12

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: 0 WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software Corp

13

W E

WPI

Formal Methods ResultsFormal Methods Results Coupled theory and practiceCoupled theory and practice Helped develop good techniques for test Helped develop good techniques for test

implementationimplementation Common errorsCommon errors

Using a method to test itselfUsing a method to test itself Making tests too specificMaking tests too specific

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

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

14

W E

WPI

ExamplesExamples

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

15

W E

WPI

ExamplesExamples

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

16

W E

WPI

ExamplesExamples

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

17

W E

WPI

Project 2: Test Real SoftwareProject 2: Test Real Software

ChallengesChallenges Where do you get the softwareWhere do you get the software Like 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 right Can you test multiple builds / iterations?Can you test multiple builds / iterations?

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

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

18

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: 0 WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software Corp

19

W E

WPI

Project 2: ResultsProject 2: Results All teams achieved coverage goalsAll teams achieved coverage goals Automated 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 low Largest number was 16Largest number was 16 Lowest number was 5Lowest number was 5

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

resultsresults

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

20

W E

WPI

AgendaAgenda

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

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

21

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 them

Learning 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: 0 WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software Corp

22

W E

WPI

Iterative Development TestingIterative Development Testing

Code

Tests

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

23

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: 0 WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software Corp

24

W E

WPI

Miscellaneous DisastersMiscellaneous Disasters

OATSOATS Difficult to motivateDifficult to motivate

DistributionDistribution Lack of resourcesLack of resources

Product lines and frameworksProduct lines and frameworks Time and resourcesTime and resources

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

25

W E

WPI

AgendaAgenda

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

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

26

W E

WPI

Teaching ResourcesTeaching Resources

Notes and slidesNotes and slidesRecommended readingsRecommended readingsTechniquesTechniques

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

27

W E

WPI

Tool ResourcesTool Resources

CommercialCommercialFreeFreeWhere to get themWhere to get themApplicabilityApplicabilityReviewsReviews

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

28

W E

WPI

Software ResourcesSoftware Resources

The software testing tutorial resources!The software testing tutorial resources! CodeCode ModelsModels Multiple technologiesMultiple technologies

Allow instructors to mix-and-matchAllow instructors to mix-and-match Open 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: 0 WPI First Experience Teaching Software Testing Lessons Learned Gary Pollice Worcester Polytechnic Institute and Rational Software Corp

29

W E

WPI

AgendaAgenda

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

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

30

W E

WPI

Thank You!

[email protected]

[email protected]