CSC 509 Lecture Notes Week 5 The Promise of Spec-Based Test - - PowerPoint PPT Presentation

csc 509 lecture notes week 5 the promise of spec based
SMART_READER_LITE
LIVE PREVIEW

CSC 509 Lecture Notes Week 5 The Promise of Spec-Based Test - - PowerPoint PPT Presentation

CSC509-S15-L5 Slide 1 CSC 509 Lecture Notes Week 5 The Promise of Spec-Based Test Generation -- a brief oveview of of a new direction -- CSC509-S15-L5 Slide 2 I. Again, common refrains about manual test gen: A. Its boring and tedious. B.


slide-1
SLIDE 1

CSC509-S15-L5 Slide 1

CSC 509 Lecture Notes Week 5 The Promise of Spec-Based Test Generation

  • - a brief oveview of of a new direction --
slide-2
SLIDE 2

CSC509-S15-L5 Slide 2

  • I. Again, common refrains about manual test gen:
  • A. It’s boring and tedious.
  • B. It’s error prone.
  • C. May leave important things untested.
  • D. There’s got to be a better way.
slide-3
SLIDE 3

CSC509-S15-L5 Slide 3

  • II. A Possible Better Way
  • A. The slick pitch --

"Suppose all you have to do is write a couple simple boolean expressions per method, and a decent set of unit tests will be automatically generated. Would you use a tool that does this?"

slide-4
SLIDE 4

CSC509-S15-L5 Slide 4

  • B. Some skeptical questions.
slide-5
SLIDE 5

CSC509-S15-L5 Slide 5

  • B. Some skeptical questions.
  • 1. Is this really possible, i.e., can someone build a

working version of this tool that I can use as part

  • f my normal program development workflow?
slide-6
SLIDE 6

CSC509-S15-L5 Slide 6

  • B. Some skeptical questions.
  • 1. Is this really possible, i.e., can someone build a

working version of this tool that I can use as part

  • f my normal program development workflow?
  • 2. When you say "a couple simple boolean expres-

sions", how really "simple" are they.

slide-7
SLIDE 7

CSC509-S15-L5 Slide 7

  • B. Some skeptical questions.
  • 1. Is this really possible, i.e., can someone build a

working version of this tool that I can use as part

  • f my normal program development workflow?
  • 2. When you say "a couple simple boolean expres-

sions", how really "simple" are they.

  • 3. If this really is doable and simple enough, how

come it hasn’t happened yet?

slide-8
SLIDE 8

CSC509-S15-L5 Slide 8

  • C. Some non-Skeptical Answers
slide-9
SLIDE 9

CSC509-S15-L5 Slide 9

  • C. Some non-Skeptical Answers
  • 1. Yes, several such tools have been built in the last

twenty years.

slide-10
SLIDE 10

CSC509-S15-L5 Slide 10

  • C. Some non-Skeptical Answers
  • 1. Yes, several such tools have been built in the last

twenty years.

  • 2. The boolean expressions are simple enough for

most competent programmers.

slide-11
SLIDE 11

CSC509-S15-L5 Slide 11

  • C. Some non-Skeptical Answers
  • 1. Yes, several such tools have been built in the last

twenty years.

  • 2. The boolean expressions are simple enough for

most competent programmers.

  • 3. It hasn’t happened yet because ...
slide-12
SLIDE 12

CSC509-S15-L5 Slide 12

It hasn’t happened yet because ...

  • a. The tools were written for languages and envi-

ronments that aren’t or weren’t widely used.

slide-13
SLIDE 13

CSC509-S15-L5 Slide 13

It hasn’t happened yet because ...

  • a. The tools were written for languages and envi-

ronments that aren’t or weren’t widely used.

  • b. There’s a chicken-and-egg problem with con-

vincing programmers to adopt a new notation when there’s no immediate tangible benefit.

slide-14
SLIDE 14

CSC509-S15-L5 Slide 14

It hasn’t happened yet because ...

  • a. The tools were written for languages and envi-

ronments that aren’t or weren’t widely used.

  • b. There’s a chicken-and-egg problem with con-

vincing programmers to adopt a new notation when there’s no immediate tangible benefit.

  • c. There remain technical challenges in generating

genuinely "decent" tests.

slide-15
SLIDE 15

CSC509-S15-L5 Slide 15

  • D. Some new ideas that just might work:
slide-16
SLIDE 16

CSC509-S15-L5 Slide 16

  • D. Some new ideas that just might work:
  • 1. Provide a mixed-language notation for popular

languages like C, C++, Java, Python, and Ruby.

slide-17
SLIDE 17

CSC509-S15-L5 Slide 17

  • D. Some new ideas that just might work:
  • 1. Provide a mixed-language notation for popular

languages like C, C++, Java, Python, and Ruby.

  • 2. Simplify the spec-language to the bare minimum

necessary for test generation.

slide-18
SLIDE 18

CSC509-S15-L5 Slide 18

  • D. Some new ideas that just might work:
  • 1. Provide a mixed-language notation for popular

languages like C, C++, Java, Python, and Ruby.

  • 2. Simplify the spec-language to the bare minimum

necessary for test generation.

  • 3. Generate tests that are very readable.
slide-19
SLIDE 19

CSC509-S15-L5 Slide 19

  • D. Some new ideas that just might work:
  • 1. Provide a mixed-language notation for popular

languages like C, C++, Java, Python, and Ruby.

  • 2. Simplify the spec-language to the bare minimum

necessary for test generation.

  • 3. Generate tests that are very readable.
  • 4. Generate tests that are 100% executable in any

environment for the specified language.

slide-20
SLIDE 20

CSC509-S15-L5 Slide 20

  • III. Further details in the 509 project "white paper" at

http://users.csc.calpoly.edu/ ˜gfisher/classes/509/project/ summary.html