IEEE_1008_expo

40
IEEE Std for Software Unit Testing 1008-1987 David Omar Román Arámburo

Transcript of IEEE_1008_expo

Page 1: IEEE_1008_expo

IEEE Std for Software Unit Testing

1008-1987

David Omar Román Arámburo

Page 2: IEEE_1008_expo

Objetivos del estándar

Especificar un método estándar para las pruebas unitarias

de software que puedan ser usadas como base para las

prácticas de ingeniería de software

Describir conceptos de ingeniería de software así como

supuestos para las pruebas en las que esta basado el

enfoque de este estándar

Proporcionar información de orientación y recursos que

nos ayuden en la implementación y uso del estándar

IEEE Std for Software Unit Testing

1008-1987

Page 3: IEEE_1008_expo

Audiencia

Unit testers

Unit test supervisors

El estándar fue desarrollado para ayudar a quienes participan en las pruebas unitarias

- Proveen entradas (inputs)

- Llevan a cabo (perform)

- Supervisan (supervise)

- Controlan (monitor)

- Evalúan (evaluate)

IEEE Std for Software Unit Testing

1008-1987

Page 4: IEEE_1008_expo

Relación con otros estándares

829 IEEE Std for Software Test Documentation

Test Design Specification

Test Summary Report

729 IEEE Std Glossary of Software Engineering

Terminology

IEEE Std for Software Unit Testing

1008-1987

Page 5: IEEE_1008_expo

Unit Testing Process IEEE Std for Software Unit Testing

1008-1987

Perform test

Planning

Plan the general

approach, resources

and schedule

Determine features to

be tested

Refine the general plan

Acquire the Test

Set

Design the set of tests

Implement the refined

plan and design

Measure the Test

Unit

Execute the test

procedures

Check for termination

Evaluate the test effort

and unit

Phase 1 Phase 2 Phase 3

Acti

vit

ies

Page 6: IEEE_1008_expo

Alcance Unit testing es un proceso que involucra planear, desarrollar y comparar una prueba contra sus requerimientos

Describe un proceso de pruebas compuesto por una jerarquía de fases, actividades y tareas

El estándar aplica sin importar que el unit tester sea o no un desarrollador

Requiere la elaboración de documentos Test Design Specification

Test Summary Report

El estándar aplica a las pruebas unidades recién desarrolladas o modificadas

IEEE Std for Software Unit Testing

1008-1987

Page 7: IEEE_1008_expo

Fuera del Alcance El resultado de algunas tareas de la planificación general de pruebas

aplican a todos los niveles de prueba. Sin embargo dichas tareas no son consideradas en el proceso de pruebas unitarias aunque las afecten directamente

Identifica una necesidad por el análisis de fallas y corrección en las faltas de software. Sin embargo no especifica un proceso de debugging

No abarca otros componentes de un compresivo proceso de verificación y validación

No requiere el uso de una herramienta en específico, ni el seguimiento de alguna metodología para el control de la documentación, aseguramiento de la calidad o el manejo del proceso de pruebas

IEEE Std for Software Unit Testing

1008-1987

Page 8: IEEE_1008_expo

Definiciones

software test incident Any event occurring during the execution of a software test that requires investigation.

state data Data that defines an internal state of the test unit and is used to establish that state or compare with existing states.

test objective An identified set of software features to be measured under specified conditions by comparing actual behavior with the required behavior described in the software documentation.

IEEE Std for Software Unit Testing

1008-1987

Page 9: IEEE_1008_expo

Definiciones

Module (1) A program unit that is discrete and identifiable

with respect to compiling, combining with other units, and

loading; for example, the input to, or output from, an

assembler, compiler, linkage editor, or executive routine.

(2) A logically separable part of a program.

Note: The terms “module,” “component,” and “unit” are often used

interchangeably or defined to be sub-elements of one another in different

ways depending upon the context. The relationship of these terms is not yet

standardized.

IEEE Std for Software Unit Testing

1008-1987

Page 10: IEEE_1008_expo

Definiciones

test unit A set of one or more computer program modules

together with associated control data, (for example, tables),

usage procedures, and operating procedures that satisfy the

