Essentials of Testing One tool, one purpose Bettina Polasek, Head - - PowerPoint PPT Presentation

essentials of testing
SMART_READER_LITE
LIVE PREVIEW

Essentials of Testing One tool, one purpose Bettina Polasek, Head - - PowerPoint PPT Presentation

Essentials of Testing One tool, one purpose Bettina Polasek, Head of Quality Management Marco Cicolini, Head of Quality Engineering AdNovum Informatik AG ID 158 Agenda > Scope > Motivation > Toolbox > Tools for a Purpose > Demo


slide-1
SLIDE 1

Essentials of Testing

One tool, one purpose

Bettina Polasek, Head of Quality Management Marco Cicolini, Head of Quality Engineering AdNovum Informatik AG ID 158

slide-2
SLIDE 2

2

Agenda

> Scope > Motivation > Toolbox > Tools for a Purpose > Demo > Experiences > Outlook > Conclusion

2

slide-3
SLIDE 3

3

Quality Management

3

slide-4
SLIDE 4

4

Scope

4

People Process Tools Organization

Quality Management

slide-5
SLIDE 5

5

Motivation

Issues

  • Many tools to chose from
  • Various advantages and disadvantages
  • Overlapping functionality

Challenges

  • Finding the right tools for specific purposes
  • Selecting a small, but complete set of tools
  • Keeping the toolbox up-to-date
slide-6
SLIDE 6

6

Selection Criteria

Technology

  • Java
  • .NET
  • JavaFX

Layers

  • Web
  • Business
  • Persistence

Methodology

  • Static
  • Functional
  • Load, performance
  • Usability
  • Maintainability
slide-7
SLIDE 7

7

Possible Toolbox

7

slide-8
SLIDE 8

8

Our Toolbox

8

slide-9
SLIDE 9

9

Technology Management

Strategic

  • e.g. JEE applications

Tactical

  • e.g. JUnit

Operative

  • e.g. JUnit version 4.7

9

slide-10
SLIDE 10

10

Which Tool for which Project?

10

slide-11
SLIDE 11

11

How much Testing Is Enough?

11

slide-12
SLIDE 12

12

Demo – Application Overview

slide-13
SLIDE 13

13

Demo – Test Overview

13

slide-14
SLIDE 14

14

Demo Recap – GUI Tests

> General – Test whole application – Test use cases > Selenium – Real browser tests – Ajax support > HtmlUnit – Faster than Selenium – Request-based Test > General – Slow – Fragile > Selenium – Browser fragility > HtmlUnit – Browser implementation

slide-15
SLIDE 15

15

Demo Recap – Database Tests

> General – Stable (no UI involved) – Faster than UI tests > Embedded container – Test target container > JPA – Fast – Test precisely what you want > General – No UI tests possible – Database required > Embedded container – Container specific – Slow > JPA – No EJB interaction – Low-level API

slide-16
SLIDE 16

16

Demo Recap – Business Tests

> General – Very fast – Test only business logic > JUnit – One test, one purpose > Mockito – Mock “away” complex components – Test behavior > General – No integration tests > JUnit – DB and UI not testable – Test only functionality > Mockito – Mock setup may get complex – Mocking hides missing implementation

slide-17
SLIDE 17

17

Experiences – General

> Show your customer what you do. > Design simple and fast executable tests. > Decide on what and how you test (quadrants). > Have the right test distribution (testing pyramid). > Treat your test code as first class code!

17

slide-18
SLIDE 18

18

Experiences – Tools

> One tool, one purpose > Tools have to make testing simpler > Set up guidelines & documentation > Form experts for tools > Train developers in using tools

18

slide-19
SLIDE 19

19

Outlook

19

slide-20
SLIDE 20

20

Conclusion

> A testing toolbox is a powerful tool to focus use of resources. – Maintenance and updates at a regular basis > Support an adequate tool for every purpose. – Focus on the test goal > Treat your test code as first class code. – Readability, maintainability

20

slide-21
SLIDE 21

21

Resources

> Books

  • xUnit Test Patterns (EAN: 9780131495050)
  • Pragmatic Unit Testing (EAN: 9780974514017)
  • Growing Object-Oriented Software, Guided By Tests (EAN: 9780321503626)
  • Test-Driven Development (EAN: 9780321146533)
  • Agile Testing (EAN: 9780321534460)

> Tools

  • JUnit (www.junit.org)
  • Selenium (www.seleniumhq.org)
  • Mockito (www.mockito.org)
  • HtmlUnit (htmlunit.sourceforge.net)
  • GlassFish (glassfish.dev.java.net)

21

slide-22
SLIDE 22

22

Questions?

?

Visit the AdNovum booth!

22

slide-23
SLIDE 23

Bettina Polasek bettina.polasek@adnovum.ch Marco Cicolini marco.cicolini@adnovum.ch AdNovum Informatik AG www.adnovum.ch

slide-24
SLIDE 24

24

Additional Slides

24

slide-25
SLIDE 25

25

Quality Manager Role

25 25

slide-26
SLIDE 26

26

Demo Recap – GUI Tests

General Test whole application Slow Test use cases Fragile Selenium HtmlUnit Real browser tests Browser fragility Faster than Selenium Browser implementation Ajax support Request-based tests

slide-27
SLIDE 27

27

Demo Recap – Database Tests

Tool Advantages Disadvantages General Stable (no UI involved) No UI test possible Faster than UI tests Database required Embedded container Test in target container Container-specific Slow JPA Fast No EJB interaction Test precisely what you want Low-level API

slide-28
SLIDE 28

28

Demo Recap – Business Tests

General Very fast No integration tests Test only business logic JUnit One test, one purpose DB and UI not testable Test only functionality Mockito Mock “away” complex components Mock setup may get complex Test behavior Mocking hides missing implementation

slide-29
SLIDE 29

29

Experiences – Methodologies

> Introduce people responsible for testing > Writing tests is more than just validating features > TDD / BDD > Review your tests

29