Using AssemblyFixtureAttribute with Ivonna 

Thursday, August 19, 2010 8:18:16 AM

Typically, you want to run some initialization code for all your tests. Something similar to your Application_Start() method, e.g., building up NHibernate's SessionFactory, AutoMapper mappings etc. While most of it is still done in the Application_Start() method, you might want to do things differently. For example, you might need your configuration before the first Web request, or you might want to use a different database for automated testing.

In MbUnit, you can add a class and decorate it with the AssemblyFixtureAttribute, and the FixtureSetup decorated method will be run once before all tests. Remember, however, that if you want to use it with Ivonna tests, you should decorate the class with RunOnWebAttribute, just like a regular test class.

Copyright 2008 by me
8 + 2 =  

Site Map | Printable View | © 2008 - 2012 Your Company Name

Powered by mojoPortal | HTML 5 | CSS | Design by styleshout