Presentation is loading. Please wait.

Presentation is loading. Please wait.

Testing Chapter 10. Types of Testing Test typeEnsures that Unit testEach independent piece of code works correctly. Integration testAll units work together.

Similar presentations


Presentation on theme: "Testing Chapter 10. Types of Testing Test typeEnsures that Unit testEach independent piece of code works correctly. Integration testAll units work together."— Presentation transcript:

1 Testing Chapter 10

2 Types of Testing Test typeEnsures that Unit testEach independent piece of code works correctly. Integration testAll units work together without errors. Regression testNewly added features do not introduce errors to other features that are already working. Load test (also called stress test) The product continues to work under extreme usage. Platform testThe product works on all of the target hardware and software platforms.

3

4 Unit Testing with NUnit See http://www.byte- vision.com/NUnitAndVBArticle.aspx

5 NUnit Unit testing framework Market standard automated testing tool Imported from JUnit Free tool Written in C# See http://www.nunit.org

6 Demo: Using NUnit 1.Create a VB.NET solution 1.Code Classes 2.Test Class 2.Set up Test 3.Write basic test 4.Write exception test 5.Run test using NUnit GUI

7 Add a nUnit Test button to a toolbar (VS 2005) 1.Tools | External Tools

8 2. External Tools Dialog

9 3. Edit Custom Tools Dialog nunit-gui Or nunit-console

10 (Put a nUnit button on a toolbar) 4. Tools | Customize

11 5. Commands | Tools | External Command 2 Drag and drop onto a toolbar

12 6 Voila!

13 The Account Class RULES: Overdraft limit must be positive Amount withdrawn or deposited must be greater than zero Cannot withdraw over the overdraft limit

14 Demo Project: AccountVB –Class: Account.vb (review) Reference to nUnit.Framework Using Nunit.framework TestFixture Attribute Setup/Teardown Attributes Test attributes Red, Green, Yellow indicators Withdraw test Exception Test


Download ppt "Testing Chapter 10. Types of Testing Test typeEnsures that Unit testEach independent piece of code works correctly. Integration testAll units work together."

Similar presentations


Ads by Google