Opsamling fra sidste uge på øvelser
Performance/ LoadTest opgaver - disse opgaver inddrager test fra tidligere uger
Ved hver
af disse studér og diskuter hvad der kan udledes af LoadTest'en.
L1) Lav
en loadtest baseret på en unit-test fra tidligere opgave med maxibio (se
tidligere uger – fx basseret på
Maxibio - source m.m. - opdelt i komponenter).
L2) Lav
en loadtest baseret på en webtest af alm. webapplikation gerne med testdata
fra database (fx. opg 1 uge 40
http://test.bjoerks.net/SpecRegner.aspx)
L3) Lav
en webtest på en lidt mere cpu-tung webservice og en LoadTest baseret på
denne (fx en af GetAllePersoner..... fra
http://webservicedemo.datamatiker-skolen.dk/PersonWebService.asmx )
Performance/ LoadTest opgaver på windowsapplicationer
L4) Lav
en/flere loadtest baseret på en af tidligere UICodedTest.
Tema 8 - emne 8.8
Materiale se nedenfor.
Øvelser i forskellige testværktøjer – afprøv
eksempler.
Code
Contracts for .NET Microsoft (for Visual Studio)
-
https://visualstudiogallery.msdn.microsoft.com/1ec7db13-3363-46c9-851f-1ce455f66970
Code Contracts - User manual:
-
https://github.com/Microsoft/CodeContracts/blob/master/Documentation/User
Documentation/userdoc.pdf (2013)
Code Contracts
Editor Extensions VS2012
-
https://visualstudiogallery.msdn.microsoft.com/02de7066-b6ca-42b3-8b3c-2562c7fa024f
- Video
http://channel9.msdn.com/Blogs/Peli/Code-Contracts-Editor-Extensions (2010)
Some slides about Code Contracts
- https://fronter.com/eal/links/files.phtml/1300802070$61892152$/Mapper/Materiale/Slides-Code_Contracts-Foundations.pdf
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.