Clear Lines Consulting · clear-lines.comApril 21, 2010 · 1 The Joy of Pex

Slides:



Advertisements
Similar presentations
Formal Methods and Testing Goal: software reliability Use software engineering methodologies to develop the code. Use formal methods during code development.
Advertisements

Thomas Ball Microsoft Research. C# 3.0C# 3.0 Visual Basic 9.0Visual Basic 9.0 OthersOthers.NET Language Integrated Query LINQ to Objects LINQ to DataSets.
.NET 4.0 Code Contacts .NET 4.0 Code Contracts About Me James Newton-King Developer at Intergen Blog:
Leonardo de Moura Microsoft Research. Z3 is a new solver developed at Microsoft Research. Development/Research driven by internal customers. Free for.
SharePoint Forms All you ever wanted to know about forms but were afraid to ask.
Mobile Development Introduction to Visual Studio Development Rob Miles Department of Computer Science.
The Dafny program verifier
Computer Science & Engineering 2111 Text Functions 1CSE 2111 Lecture-Text Functions.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
Microsoft VB 2005: Reloaded, Advanced Chapter 5 Input Validation, Error Handling, and Exception Handling.
How to Optimize Your Existing Regression Testing Arthur Hicken May 2012.
Precise Inter-procedural Analysis Sumit Gulwani George C. Necula using Random Interpretation presented by Kian Win Ong UC Berkeley.
Software engineering for real-time systems
Pexxxx White Box Test Generation for
Lecture 9: Debugging & Testing. 9-2 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Objectives “Unfortunately, errors are a part of life. Some.
PARALLEL PROGRAMMING ABSTRACTIONS 6/16/2010 Parallel Programming Abstractions 1.
Visual Studio C++ Express Installation Guide Ron Gross
Microsoft ® Official Course Monitoring and Troubleshooting Custom SharePoint Solutions SharePoint Practice Microsoft SharePoint 2013.
Latest and trendiest? A template in Visual Studio? The best best practice? No! Much better! I believe that DDD can help very much.
Oracle Developer Tools for Visual Studio.NET Curtis Rempe.
Getting Started Example ICS2O curriculum
VARIABLES, TYPES, INPUT/OUTPUT, ASSIGNMENT OPERATION Shieu-Hong Lin MATH/CS Department Chapel.
System/Software Testing
Python & ModelBuilder. Continuing Education Python and ModelBuilder Overview Python/ModelBuilder Concepts –The Geoprocessor –Checking some environment.
Red Lizard Software Creators of Code Confidence..
DySy: Dynamic Symbolic Execution for Invariant Inference.
Testing Especially Unit Testing. V-model Wikipedia:
Copyright © 2002 W. A. Tucker1 Chapter 7 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Review for Mid-term! October 26, Review Homework Worksheet True or False Operators are symbols that perform specific operations in Visual Basic.
Visual Studio 2005 Team System: Building Robust & Reliable Software Tejasvi Kumar Technology Specialist - VSTS Microsoft Corporation
© BJSS Limited 2005 Commercial in Confidence Visual Studio 2008 Productivity Enhancing Tips and Resources Jeff Watkins – 25 September 2008.
Test Driven Development Arrange, Act, Assert… Awesome Jason Offutt Software Engineer Central Christian Church
Microsoft Excel & VBA Day 3. Objectives for today: You will be able to… …implement functions in Excel. …write simple functions using VBA.
Applied Computing Technology Laboratory QuickStart C# Learning to Program in C# Amy Roberge & John Linehan November 7, 2005.
Tao Xie North Carolina State University Nikolai Tillmann, Peli de Halleux, Wolfram Schulte Microsoft Research.
Code Contracts Parameterized Unit Tests Tao Xie. Example Unit Test Case = ? Outputs Expected Outputs Program + Test inputs Test Oracles 2 void addTest()
Unit Testing 101 Black Box v. White Box. Definition of V&V Verification - is the product correct Validation - is it the correct product.
Examples of comparing strings. “ABC” = “ABC”? yes “ABC” = “ ABC”? No! note the space up front “ABC” = “abc” ? No! Totally different letters “ABC” = “ABCD”?
Introduction to VSTS Introduction to Visual Studio 2008 Development Edition Understanding code complexity using Code Metrics.
1 Program Testing (Lecture 14) Prof. R. Mall Dept. of CSE, IIT, Kharagpur.
Profiling Where does my application spend the time? Profiling1.
IAsyncResult ar = BeginSomething(…); // Do other work, checking ar.IsCompleted int result = EndSomething(ar);
1 Splint: A Static Memory Leakage tool Presented By: Krishna Balasubramanian.
Implementing and Using the SIRWEB Interface Setup of the CGI script and web procfile Connecting to your database using HTML Retrieving data using the CGI.
Black Box Testing : The technique of testing without having any knowledge of the interior workings of the application is Black Box testing. The tester.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College Lecture 2: Working with Visual.
Copy of the from the secure website - click on the AccoridaLife.zip link.
MTA EXAM Software Testing Fundamentals : OBJECTIVE 6 Automate Software Testing.
Random Test Generation of Unit Tests: Randoop Experience
Symbolic Execution in Software Engineering By Xusheng Xiao Xi Ge Dayoung Lee Towards Partial fulfillment for Course 707.
5 Worker Role Your Code public class WorkerRole : RoleEntryPoint { public override void Run() { while (true) { Thread.Sleep(1000); //Do something.
Automation Testing Trainer: Eran Ruso. Training Agenda Automation Testing Introduction Microsoft Automation Testing Tool Box Coded UI Test and Unit Test.
Run on Windows.NET as system component Run on VM (CLR) Black box compilers Edit in Visual Studio Proprietary Run everywhere Deploy with app Compile.
Software Testing.
Software Testing.
White-Box Testing.
| AVG retail Registration | AVG| avg.com/retail | | install avg retail license code| setup
MSDN Academic Alliance Software Center
White-Box Testing Using Pex
UNIT-4 BLACKBOX AND WHITEBOX TESTING
High Coverage Detection of Input-Related Security Faults
Software Testing (Lecture 11-a)
Microsoft Connect /17/2019 9:55 PM
Install MySQL Community Server and MySQL Workbench
White-Box Testing.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software Testing.
C# and ASP.NET Programming
DataBase Application .NET
Permission for this presentation is currently restricted. If you are not running Microsoft Office 2003 or an application that supports presentations with.
Presentation transcript:

Clear Lines Consulting · clear-lines.comApril 21, 2010 · 1 The Joy of Pex

Clear Lines Consulting · clear-lines.comApril 21, 2010 · 2 What is Pex? »White box unit testing tool for.Net »Microsoft Research »Visual Studio 2008/2010 add-in »Free for personal use or with MSDN license

Clear Lines Consulting · clear-lines.comApril 21, 2010 · 3 What does Pex do? »Pex = Project Exploration Given a public method, Pex »Helps find “interesting” inputs for methods »Generates parameterized unit tests – Supports multiple testing frameworks »Today: only exploration

Clear Lines Consulting · clear-lines.comApril 21, 2010 · 4 A simple example public class Password { public static bool IsStrong(string password) { if (password.Length < 8) { return false; } return true; }

Clear Lines Consulting · clear-lines.comApril 21, 2010 · 5 Running Pex in Visual Studio

Clear Lines Consulting · clear-lines.comApril 21, 2010 · 6 Pex produces “interesting” inputs

Clear Lines Consulting · clear-lines.comApril 21, 2010 · 7 What are “interesting inputs”? »Full coverage – All paths in method have been exercised »Identified possible exception »Produced “simplest” set of inputs »Not necessarily the ones you would think of – Should we prevent escape characters?

Clear Lines Consulting · clear-lines.comApril 21, 2010 · 8 More complex case public static bool IsReallyStrong(string password) { var lowers = 0; var uppers = 0; var numbers = 0; foreach (Char c in password) { if (Char.IsNumber(c)) numbers++; if (Char.IsUpper(c)) uppers++; if (Char.IsLower(c)) lowers++; } if (lowers <= 2 || uppers < 2 || numbers < 2) return false; return true; }

Clear Lines Consulting · clear-lines.comApril 21, 2010 · 9 Pex is pretty exhaustive

Clear Lines Consulting · clear-lines.comApril 21, 2010 · 10 Why should you care? »Finding good test cases takes time – Being complete is “expensive” – Ex: exception cases tests »Finding good test cases takes skill – Thinking like a bug is difficult »Analyzing existing code can be lengthy

Clear Lines Consulting · clear-lines.comApril 21, 2010 · 11 So what? »Very useful tool to write more robust code »Very useful to investigate legacy code »Potentially useful to create unit tests »Download Pex: »Contact me: