Introduction Previous work Test Suite Minimization

Slides:



Advertisements
Similar presentations
Configuration management
Advertisements

Goldilocks: Efficiently Computing the Happens-Before Relation Using Locksets Tayfun Elmas 1, Shaz Qadeer 2, Serdar Tasiran 1 1 Koç University, İstanbul,
Automated Software Testing: Test Execution and Review Amritha Muralidharan (axm16u)
Overview Motivations Basic static and dynamic optimization methods ADAPT Dynamo.
® IBM Software Group © 2010 IBM Corporation What’s New in Profiling & Code Coverage RAD V8 April 21, 2011 Kathy Chan
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
QA Automation Solution. Solution Architecture Test Management tool CI Tool Automation framework Testing Project BDD Tool Text of test to Testing Project.
Secure Embedded Processing through Hardware-assisted Run-time Monitoring Zubin Kumar.
Memory Management 3 Tanenbaum Ch. 3 Silberschatz Ch. 8,9.
SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally VIRTUALMEMORY.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Test Plan: Introduction o Primary focus: developer testing –Implementation phase –Release testing –Maintenance and enhancement o Secondary focus: formal.
Memory Management OS Fazal Rehman Shamil. swapping Swapping concept comes in terms of process scheduling. Swapping is basically implemented by Medium.
CS223: Software Engineering Lecture 18: The XP. Recap Introduction to Agile Methodology Customer centric approach Issues of Agile methodology Where to.
Eliminating External Fragmentation in a Non-Moving Garbage Collector for Java Author: Fridtjof Siebert, CASES 2000 Michael Sallas Object-Oriented Languages.
Computer System Structures
CS223: Software Engineering
Eighth Lecture Exception Handling in Java
Dynamic Allocation in C
Automated Software Testing
COMP 2100 From Python to Java
Global Register Allocation Based on
PROTECTION.
Memory Hierarchy Ideal memory is fast, large, and inexpensive
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
Multitasking without Compromise: a Virtual Machine Evolution
Jonathan Walpole Computer Science Portland State University
Chapter 14: Protection Modified by Dr. Neerja Mhaskar for CS 3SH3.
Chapter 14: System Protection
Machine Independent Assembler Features
Lecture 12 Virtual Memory.
Chapter 9: Virtual Memory – Part I
CS703 - Advanced Operating Systems
Introduction Enosis Learning.
Pointers and References
Main Memory Management
Introduction Enosis Learning.
High Coverage Detection of Input-Related Security Faults
Tuan Anh Nguyen, Christoph Csallner
Chapter 9: Virtual-Memory Management
Machine Independent Features
Chapter 2: System Structures
Computer Architecture
Module IV Memory Organization.
Test Case Purification for Improving Fault Localization
Chapter 10 Transaction Management and Concurrency Control
Mock Object Creation for Test Factoring
Chapter 3 – Agile Software Development
Chapter 9: Virtual Memory
CSCE 313 – Introduction to UNIx process
CSE 451: Operating Systems Autumn 2005 Memory Management
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Please use speaker notes for additional information!
Speculative execution and storage
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
(Computer fundamental Lab)
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Programming Logic and Design Fifth Edition, Comprehensive
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
Applying Use Cases (Chapters 25,26)
Memory Management CSE451 Andrew Whitaker.
Configuration management
Programming with Shared Memory Specifying parallelism
Mitali Rawat, Sonu Agarwal, Sudarshan Avish Maru
M S COLLEGE ART’S, COMM., SCI. & BMS
Student : Yan Wang student ID:
CSE 542: Operating Systems
Plug-In Architecture Pattern
Mitigating the Effects of Flaky Tests on Mutation Testing
Just In Time Compilation
Presentation transcript:

Introduction Previous work Test Suite Minimization reduce the total number of tests to execute by identifying duplicate tests Typically using coverage measures Test Suite Prioritization

