an approach to test autonomic containers ronald stevens (ieee computer society & acm student...

26
An Approach to Test An Approach to Test Autonomic Containers Autonomic Containers Ronald Stevens (IEEE Computer Society & ACM Student Member) August 1, 2006 REU Sponsored by NSF

Upload: shauna-anabel-oneal

Post on 27-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

An Approach to Test Autonomic An Approach to Test Autonomic ContainersContainers

Ronald Stevens

(IEEE Computer Society &

ACM Student Member)

August 1, 2006

REU Sponsored by NSF

2

OverviewOverview1. Introduction2. Research Objectives3. Review of previous work4. Autonomic Container5. Testing Framework6. Tools Used7. Autonomic Container Package8. Prototype9. Conclusion10. Future Work

3

1. Introduction1. IntroductionThe growing complexity of computing

systems has motivated a need for self-managing systems.

A key feature of the human body is self-management – Autonomic Nervous System.

Self-management involves self-healing, self-configuring, self-optimizing, and self-protecting.

An implicit component in self-management is the ability to self-test.

4

2. Research Objectives2. Research Objectives

Review existing work on testing autonomic systems.

Extend current knowledge on testing autonomic systems.

Create a prototype to validate the extended knowledge.

Document the research activities.

5

3. Review of Previous Work3. Review of Previous Work

1. Literature review – Testing Autonomic Systems

2. Phase 1 – Survey

3. Phase 2 – Testing Framework

6

3.1 Literature Review3.1 Literature Review

Several projects were reviewed including:– Impala– OceanStore– Model-Driven Autonomic Manager– Bison

Little or no work has been done in testing Autonomic Computing Systems.

7

3.2 Phase 1 - Survey3.2 Phase 1 - SurveySurvey on different projects in Autonomic

Systems.

Systems were compared based on criteria in the areas of: – QoS, Cost, Adaptivity, Fault Tolerance, Fault

Avoidance, Fault Detection, Degree of Autonomy , Granularity, Availability of Source Code

Documentation: – Presentation 1 “Survey of Validation Methods in

Autonomic Computing Systems” and Survey Paper

8

3.3 Phase 2 – Testing Framework3.3 Phase 2 – Testing Framework

Introduction of Autonomic Testing Framework

Introduction of Autonomic Container

Presentation of a High Level Architectural Framework

Documentation: Presentation 2: “A Framework to Test Autonomic Containers”

9

4. Autonomic Container4. Autonomic ContainerContainer – a housing for a group of items that

allows storage, organization, and efficient accessAutonomic Container can:

– self-heal– self-protect– self-optimize– self configure

It is an autonomic data structureThis container will also possess the implicit

ability to self-test

10

Use of Autonomic ContainerUse of Autonomic Container

Sys_Controller

.

Autonomic_Container

.

AC_Application

.

11

Autonomic Container ArchitectureAutonomic Container ArchitectureAC_Controller

(from Orchestrating Manager)

Self-TestManager

.

Self-Configure

.

Self-Optimize

.

Self-Protect

.

Self-Heal

.

StackException

.

+Stack()+Stack(in : int)+isEmpty() : bool+isFull() : bool#addCapacity(in : int)#reduceCapacity(in : int)+push(in : int)+pop() : int+top()#getSize() : int#getCapacity() : int

-capacity : int-number_of_items : int-stack : int[ ]

Stack

Only Self-TestManager Implemented

12

5. Testing Framework5. Testing Framework

Orchestrating AM

TouchpointAM for Self-*

Managed Resource

3a. Start Replication Strategy

3b. Setup Validation

Orchestrating Test Manager

Touchpoint Test Manager

1. Symptom for Self* Recognized

5. Symptom for Self-

Test Recognized

6. Execute Tests

7. Test Results and Profiling Info

8a. Validation Passed (or Failed)

9. Allow Change (or Revert)

8b. Inadequate Test Coverage

2. Change Request

Detected3c. ValidationPolicy

Copy of Managed Resource

4. Implement Change Request

13

Structure of Touchpoint Test ManagerStructure of Touchpoint Test Manager

1.0 Load Validation Policy1.0 Load Validation Policy

1.1 Retrieve New Structure 1.1 Retrieve New Structure

InformationInformation

1.2 Perform Test Suite 1.2 Perform Test Suite AnalysisAnalysis

1.3 Create Test Plan1.3 Create Test Plan

1.3.1 TestPlanCreated1.3.1 TestPlanCreated

EventEvent

1.3.2 Finalize Test Plan1.3.2 Finalize Test Plan

1.4 Execute Test Plan 1.4 Execute Test Plan

1.5 Run Test Cases1.5 Run Test Cases

Monitor

Analyze Plan

Execute

1.2

1.3

1.4

Managed Resource (or Copy)

1.1 1.5

Knowledge(Test Repository)

Sensor Effector

Sensor Effector

OTM 1:Validation

Policy

OTM 2:New Test Plan Detected,

Invoke Profiler

1.3.1

OTM 3:Profiler Setup

Complete

1.3.2

1.0

14

Structure of Touchpoint Test ManagerStructure of Touchpoint Test Manager2.1 Retrieve Test Results 2.1 Retrieve Test Results

and Profiling Infoand Profiling Info

2.2 Perform Test Log 2.2 Perform Test Log

AnalysisAnalysis

2.2.1a TestsPassed Event2.2.1a TestsPassed Event (or TestsFailed Event)(or TestsFailed Event)

2.2.2a Completed Success2.2.2a Completed Success (or Terminated)(or Terminated)

OROR

2.2.1b Inadequate TC Event2.2.1b Inadequate TC Event

2.2.2b Re-analyze TS2.2.2b Re-analyze TS

2.3 – 2.5 Same as 1.3 – 1.52.3 – 2.5 Same as 1.3 – 1.5

Monitor

Analyze Plan

Execute

2.2

2.3

2.4

Managed Resource (or Copy)

2.1 2.5

Knowledge(Test Repository)

Sensor Effector

Sensor Effector

OTM 4a: Passed(Failed)

OTM 5b:Proceed with

more Validation

2.2.1a 2.2.1b

OTM 4b:Inadequate

Test Coverage

2.2.2b

2.2.

2a

OTM 5a:Completed

(Terminated)

15

6. Tools Used6. Tools Used

Cobertura– Code profiler– Branch coverage– Line coverage– Generates reports

JUnit– Unit testing framework– Part of xUnit family of testing frameworks

16

CoberturaCobertura

Cobertura is used to profile the Stack class code.

Cobertura will instrument the Stack class, then the JUnit tests will be run on Stack Test.

When the tests are complete, we will see the branch and line coverage handled by the Stack Cover.

17

JUnitJUnitWe have created several JUnit test cases to

run on the Stack class.The purpose of the test cases is to ensure

the correctness of the Stack class.Approaches used to develop test cases:

– Boundary– Equivalence Partitioning

Following the completion of the JUnit test cases, the output of results will be placed in a text file entitled Test Log.

18

7. Autonomic Container Package7. Autonomic Container Package

The Autonomic Container Package consists of:

– The Stack class

– The Stack Exceptions (Empty Stack, Full Stack, and Stack Change)

– The Self Test Manager (Stack Test, Stack Cover, Test Runner Batch File, and Test Exec)

The JUnit and Cobertura folders are also housed in this directory.

19

AC Package LayoutAC Package Layout

StackException

.

SelfTestManager

.

+Percent(in : double, in : double) : long+PrintCover(in : long, in : long)+Main(in args : string[ ])

StackCover

+TestExec(in : string)+Main(in args : string[ ])

TestExec+testConstructor()+testEmpty()+testFull()+testPushUntilFull()+testPopFromFull()+testPopFromEmpty()+testPopOffFull()+testPushPop()+testPush()+testPushSize()+testAddCapacity()+testReduceCapacity()

StackTest

JUnit

.

Cobertura

.

StackChangeException FullStackExceptionEmptyStackException

TestCase

ProjectData

Invokes TestRunner Batch File

Exception (from java.lang)

+Stack()+Stack(in : int)+isEmpty() : bool+isFull() : bool#addCapacity(in : int)#reduceCapacity(in : int)+push(in : int)+pop() : int+top()#getSize() : int#getCapacity() : int

-capacity : int-number_of_items : int-stack : int[ ]

Stack

20

8. Demonstration of Prototype8. Demonstration of Prototype

1. Design of Autonomic Container using UML

2. Implementation of the prototype

3. Execution of the prototypea. Good Stack

b. Bad Stack

21

9. Results9. Results

Extended the concept of an autonomic element to allow self-testing.

Developed an architecture for the self-test management component of Autonomic Container.

Validated our approach of self-testing by creating a prototype consistent with the proposed architecture.

22

Documentation of Research ActivitiesDocumentation of Research Activities

Technical Report

– Survey of Validation in Autonomic Systems

Positional Paper

– An Approach to Testing Autonomic Computing Systems

– To be submitted to the 3rd Workshop on Software Quality Assurance (SOQUA 2006), FSE/ACM.

Technical Paper: Ronald Stevens and Brittany Parsons

– A Self-Testing Autonomic Container

– To be submitted to the 45th ACM Southeast Conference

23

10. Future Work10. Future Work

Currently we have been able to implement only the Self Test aspect of the Autonomic Container.

The next step is to add in the Self Healing, Self Optimizing, Self Protecting, and Self Configuring characteristics to the Autonomic Container.

Work will continue to be done on the idea of Self-test in Autonomic Computing.

24

AcknowledgementsAcknowledgements

Brittany ParsonsTariq M. King – Ph.D. StudentSoftware Testing Research Group at FIUDr. Peter ClarkeDr. Masoud Milani and the FIU School of

Computing and Information SciencesNational Science Foundation

25

SourcesSources

[IBM05] IBM Corporation. IBM, 2005. An architectural blueprint for autonomic computing. June 2005.

[KC03] J. Kephart and D. Chess. The vision of autonomic computing. Computer, vol. 36, no.1, pp. 41-50, January 2003.

[JUN] Junit, Testing Resources for Extreme Programming. www.junit.org. July 2006

[COB] Cobertura. cobertura.sourceforge.net/. July 2006

26

Thank You and QuestionsThank You and Questions