The TestApi

TestApi is a library of tools to assist with testing software. One of the tools that comes with it are Fault Injection routines. Fault injection is the process of deliberately putting errors in an app to see if they are handled gracefully.

You can use fault injection to test those hard to reproduce situation. You know the kind. They are the exceptions that only happen once your app has shipped to production.

The two key pieces to TestApi are the "TestApiCore.dll" file, and the FaultInjectionEngine folder. One last note is that fault injection is different than mutation testing. In mutation testing you put an error in you app to see if your unit tests pick it up.

Good luck with your testing. I am currently in the design phase of the software development life cycle. So I don't have a lot of hands on testing just yet.

Entity Framework Tricks

The Entity Framework allows the developer to create a model against which the programmers do queries. The Entity Framework then translates these model queries to SQL against the actual data store.

In the end, the Entity Framework is generating your typical database commands such as insert, update, and delete. But hey. You want to lock down such real database objects to ensure they remain consistent.

The tried and true method to lock down your database is to require all access to go through stored procedures and views. The good news is that you can train the Entity Framework to do just that.

The Entity Framework does not need to go against base tables. It can run against views. In fact, you could even create some views that are identical to the base tables. Good stuff.