Now wait, where did all that time go? It feels like last week I posted the last time, but with an exciting job, a pregnant girlfriend, a study and an upcoming master thesis project I guess time just does fly.
Now back to the more technical stuff:
I've been talking to my thesis supervisor about which projects I consider interesting to work with for the next couple of months and he suggested a very promising testing framework that is under construction in microsoft research called Pex.
It is an automated white box testing framework that helps identify corner cases of input to your code. It will display these corner cases and let you generate Unit tests with these inputs as parameters. Yes that's right: Parameterized Unit tests. That is pretty cool!
The basic work flow is as follows: write your code(needs to be public methods), right click within the method you wish to generate input for, Pex will try to analyze every statement of your code and ensure that every code path is followed.
When the input is generated you simply select all the generated rows and hit save. This will generate Unit tests in a separate project, just like you would setup any other Unit test project.
Now you can run any of these corner cases as a regression test of your method and be sure that these corner cases will be tested, too.
If you want to extend the tests that Pex generate, you simply extend yet another generated .cs file that contains your Parameterized Unit Tests(PUT).
If you think any of this could be of any help to you or your project, do visit the clever guys running the project at research.microsoft.com/pex/ and check out the documentation.
I will definitely write more on this project in the coming months and discuss the opportunities of this interesting framework with colleagues and fellow students.
No comments:
Post a Comment