NUnit Testing and Generating User Stories

NUnit Testing and Generating User Stories and ASP.NET MVC Applications

NUnit is a unit-testing framework for .Net languages. There are certain difficulties associated with Test Driven Development of ASP.NET webform applications. In order to do test, you have to pull your code out of the webpage portion of the application and run it into code outside the normal mode of application operation. This is because we're limited in our abilities to emulate what happens inside a web server. This isn't all bad because it forces the developer to structure application logic in a more tiered approach. One of the main goals of the ASP.NET MVC framework is to allow Test Driven Development in an easier manner.

One way to start an application is to begin with User Stories from your customers or clients. User stories should be interesting to the customer and have little to do with any technology driven discussion. For example if you were working on a blog application, you might have the following User Stories:

  • A user should be able to create a new blog entry
  • People should be able to add comments to a blog entry
  • People should be able to view blog entries
  • People should be able to view blog comments

To start the application, choose a story and start building a framework for the application. (As a side note, in Extreme Programming don't spend too much time on documenting requirements because things change.) Typically, Unit Tests are comprised of 3 stages: 1) Setup 2) Execution and 3) Verification.


© LimberTech 2016