week 10

14
Testing Testing Amy Power Amy Power Tim Read Tim Read Shanon Hentges Shanon Hentges

Upload: softwarecentral

Post on 28-Jun-2015

300 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Week 10

TestingTesting

Amy PowerAmy Power

Tim ReadTim Read

Shanon HentgesShanon Hentges

Page 2: Week 10

• Test PlanTest Plan• Test Plan StandardsTest Plan Standards• Types of Test PlansTypes of Test Plans• What is a Test Case?What is a Test Case?• Why Write Tests?Why Write Tests?• Testing SoftwareTesting Software

– NUnitNUnit– CactusCactus– Visual Studio.NET 2005Visual Studio.NET 2005

• Questions?Questions?

AgendaAgenda

Page 3: Week 10

Test PlanTest Plan

The role of a test plan is to prescribe The role of a test plan is to prescribe the scope, approach, resources, and the scope, approach, resources, and schedule of the testing activities. To schedule of the testing activities. To identify the items being tested, the identify the items being tested, the features to be tested, the testing features to be tested, the testing tasks to be performed, the personnel tasks to be performed, the personnel responsible for each task, and the responsible for each task, and the risks associated with this plan.risks associated with this plan.

Page 5: Week 10

Types of Test PlansTypes of Test Plans• Unit TestUnit Test

– Tests which check the correctness of a particular moduleTests which check the correctness of a particular module of code. By testing the parts of a program first and then of code. By testing the parts of a program first and then testing the sum of its parts will make integration testing testing the sum of its parts will make integration testing easier.easier.

• Integration TestIntegration Test– Tests that are executed to ensure there is a connection Tests that are executed to ensure there is a connection

with the different logic layerswith the different logic layers

• System TestSystem Test– Occurs when the project is implemented with business Occurs when the project is implemented with business

computers outside the test areacomputers outside the test area

• Acceptance TestAcceptance Test– Occurs when the finished project is implemented and is Occurs when the finished project is implemented and is

tested by users within the companytested by users within the company

Page 6: Week 10

What is a Test Case?What is a Test Case?

• A set of inputs, execution A set of inputs, execution preconditions, and expected preconditions, and expected outcomes developed for a outcomes developed for a particular objective, such as to particular objective, such as to exercise a particular program exercise a particular program path or to verify compliance with path or to verify compliance with a specific requirementa specific requirement of the of the program.program.

Page 7: Week 10

Why Write Tests?Why Write Tests?

• Tests Reduce Bugs in New FeaturesTests Reduce Bugs in New Features• Tests Reduce Bugs in Existing FeaturesTests Reduce Bugs in Existing Features• Tests Are Good DocumentationTests Are Good Documentation• Tests Reduce the Cost of ChangeTests Reduce the Cost of Change• Tests Improve DesignTests Improve Design• Tests Allow RefactoringTests Allow Refactoring• Tests Constrain FeaturesTests Constrain Features• Tests Defend Against Other ProgrammersTests Defend Against Other Programmers• Testing Forces You to Slow Down and ThinkTesting Forces You to Slow Down and Think• Testing Makes Development FasterTesting Makes Development Faster• Tests Reduce FearTests Reduce Fear

http://www.onjava.com/pub/a/onjava/2003/04/02/javaxpckbk.html?page=lasthttp://www.onjava.com/pub/a/onjava/2003/04/02/javaxpckbk.html?page=last

Page 8: Week 10

Testing SoftwareTesting Software

• CSUnitCSUnit

• JUnitJUnit

• NUnitNUnit

• CactusCactus

• Visual Studio.NET 2005 Team Visual Studio.NET 2005 Team SystemSystem

Page 9: Week 10

NUnitNUnit

• NUnit is an open source unit testing framework NUnit is an open source unit testing framework for Microsoft .NET. It serves the same purpose as for Microsoft .NET. It serves the same purpose as JUnit does in the Java world.JUnit does in the Java world.

• Initially ported from JUnit, the current release, Initially ported from JUnit, the current release, version 2.2, is the fourth major release of this version 2.2, is the fourth major release of this xUnit based unit testing tool for Microsoft .NET. xUnit based unit testing tool for Microsoft .NET.

• It is written entirely in C# and has been It is written entirely in C# and has been completely redesigned to take advantage of completely redesigned to take advantage of many .NET language features.many .NET language features.

http://www.nunit.org/http://www.nunit.org/

Page 10: Week 10

NUnitNUnit

Page 11: Week 10

CactusCactus

• Cactus is a simple test framework for unit testing Cactus is a simple test framework for unit testing server-side java code (Servlets, EJBs, Tag Libs, server-side java code (Servlets, EJBs, Tag Libs, Filters, ...). Filters, ...).

• The intent of Cactus is to lower the cost of writing The intent of Cactus is to lower the cost of writing tests for server-side code. It uses JUnit and extends it. tests for server-side code. It uses JUnit and extends it.

• Cactus implements an in-container strategy, meaning Cactus implements an in-container strategy, meaning that tests are executed inside the container.that tests are executed inside the container.

http://jakarta.apache.org/cactus/http://jakarta.apache.org/cactus/

Page 12: Week 10

Visual Studio.NET 2005Visual Studio.NET 2005

• Writes test cases for you to test Writes test cases for you to test your Business Logic Layer for C#, your Business Logic Layer for C#, J#, VB and ASP.NetJ#, VB and ASP.Net

• Bradshaw MarinaBradshaw Marina– Shows an example of how VB.Net Shows an example of how VB.Net

code from the business logic layer is code from the business logic layer is analyzed and test cases are analyzed and test cases are generated for that code.generated for that code.

Page 13: Week 10

Visual Studio.NET 2005Visual Studio.NET 2005

Page 14: Week 10

Questions?Questions?