Pex Sample: A Parameterized Model of the File System

نویسندگان

  • Soonho Kong
  • Peli de Halleux
  • Nikolai Tillmann
چکیده

Programs that interact with the file system are a classical challenge to the testable software. Using directly file system primitives such as the System.IO.File class makes the code less testable since it hardcodes a dependency on the state of the physical file system at the time tests are executed. A classic symptomatic example are test case that pass the first time they are run, then fail on subsequent run. The first run generated files which breaks subsequent runs. To deal with these issues, programmers usually introduce a level of abstraction between the environment, i.e. the file system, and the code. In this sample, we took an abstraction of the file system that was defined in the CodePex Client project [1]. Unfortunately, even with a clear abstraction layer, the burden of the developer is still high. He has to understand the subtleties file system to craft a meaningful set of test cases. The file system is a complex system, whose complexity is underrated, which lead programmers to overlook obscure possible corner cases. To address this, we will show how Pex can be used to define a parameterized model of the file system, PFileSystem. The sample will show how to implement a CopyFiles method that copies the files from one directory to another.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Pex-White Box Test Generation for .NET

Pex automatically produces a small test suite with high code coverage for a .NET program. To this end, Pex performs a systematic program analysis (using dynamic symbolic execution, similar to pathbounded model-checking) to determine test inputs for Parameterized Unit Tests. Pex learns the program behavior by monitoring execution traces. Pex uses a constraint solver to produce new test inputs wh...

متن کامل

Delay-Dependent Robust Asymptotically Stable for Linear Time Variant Systems

In this paper, the problem of delay dependent robust asymptotically stable for uncertain linear time-variant system with multiple delays is investigated. A new delay-dependent stability sufficient condition is given by using the Lyapunov method, linear matrix inequality (LMI), parameterized first-order model transformation technique and transformation of the interval uncertainty in to the norm ...

متن کامل

Fuzzy adaptive tracking control for a class of nonlinearly parameterized systems with unknown control directions

This paper addresses the problem of adaptive fuzzy tracking control for aclass of nonlinearly parameterized systems with unknown control directions.In this paper, the nonlinearly parameterized functions are lumped into the unknown continuous functionswhich can be approximated by using the fuzzy logic systems (FLS) in Mamdani type. Then, the Nussbaum-type function is used to de...

متن کامل

PeX - Parameterized Unit Tests in Visual Studio

The following seminar paper is dealing with the recently released new test tool PeX by Microsoft Reseach, which stands short for Program Exploration. The main idea behind it is based on Parameterized Unit Tests, a concept trying to get along with some issues evolving from standard unit tests by supporting the developer with the possibility to let PeX automatically explore the possible execution...

متن کامل

Ex Vivo Comparison of File Fracture and File Deformation in Canals with Moderate Curvature: Neolix Rotary System versus Manual K-files

Background and Aim: Cleaning and shaping is one of the important steps in endodontic treatment, which has an important role in root canal treatment outcome. This study evaluated the rate of file fracture and file deformation in Neolix rotary system and K-files in shaping of the mesiobuccal canal of maxillary first molars with moderate curvature.    Materials and Methods: In this ex vivo exp...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010