Bjørk Boye Busch
Erhvervsakademiet Lillebælt - PBA og Diplom i softwareudvikling
Faget Test

Beskrivelse: Beskrivelse: Beskrivelse: Beskrivelse: Beskrivelse: Beskrivelse: Beskrivelse: Beskrivelse: Erhvervsakademiet LillebæltBeskrivelse: Beskrivelse: Beskrivelse: Beskrivelse: Beskrivelse: Beskrivelse: Beskrivelse: Beskrivelse: Bjørk Boye Busch website
Sidst opdateret den
08.11.2013

Ugeseddel 10 - uge 46

link til uge 45 - uge 47

Opsamling fra sidste uge

 

Plan med foreløbige links

 

Tema 8 - emne 8.8   

 Tema 8: Hvordan automatiseres test af program funktionalitet (formål) - integrationstest

Emne 8.8: CodeContract , Moles(2010), Fakes (2012)  (alle overfladisk)

Materiale se nedenfor.
Øvelser i forskellige testværktøjer – afprøv eksempler.

Se links senere på siden
 

 

 

 

Næste uge udforskende test, afrunding og opstart af eksamensprojekt / testarbejdet

 

Code Contracts is available with a commercial license on the Visual Studio Gallery

Code Contracts  (2012)

Code Contracts for .NET Microsoft
-
http://visualstudiogallery.msdn.microsoft.com/1ec7db13-3363-46c9-851f-1ce455f66970
- http://research.microsoft.com/en-us/projects/contracts/
Full details are in the user documentation.

User manual (2013):
- http://research.microsoft.com/en-us/projects/contracts/userdoc.pdf (2013)
User manual (2012):
http://download.microsoft.com/download/C/2/7/C2715F76-F56C-4D37-9231-EF8076B7EC13/userdoc.pdf (2012)

Code Contracts Editor Extensions VS2012
-
http://visualstudiogallery.msdn.microsoft.com/02de7066-b6ca-42b3-8b3c-2562c7fa024f
- Video http://channel9.msdn.com/Blogs/Peli/Code-Contracts-Editor-Extensions (2010)

Videos

 

 

 

Pex and Moles - Isolation and White box Unit Testing for .NET
- http://research.microsoft.com/en-us/projects/pex/

Starting using Moles Video (2010): http://channel9.msdn.com/blogs/peli/moles-replace-any-net-method-with-a-delegate
 

Uddrag fra site:


NEW:
Code Digger for Visual Studio 2012 is a lightweight version of Pex that allows you to explore public .NET methods in Portable Class Libraries directly from the code editor. Under the hood, Code Digger uses the Pex engine.


Download Code Digger Now!

 
 

 

Pex and Moles are Visual Studio 2010 Power Tools that help Unit Testing .NET applications.

  • Pex automatically generates test suites with high code coverage. Right from the Visual Studio code editor, Pex finds interesting input-output values of your methods, which you can save as a small test suite with high code coverage. Microsoft Pex is a Visual Studio add-in for testing .NET Framework applications.
  • Moles allows to replace any .NET method with a delegate. The Fakes Framework in Visual Studio 2012 is the next generation of Moles & Stubs, and will eventually replace it. Moles supports unit testing by providing isolation by way of detours and stubs. The Moles framework is provided with Pex, or can be installed by itself as a Microsoft Visual Studio add-in.

 
Download Pex and Moles Now!

 

Isolating Code Under Test with Microsoft Fakes (2012)
- http://msdn.microsoft.com/en-us/library/hh549175(v=vs.110).aspx

Uddrag fra site:

Microsoft Fakes help you isolate the code you are testing by replacing other parts of the application with stubs or shims. These are small pieces of code that are under the control of your tests. By isolating your code for testing, you know that if the test fails, the cause is there and not somewhere else. Stubs and shims also let you test your code even if other parts of your application are not working yet.

Fakes come in two flavors:

  • A stub replaces a class with a small substitute that implements the same interface. To use stubs, you have to design your application so that each component depends only on interfaces, and not on other components. (By "component" we mean a class or group of classes that are designed and updated together and typically contained in an assembly.)
  • A shim modifies the compiled code of your application at run time so that instead of making a specified method call, it runs the shim code that your test provides. Shims can be used to replace calls to assemblies that you cannot modify, such .NET assemblies.
Fakes replace other components

 

 

 

 

 

 

Code Contracts  (2010 - gamle link)

 

Current version: 1.4.40602.0
(June 2, 2011)

·    Download (Academic License)

·         Download (Commercial license)

·         Release Notes

·         Frequently Asked Questions

·         User manual

·         Papers and documentation

·         VS 2010 Editor Extensions NEW!

o    Download it!

o    Documentation

o    Watch the video

 

Enabling and understanding code contracts in Visual Studio 2010 beta 2:  http://blog.rthand.com/post/2010/01/07/Enabling-and-understanding-code-contracts-in-Visual-Studio-2010-beta-2.aspx

Getting Started with Code Contracts in VS2010: http://stevesmithblog.com/blog/getting-started-with-code-contracts-in-vs2010/

Give Your Classes a Software Contract: http://msdn.microsoft.com/en-us/magazine/gg983479.aspx

Code Contracts Editor Extensions:
 - Try Code Contracts in your browser at: http://pex4fun.com

Mike Barnett and Daryl Zuniga: Code Contracts Editor Extensions: http://channel9.msdn.com/Blogs/Peli/Code-Contracts-Editor-Extensions

 

Code Contracts Settings in Visual Studio 2010: http://msdn.microsoft.com/en-us/magazine/hh148151.aspx

Static Code Analysis and Code Contracts: http://msdn.microsoft.com/en-us/magazine/hh335064.aspx