following conditions:

1) All modules are from a single computer program

2) At least one of the new or changed modules in the set

has not completed the unit test

3) The set of modules together with its associated data and

procedures are the sole object of a testing process

IEEE Std for Software Unit Testing

1008-1987

Page 11: IEEE_1008_expo

Definiciones

unit requirements documentation Documentation that sets

forth the functional, interface, performance, and design

constraint requirements for the test unit.

IEEE Std for Software Unit Testing

1008-1987

Page 12: IEEE_1008_expo

Unit Testing Activities IEEE Std for Software Unit Testing

1008-1987

Plan

Determine

Refine

Design

Implement

Execute

Check

Evaluate

Perform test Planning

Acquire the Test Set

Measure the Test Unit

Test design specification Determine, Refine, and Design

Test summary report all of the activities

Page 13: IEEE_1008_expo

IEEE Std for Software Unit Testing

1008-1987

Plan

Determine

Refine

Design

Implement

Execute

Check

Evaluate

Actividad 1

Planificar el enfoque general,

los recursos y la programación

1. Planear

Page 14: IEEE_1008_expo

1. Planear IEEE Std for Software Unit Testing

1008-1987

Entradas

E1. Los planes del

proyecto

E2. Documentación de

los requerimientos del

software

Tareas

1.1. Especificar enfoque

general a las pruebas unitarias

1-2. Especificar integridad de

los requerimientos

1.3. Especificar terminación

de los requerimientos

1.4. Determinar los recursos

de los requerimientos

1.5. Especificar un cronograma

requerimientos

Salidas

S1. Información general

de la planificación de las

pruebas unitarias

S2. Solicitudes de

recursos de las pruebas

unitarias (si se generan

de 1.4)

Page 15: IEEE_1008_expo

IEEE Std for Software Unit Testing

1008-1987

Plan

Determine

Refine

Design

Implement

Execute

Check

Evaluate

Actividad 2

Determinar las características

a ser probadas

2. Determinar

Page 16: IEEE_1008_expo

2. Determinar IEEE Std for Software Unit Testing

1008-1987

Entradas

E3. Documentación de

los requerimientos

unitarios

E4. Documentación del

diseño de la

arquitectura del

software (si es

necesaria)

Tareas

2.1. Estudiar los

requerimientos funcionales

2.2. Identificar requerimientos

adicionales y procesos

asociados

2.3. Identificar los estados de

la unidad

2.4. Identificar las

características de

entrada/salida de datos

2.5. Seleccionar los elementos

a ser incluidos en la prueba

Salidas

S3. Lista de los

elementos a ser

incluidos en la prueba

(de 2.5)

S4. Solicitudes de

aclaración de los

requerimientos

unitarios (si se generan

de 2.1 a 2.4)

Cuando sea necesario solicita la aclaración de los requerimientos unitarios

Page 17: IEEE_1008_expo

Test Design Specification

Features to be tested (S3)

IEEE Std for Software Unit Testing

1008-1987

Test Summary Report

2. Determinar

Page 18: IEEE_1008_expo

IEEE Std for Software Unit Testing

1008-1987

Plan

Determine

Refine

Design

Implement

Execute

Check

Evaluate

Actividad 3

Refinarel Plan General

3. Refinar

Page 19: IEEE_1008_expo

3. Refinar IEEE Std for Software Unit Testing

1008-1987

Entradas

Lista de los elementos

a ser incluidos en la

prueba (de S3)

Información general de

la planificación de las

pruebas unitarias (de

S1)

Tareas

3.1 Perfeccionar el

enfoque

3.2 Especificar recursos

especiales de los

requerimientos

3.3 Especificar un

cronograma detallado

Salidas

S5. Información

específica del plan de

pruebas unitarias (de

3.1 a 3.3)

S6. Solicitudes de

recursos especiales de

requerimientos

unitarios (si se generan

de 3.2)

Page 20: IEEE_1008_expo

Test Design Specification

Features to be tested (S3)

Approach Refinements (3.1 y

3.2 y 3.3)

IEEE Std for Software Unit Testing

1008-1987

