Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Measuring Testability of C# code

Having come across a link on stack overflow, I have found the writings of Miško Hevery very engaging reading. So good that I am seeing a new approach to what I previously thought I was doing quite well.

He talks mainly about Dependency Injection, Automated Unit Testing and Good Design.

A number of the good practices he advocates are things that can be programatically detected. And so there is a program to detect them Google Testability Explorer.

My questions is:

  • Is there a C# equivalent to the Java based Google Testability Explorer out there?
  • If so, which is the best?
like image 964
Don Vince Avatar asked Nov 11 '08 11:11

Don Vince


People also ask

What is testability measure?

Controllability is defined as the difficulty of setting a particular logic signal to a 0 or a 1. PIs are free (usually assigned a value of 1). Output 1 values for AND gates are more expensive than OR gates.

How do you test the testability of a software?

Main Factors of Software Testability Two main testability factors include observability and controllability. Observability is the ability to detect the software components' response to the inputs and monitor the alteration they cause to the inside state of the software.

What are testability requirements?

A testable requirement describes a single function or behavior of an application in a way that makes it possible to develop tests to determine whether the requirement has been met. To be testable, a requirement must be clear, measurable, and complete, without any ambiguity.


2 Answers

Pex is an interesting entry. It has the potential to take testing to a new level, especially when combined with Code Contracts.

like image 160
Bryan Watts Avatar answered Sep 28 '22 14:09

Bryan Watts


It doesn't provide the information in quite the same way as the Google Testability Explorer, but NDepend (non-free) provides a lot of code analysis for .Net assemblies.

like image 29
kͩeͣmͮpͥ ͩ Avatar answered Sep 28 '22 15:09

kͩeͣmͮpͥ ͩ