A survey of unit testing practices
This presentation is the property of its rightful owner.
Sponsored Links
1 / 20

A Survey of Unit Testing Practices PowerPoint PPT Presentation


  • 88 Views
  • Uploaded on
  • Presentation posted in: General

A Survey of Unit Testing Practices. Prof. Per Runeson – Lund University Per Beremark – SPIN-syd. What is Unit Testing?. “testing of individual software or hardware units or groups of related units” [IEEE610.12]

Download Presentation

A Survey of Unit Testing Practices

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


A survey of unit testing practices

A Survey of Unit Testing Practices

Prof. Per Runeson – Lund University

Per Beremark – SPIN-syd


What is unit testing

What is Unit Testing?

“testing of individual software or hardware units or groups of related units” [IEEE610.12]

“Unit testing tests individual software components or a collection of components. Testers define the input domain for the units in question and ignore the rest of the system. Unit testing sometimes requires the construction of throwaway driver code and stubs and is often performed in a debugger” [Whittaker 00]

“a test, executed by the developer in a laboratory environment, that should demonstrate that the program meets the requirements set in the design specification” [Koomen and Pol 00]


What does it mean in practice

What Does It Mean In Practice?

  • What do people refer to as unit testing?

  • What are the strengths regarding unit testing in industry?

  • Which are the problems regarding unit testing?


Key findings on unit testing

What?

Technical!

Specified or not?

How?

Structure-based

Not formally

Who?

Developer (team)

Not test or QA

When?

Each build/day/week

Takes seconds to hours to run

Why?

Assuring functionality

Key Findings on Unit Testing


Participants spin syd of southern sweden

19 companies

Telecom

Automation

Case tools

Information systems

Banking

Health care

Consulting

Transportation

Company size

1-1000 developers

17 participants in focus group

15 in questionnaire

Participants:SPIN-syd of Southern Sweden


Survey procedures

Unit testing

-What

-Strengths

-Problems

Q&A’s

Q&A’s

Q&A’s

Q’s

Survey Procedures

1. Individual reflection

2. Focus group discussion

3. Document and structure

4. Analysis

Analysis

-What?

-How?

-Where?

-Who?

Unit testing is…

Note

Note

Note

5. Survey preparation

6. Survey conduct

7. Survey analysis


Focus group meeting

Focus Group Meeting

Unit test – smallest specified unit

3rd party verification

Test first

Training


Analysis framework

What?

How?

Where?

Who?

When?

Why?

Analysis Framework

Unit test

Unit test

Unit test

Unit test

Unit test

Unit test

Unit test

Unit test


Questionnaire

Questionnaire


Analysis

Analysis


A survey of unit testing practices

What?

  • Definition

    • Test of smallest unit or units

  • Strength

    • Unit identification

    • Test of surrounding modules

  • Weaknesses

    • GUI test

    • Unit identification

    • Test scripts and harness maintenance

    • Data structures


A survey of unit testing practices

How?

  • Definition

    • Structure-based

    • Preferably automated

  • Strength

    • Test framework

  • Weaknesses

    • Documentation

    • Framework tailoring

    • Test selection

    • Test metrics


A survey of unit testing practices

Who?

  • Definition

    • By developer

  • Strength

    • Independent test

    • Competence network

  • Weaknesses

    • Competency

    • Independence

    • Introduction strategy


A survey of unit testing practices

When?

  • Definition

    • Quick feedback

  • Strength

    • Continuous regression test

  • Weaknesses

    • Stopping criteria


A survey of unit testing practices

Why?

  • Definition

    • Ensure functionality

  • Strength

    • External requirement (safety)

    • Agile methods

  • Weaknesses

    • Cost vs. value


Further use of the survey

Further Use of the Survey

  • Clarify unit test definition in your company

  • Lightweight assessment of unit testing practices

    • Benchmark

    • Improve


Read more in ieee software july august 2006

Read more… … in IEEE Software July/August 2006


A survey of unit testing practices

http://serg.telecom.lth.se


Definitions

Definitions


Strengths and weaknesses

Strengths and weaknesses


  • Login