Test Summary Report

3. Refinar

Page 21: IEEE_1008_expo

IEEE Std for Software Unit Testing

1008-1987

Plan

Determine

Refine

Design

Implement

Execute

Check

Evaluate

Actividad 4

Diseñar el conjunto de

pruebas

4. Diseñar

Page 22: IEEE_1008_expo

4. Diseñar IEEE Std for Software Unit Testing

1008-1987

Entradas

Documentación de

requerimientos unitarios (E3)

Listado de elementos a ser

incluidos en la prueba (S3)

Información del plan de

pruebas unitarias (1.1, 1.2 y

2.1)

E5. Documentación de diseño

de unidades

E6. Especificaciones de

pruebas anteriores (si hay

disponibles)

Tareas

4.1 Diseñar la arquitectura del

conjunto de pruebas

4.2 Obtener procedimientos

de la prueba

4.3 Obtener especificaciones

del caso de prueba

4.4 Aumentar las

especificaciones del conjunto

de caso de prueba basada en

la información del diseño

4.5 Completar las

especificaciones del diseño de

pruebas

Salidas

S7. Especificaciones de diseño

de prueba unitaria (de 4.5)

S8. Especificaciones de

procedimiento de prueba

separadas (si se generan de

4.2)

S9. Especificaciones de caso

prueba separadas (si se

generan de 4.3 o 4.4)

S10. Solicitud de

mejoramiento del diseño de

unidades (si se generan de 4.4)

Page 23: IEEE_1008_expo

Test Design Specification

Features to be tested (S3)

Approach Refinements (3.1 y

3.2 y 3.3)

Test Identification (4.1)

Correlation between test

cases and procedures (4.2)

Test case specifications (4.3,

4.4 y 4.5)

IEEE Std for Software Unit Testing

1008-1987

Test Summary Report

4. Diseñar

Page 24: IEEE_1008_expo

IEEE Std for Software Unit Testing

1008-1987

Plan

Determine

Refine

Design

Implement

Execute

Check

Evaluate

Actividad 5

Implementar el Plan

Perfeccionado y el Diseño

5. Implementar

Page 25: IEEE_1008_expo

5. Implementar IEEE Std for Software Unit Testing

1008-1987

Entradas

Información del plan de pruebas

unitarias (1.1, 1.2 y 2.1)

Especificaciones de caso de prueba en

las especificaciones de diseño de

prueba unitaria o documentos

separados (de 4.3 y 4.4)

E7. Descripciones de estructuras de

datos de software

E8. Recursos de apoyo a las pruebas

E9 Elementos de la prueba

E10. Información de prueba de previas

actividades de prueba (si hay )

E11. Herramientas de prueba de

previas actividades de prueba (si hay)

Tareas

5.1 Obtener y verificar

la información de la

prueba

5.2 Obtener los

recursos especiales (de

S6)

5.3 Obtener los

elementos de la prueba

Salidas

S11. Datos de la prueba

verificados (de 5.1)

S12. Recursos de apoyo

de la prueba (de 5.2)

S13. Configuración de

los elementos de la

prueba (de 5.3)

S14. La información

inicial del Test Summary

Report (de 5.3)

Page 26: IEEE_1008_expo

Test Design Specification

Features to be tested (S3)

Approach Refinements (3.1 y

3.2 y 3.3)

Test Identification (4.1)

Correlation between test

cases and procedures (4.2)

Test case specifications (4.3,

4.4 y 4.5)

Correlation between test

cases and data sets (5.1)

IEEE Std for Software Unit Testing

1008-1987

Test Summary Report

Record the identifier of

each item in the Summary

section (5.3)

5. Implementar

Page 27: IEEE_1008_expo

IEEE Std for Software Unit Testing

1008-1987

Plan

Determine

Refine

Design

Implement

Execute

Check

Evaluate

Actividad 6

Ejecutar los procedimientos de

la prueba

6. Ejecutar

Page 28: IEEE_1008_expo

6. Ejecutar IEEE Std for Software Unit Testing

1008-1987

Entradas

Datos de la prueba verificados (de

S11)

Recursos de apoyo de la prueba (de

S12)

