Is there any framework for .NET to populate test data? [closed]

僤鯓⒐⒋嵵緔 提交于 2019-12-02 14:14:47
Michael Baldry

Take a look at NBuilder. It lets you build test objects with random data, incrementing values, and anything you can probably think of. All through a nice fluent interface.

Igor Toporet

You might find it relevant. Here is a list of few other frameworks as of today:

Well-known and respected:

Little-known:

Unfamiliar:

Yes there is. I found this when watching session #3 of the Summer of NHibernate series by Stephen Bohlen.

His company, Microdesk, has developed a utility that will allow you to save the state of a database on test fixture construction, set the state of the database at the start of every test, and recover the original state of the database on test fixture deconstruction.

Download the utility here: Microdesk.Utility.UnitTest

For a tutorial on how to use it, watch the Summer of NHibernate session #3 video.

Fluent NHibernate has a feature which gives you everything on your wish-list, except the auto-population part:

Link: http://wiki.fluentnhibernate.org/Persistence_specification_testing

However, given C# with code contracts, it wouldn't be to hard to auto-magically create valid objects yourself using reflection.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!