You are on page 1of 14

KI M TH UNIT TRN NGN NG C#

Sinh vin: V Th H ng L p: CNPMK5 gvhd: Nguy n H ng Tn

N I DUNG BO CO
Ph n 1: - T ng quan v unit test. - Unit test trong .NET. Ph n 2: - PUT( Parameterized Unit Testing ). - Pex. Ph n 3: ng d ng.

Ph n 1: T ng quan v Unit test


1. nh ngh a, thnh ph n c a Unit test trong .NET.
i n. Unit test t t. nh ngh a, thnh ph n c a Unit test

2.T ng b

c t o Unit test trong .NET

V d : Unit test

3.Gi i thu t Luhn


S Gi i thu t Luhn.

Ph n 2. PUT V PEX

PUT
- PUT(Parameterized Unit Testing ). - V d :

PEX

Pex (Program Exploration) Microsoft Research (Research in Software Engineering - RiSE)

DEMO HELLO WORLD

PEX: How do it do?

Pex Features ?
Pex generates inputs for your unit tests through automate exploratory testing. Unit Test Cases for free. Save test case as Test Project We can Debug, and run them later on. Code Converge. Parameterized Unit Testing.

Pex has Limitations


Remember its still research. Not available under a commercial license Pex does not support executing any code that requires to bo hosted in IIS. It will not help your Webform/Winform

Summary
Pex is a project from Microsoft research Available today for VS2008 and VS2010 . It is a Test Input Generator. Parameteried Unit test

Thank you

You might also like