.Configuración de los elementos de

la prueba (S13)

Especificaciones de caso de prueba

(4.3 y 4.4)

Especificaciones de procedimiento

de prueba (si se generan de 4.2)

Resultados del análisis de fallas (si

se generan del debugging process)

Tareas

6.1 Correr las pruebas

6.2 Determinar

resultados

Salidas

S15. Información de la

ejecución de las

pruebas (6.1 y 6.2)

S16. Especificaciones de

la prueba revisadas (si

se producen de 6.2)

S17. Información de la

prueba revisada (si se

producen de 6.2)

Page 29: IEEE_1008_expo

Test Design Specification

Features to be tested (S3)

Approach Refinements (3.1 y

3.2 y 3.3)

Test Identification (4.1)

Correlation between test

cases and procedures (4.2)

Test case specifications (4.3,

4.4 y 4.5)

Correlation between test

cases and data sets (5.1)

IEEE Std for Software Unit Testing

1008-1987

Test Summary Report

Record the identifier of each item in the Summary section (5.3)

Record all test incidents in the Summary of Results section (6.1)

Record pass or fail results in the Summary of Results section (6.2)

Record resource consumption data in the Summary of Activities section (6.2)

For each failure, have the failure analyzed and record the fault information in the Summary of Results (6.2)

6. Ejecutar

Page 30: IEEE_1008_expo

Caso 1 Falta en las especificaciones de la prueba o datos de la prueba

Corregir la falta

Documentarla en el „Resumen de Actividades‟

Volver a correr las pruebas que fallaron

Caso 2 Falta en la ejecución del procedimiento de la prueba

Volver a correr los procedimientos que se ejecutaron de manera incorrecta

Caso 3 Falta en el ambiente de pruebas

Opción 1

Tener el ambiente correcto

Documentar en el „Resumen de Actividades‟

Volver a correr las pruebas que fallaron

IEEE Std for Software Unit Testing

1008-1987

Opción 2 (Terminación anormal)

Documentar la razón para no corregir

el ambiente en el „Resumen de

Actividades‟

Revisar la terminación de la prueba

6. Ejecutar

Page 31: IEEE_1008_expo

Caso 4 Falta en la implementación de la unidad

Opción 1

Tener la unidad corregida

Documentar en el „Resumen de Actividades‟

Volver a correr todas las pruebas

Caso 5 Falta en el diseño de la unidad

Opción 1

Tener el diseño y la unidad corregidas

Modificar la especificación de la prueba y

y datos apropiados

Documentar en el „Resumen de Actividades‟

Volver a correr todas las pruebas

IEEE Std for Software Unit Testing

1008-1987

Opción 2 (Terminación anormal)

Documentar la razón para no corregir

la unidad en el „Resumen de

Actividades‟

Revisar la terminación de la prueba

Opción 2 (Terminación anormal)

Documentar la razón para no corregir

el diseño en el „Resumen de

Actividades‟

Revisar la terminación de la prueba

6. Ejecutar

Page 32: IEEE_1008_expo

IEEE Std for Software Unit Testing

1008-1987

Plan

Determine

Refine

Design

Implement

Execute

Check

Evaluate

Actividad 7

Revisar la terminación de la

prueba

7. Revisar

Page 33: IEEE_1008_expo

7. Revisar IEEE Std for Software Unit Testing

1008-1987

Entradas

Requerimientos de

completitud y

terminación (1.2 y 1.3)

Información de la

ejecución ( 6.1 y 6.2)

Especificaciones de las

pruebas (4.1 al 4.3 )

Descripciones de las

estructuras de datos de

software (si se necesitan)

Tareas

7.1 Revisar para

terminación Normal de

la prueba

7.2 Revisar para

terminación Anormal

de la prueba

7.3 Complementar el

conjunto de pruebas

Salidas

S18. Verificar que la

información de la

terminación se agregue al

reporte así como

cualquier adición de casos

( 7.1 al 7.3)

S19. Especificaciones de

prueba revisadas o nuevas

(si se producen de 7.3)

S20. Información de

prueba adicional (si se

producen de 7.3)

