Actually, what you're describing is more along the lines of an integration
test than a unit test. Part of what I did when I upgraded the core to the
2.0 architecture was to write unit tests that have as little external
dependencies as possible. For example, the SqlProvider stuff goes against a
mock database, not an actual Sql Server instance.
I think if you're looking to add tests for FlexWiki.Web, there are two ways
to go:
1) Switch FlexWiki.Web to an MVC model that lets use actually lets us
do unit tests.
2) Do integration testing.
(Actually, these aren't either/or: doing both would be the best option.)
#1 is a pretty big shift, although it could be done incrementally. #2 is
actually something we used to do - that's what BuildVerificationTests are. I
switched them off a while back, though, because our crappy homegrown
integration testing framework stopped working and I never got a chance to
figure out why. It should die anyway - there are better alternatives today.
One I can think of off the top of my head is WatiN.
The build script already has a fair amount of support for deploying a build
so that it can be property integration tested. While I'd love to see us
refactor to MVC, I think going back to integration testing is probably the
biggest bang for the buck at this stage.
Just my two cents.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John
Davidson
Sent: Friday, August 24, 2007 2:14 PM
To: FlexWiki Users Mailing List
Subject: [Flexwiki-users] Unit Tests flexwiki.config
Hi all,
I have started to build a series of Unit Tests to validate
FlexWikiWebApplication and FlexWikiWebApplicationConfiguration and the
contents of flexwiki.config (at least as used for the local build).
I can make this work by adding a reference in FlexWiki.UnitTests to
FlexWiki.Web and by manually copying the file flexwiki.config to the
FlexWiki.UnitTests\bin\Debug directory.
I note that FlexWiki.UnitTests has a file app.config that used to be moved
to the execution directory as a postbuild.cmd, but that is no longer done.
Mainly because the contents of app.config no longer reflect a valid
configuration file for either web.config nor flexwiki.config as used today.
I could change the postbuild.cmd to copy the file flexwiki.config.template
to the UnitTest execution directory and rename it to flexwiki.config.
Doing this would let me build tests that validate the contents of the
template file as being a minimum acceptable configuration file.
The question is - Is this worth pursuing?
John Davidson
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Flexwiki-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flexwiki-users