agile2008 jdemo slides

26
JDemo Lightweight Exploratory Developer Testing Ilja Preuß [email protected] disy Informationssysteme GmbH, Karlsruhe, Germany Agile 2008 Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Upload: ilja-preuss

Post on 25-Jan-2015

332 views

Category:

Technology


0 download

DESCRIPTION

My JDemo presentation at Agile 2008, Toronto

TRANSCRIPT

Page 1: Agile2008 Jdemo Slides

JDemoLightweight Exploratory Developer Testing

Ilja Preuß[email protected]

disy Informationssysteme GmbH, Karlsruhe, Germany

Agile 2008

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 2: Agile2008 Jdemo Slides

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 3: Agile2008 Jdemo Slides

Motivation

Introduction to JDemo

Demonstration

Experiences

Demos as Tests

More Features

Summary and Advice

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 4: Agile2008 Jdemo Slides

Motivation

Rich client application with “complex” user interface.

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 5: Agile2008 Jdemo Slides

Motivation

hard to test (automatically):

aesthetics

usability

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 6: Agile2008 Jdemo Slides

Motivation

⇒ manual (exploratory) testing

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 7: Agile2008 Jdemo Slides

Motivation

seeing your creation in action

motivator

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 8: Agile2008 Jdemo Slides

Motivation

problem:

to see a specific component in action

start application

prepare needed scenario

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 9: Agile2008 Jdemo Slides

Motivation

known solutions:

“interactive” unit tests → hack, not permanent, brittle

write main methods → lots of boiler plate code, unorganized

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 10: Agile2008 Jdemo Slides

Questions:

What would a JUnit-like framework for exploratory testing looklike?

What would using such a framework be like?

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 11: Agile2008 Jdemo Slides

JUnit vs. JDemo

JUnit JDemo

TestCase . . . DemoCasetest . . . demo . . .

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 12: Agile2008 Jdemo Slides

JUnit vs. JDemo

JUnit JDemo

arrange arrangeshow

act exploreassert

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 13: Agile2008 Jdemo Slides

Let’s try it!

The Test/Code Cycle in XPWilliam C. Wake

http://www.xp123.com/xplor/xp0001/index.shtml

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 14: Agile2008 Jdemo Slides

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 15: Agile2008 Jdemo Slides

Experience

writing demos

increases flow

fosters decoupling and reusability

creates executable documentation

gives feedback on usability

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 16: Agile2008 Jdemo Slides

Case Study

27 demos

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 17: Agile2008 Jdemo Slides

Case Study

startup/arrangement times:

application: 45s

demo: 4s

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 18: Agile2008 Jdemo Slides

Case Study

61 demo-starts, 62 application starts1 application start (hypothetical)

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 19: Agile2008 Jdemo Slides

Demos as Smoketests

problem:

demos are executed in “chunks”

unused code breaks

→ demos break over time

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 20: Agile2008 Jdemo Slides

Demos as Smoketests

idea:

tests are executed regularly, as part of continuous integration

→ automatically convert demos to smoke tests and execute themas part of the projects test suite

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 21: Agile2008 Jdemo Slides

More Features

setup / teardown

suites of demos

@Demo annotation

specification of timeout

show source code

run with different look and feels

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 22: Agile2008 Jdemo Slides

Even More Features

demos for AWT, SWT, files, sound . . .

automated creation of screen shots via Ant task

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 23: Agile2008 Jdemo Slides

Open Questions

collaboration with QA/technical writers

demos for web applications

web demo runner (applet?)

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 24: Agile2008 Jdemo Slides

Summary

exploratory testing is a valuable part of the development cycle

tool support can help integrate exploratory testing moretightly into the development work

JDemo is a lightweight open source framework for Java that isaimed at providing that support

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 25: Agile2008 Jdemo Slides

Some Small Advice

first learn Test Driven Development

then learn to test-drive user interfaces

only then take a look at JDemo

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing

Page 26: Agile2008 Jdemo Slides

Thanks!

[email protected]

www.jdemo.de

Ilja Preuß, disy Informationssysteme GmbH JDemo - Lightweight Exploratory Developer Testing