Page 34: IEEE_1008_expo

Test Design Specification

Features to be tested (S3)

Approach Refinements (3.1 y

3.2 y 3.3)

Test Identification (4.1)

Correlation between test

cases and procedures (4.2)

Test case specifications (4.3,

4.4 y 4.5)

Correlation between test

cases and data sets (5.1)

IEEE Std for Software Unit Testing

1008-1987

Test Summary Report Record the identifier of each item in the Summary section (5.3)

Record all test incidents in the Summary of Results section (6.1)

Record pass or fail results in the Summary of Results section (6.2)

Record resource consumption data in the Summary of Activities section (6.2)

For each failure, have the failure analyzed and record the fault information in the Summary of Results (6.2)

If additional tests are not needed, then record normal termination in the Summary of Activities (7.1)

Ensure that the specific situation causing termination is documented in the Summary of Activities (7.2)

Record the addition of test in the Summary of Activities (7.3)

7. Revisar

Page 35: IEEE_1008_expo

IEEE Std for Software Unit Testing

1008-1987

Plan

Determine

Refine

Design

Implement

Execute

Check

Evaluate

Actividad 8

Evaluar la unidad y el esfuerzo

de la prueba

8. Evaluar

Page 36: IEEE_1008_expo

8. Evaluar IEEE Std for Software Unit Testing

1008-1987

Entradas

Especificaciones de

diseño de las pruebas

unitarias (4.5)

Información de la

ejecución (6.1 y 6.2)

Información de la

Revisión (7.1 al 7.3)

Especificaciones por

separado de los casos de

prueba (si son producidas de

4.3 y 4.4)

Tareas

8.1 Describir el estatus

de la prueba

8.2 Describir el estatus

de la unidad

8.3 Completar el Test

Summary Report

8.4 Asegurarse de

preservar los

productos de prueba

Salidas

Test Summary Report

completo (8.3)

Una completa

colección de productos

de prueba (8.4)

• Test design specification

• Separate test-case specifications

• Separate test procedure

specifications

• Test data

• Test data generation procedures

• Test drivers and stubs

• Test summary report

Page 37: IEEE_1008_expo

Test Summary Report

Record the identifier of each item in the Summary section (5.3)

Record all test incidents in the Summary of Results section (6.1)

Record pass or fail results in the Summary of Results section (6.2)

Record resource consumption data in the Summary of Activities section (6.2)

For each failure, have the failure analyzed and record the fault information in the Summary of Results (6.2)

If additional tests are not needed, then record normal termination in the Summary of Activities (7.1)

Ensure that the specific situation causing termination is documented in the Summary of Activities (7.2)

Record the addition of test in the Summary of Activities (7.3)

IEEE Std for Software Unit Testing

1008-1987

Record variances from test plans and test specifications in the Variances section (8.1)

For abnormal termination, identify areas insufficiently covered by the testing and record reasons in the Comprehensiveness Assessment section (8.1)

Identify unresolved test incidents and the reasons for a lack of resolution in the Summary of Results section (8.1)

Record differences revealed by testing between the unit and its requirements documentation in the Variances section (8.2)

Record evaluation information in the Evaluation section (8.2)

8. Evaluar

Page 38: IEEE_1008_expo

Apéndice A: Implementación y uso

Involucrar al usuario

Adoptar el estándar

Herramientas para unit testing

Determinación de requerimientos

Desarrollo de documentos

Detección de fallas y corrección de faltas

Testing: Comportamiento Actual vs Requerimientos

IEEE Std for Software Unit Testing

1008-1987

Apéndice B: Conceptos y Supuestos

Apéndice C: Recursos para Técnicas y Herramientas

Page 39: IEEE_1008_expo

Conclusiones IEEE Std for Software Unit Testing

1008-1987

Page 40: IEEE_1008_expo

Referencias Bibliográficas

IEEE Standard for Software Unit Testing 1008-1987.

IEEE Std 729-1983, IEEE Standard Glossary of Software

Engineering Terminology.

IEEE Std 829-1983, IEEE Standard for Software Test

Documentation.

IEEE Std for Software Unit Testing

1008-1987