Introduction Previous work Test Suite Minimization Test Suite Prioritization Re-order test cases by a given priority Useful to identify faults earlier but does not actually reduce the total execution time Example of Test Suite Prioritization: When changes occur, the most relevant test cases to the changes are executed first

Unit Test Virtualization Rather than focusing on the number of test cases, minimize the total amount of time on execution instead

Test Suite Execution Loop In large applications, each test executes in its own process, rather than in the same process The isolation is to prevent the tests cases in one suite from having side effects on others

Test Suite Execution Loop

Test Suite Execution Loop Removing the initialization from the loop, instead perform it only at the beginning of the test suite Fork the initialized process for test cases(just like pre-test and post-test written by programmers)

Key Insight No need to reinitialized the entire application Maintain the isolation

Unit Test Virtualization Automatically identifies the code segments that may create side-effects and isolates them in a container similar to a light weight virtual machine

VMVM Transforms application byte code directly without requiring modification to the JVM or application source code Integrated with Junit, ant and maven

Motivation MQ1: Do developers isolate their unit tests? MQ2: Why do developers isolate their unit tests? MQ3: What is the overhead of the isolation technique that developers use?

MQ1: Do developers isolate tests?

Motivation MQ1: Do developers isolate their unit tests? MQ2: Why do developers isolate their unit tests? MQ3: What is the overhead of the isolation technique that developers use?

MQ2: Why isolate tests? In order to make the environment “clean” Example:

Motivation MQ1: Do developers isolate their unit tests? MQ2: Why do developers isolate their unit tests? MQ3: What is the overhead of the isolation technique that developers use?

MQ3: The overhead of isolation Time to execute in separate process Time to execute in the same process

Approach Determines which parts of the application will need to be reset before the next execution Reset the affected memory at the end of each test execution

Approach Static analysis Dynamic analysis Runtime performance Precision

Static Analysis Placing each addressed memory region into one of the two categories: Ms(“safe”) and Mu(“unknown”) Area in Ms means it is never accessed, or it is always reset to its starting condition at last

Dynamic Analysis Areas in Mu are left to a runtime checker to identify which one is written but not cleared

Implementation No modification to JVM Architecturally, VMVM consists of a static bytecode instrumenter and a dynamic runtime Static analyzer and instrmenter Identify and insert codes for reinitialization Dynamic runtime Tracks what needs to be reset and perform the reinitialization

Static Analysis For static fields, those not only hold a constant value, but its value must not be dependent on any non-constant values can be placed in Ms Instead of reinitializing individual static fields of a class, the entire class needs to be handle No field in Mu, no side effects to other classes

Static Instrumentation Preface each access with a check to see whether needs reinitialization by force Trigger the initialization when Creating a new instance of a class Accessing a static method of the class Accessing a static field of the class Explicitly requested via reflection

Logging Class Initializations Insert logging code in <clinit> Two places Initialization state of the class in a static field for quick lookup on determining whether the class needs reinitialization Index that contains all the classes that have been initialized to see whether the reinitialization occurs

Dynamically Reinitializing Classes Clears the flag that indicates that the class has been initialized so that next time the class is accessed, the initialization process is called Only application code(not Java core library set) are instrumented(causes leaked data) Using scripts to see possible candidates and verifying by hand to identify false positives Logging the values

Test Automation Integration Plugs directly into Junit and build automation systems ant and maven

Supporting Class Reinitialization Housekeeping Renaming <clinit> to configurable name(<_vmvm_clinit_>) Adding a shell <clinit> including logging code segments and former <clinit> Supporting ‘final’ field Remove final field Check to ensure that they do not reference a previously final field

Experimental Results RQ1: RQ2: RQ3: VMVM compared to TSM on performance and fault-finding ability RQ2: VMVM compared to creating a new process for each test on performance RQ3: VMVM compared to traditional isolation on fault-finding ability

RQ1 RF = 0

RQ2 & RQ3

Limitation Experiment results are not convincing enough Based on Java The selection of subjects used can be a potential threat RT & RS Based on Java Only isolate in-memory state(not on disk or in databases)