Skip to content

{ Author Archives }

Fluent Configurator – thoughts on getting a design

In a previous post series I wrote about Configuration DSLs – I’m now just looking at this from another angle of going back to some reading about the microsoft mechanism itself. A quick note about the previous approach. The configuration is centralised into one Configuration object and then the application has this available. This is [...]

Fluent Controller MvcContrib – Part II – Coding the Controller Actions and Redirects

In the last entry, we created designed our controller through a test: [Test] public void SuccessfulIndex() { GivenController.As<UserController>() .ShouldRenderItself(RestfulAction.Index) .WhenCalling(x => x.Index()); } Now, we need to code this: A Fluent Controlller in action In fact, to make test run above, you need to do nothing else than inherit from the AbstractRestfulFluentController. using MvcContrib.FluentController; public [...]

Fluent Controller MvcContrib – Part I – Designing Controller Actions and Redirects

In an earlier post/03/test-automation-pyramid-asp-net-mvc/ I said that I unit test my controllers. What I didn’t say was that I (with most of the work done by my colleague Mark and field tested by Gurpreet) had write code to make this possible. To unit test our controllers we put a layer of code that was an [...]

test-automation-pyramid-asp-net-mvc

Test Automation Pyramid in ASP.NET MVC This is a reposting of my comments from Mike Cohn’s Test Automation Pyramid I often use Mike’s Test Automation Pyramid to explain to clients’ testers and developers how to structure a test strategy. It has proved the most effective rubric (say compared with the Brian Marick’s Quadrant’s model:http://www.exampler.com/old-blog/2003/08/21/ – [...]

validation-specification-testing

Validation specification testing for c# domain entities I have just been revisiting fluent configuration in the context of writing a fluent tester for validation of my domain entities. In that post, I wrote my test assertions as: ValidMO.ImageBanner.ShouldNotBeNull(); ValidMO.ImageBanner.IsValid().ShouldBeTrue(); new ImageBanner().SetupWithDefaultValuesFrom(ValidMO.ImageBanner).IsValid().ShouldBeTrue(); new ImageBanner { Name = "" }.SetupWithDefaultValuesFrom(ValidMO.ImageBanner).IsValid().ShouldBeFalse(); This is okay and I have had [...]

MsBuild execution of SoapUI testrunner

I have just been writing an msbuild runner to wrap testrunner for soapUI. Here it is. There are a couple of techniques to note: stacking the args for the commandline in an ItemGroup (see thanks below) don’t forget to Html Escape quots when invoking command line ie &quot I also dependency check for each And [...]

Tagged , ,

One deployment for all environments

Deploy the package This set of instructions should be reasonably straightforward. Always have the same deployment technique throughout all environments. In this case, I am explaining a strategy that which uses MSBuild to trigger installations and upgrades. This simple tenet that can be hard to follow. Often we also need manual intervention, or simply need [...]

Tagged

Understanding the packaging

Build the package So what we’ll do is actually build a package by using the command msbuild /t:PackageBeta Below is the output that I have shorted so that you can see major targets that create the package as a zip file in the location: CodeToDeploy\Releases\Sample-Beta-0.1.0.0.zip Version Clean Publish Zip C:\src\deployment>msbuild /t:PackageBeta Microsoft ® Build Engine [...]

Tagged

Commandline msbuild in action

Commandline msbuild So you’ve checked out the code. Now commandline it to the root folder of the project. Run msbuild.exe. Did it work? Probably not. That is because you don’t have msbuild on your path environment variable. There’s a couple of ways. When you installed Visual Studio, on the Start Menu it provides you with [...]

Tagged

MSBuild deployment sample for web applications

Check out the code sample Download the Deployment Code Sample from github and select to download the zip archive of the source Overview of the code VERSION.xml build.bat build.proj lib/ MSBuildCommunityTasks/ extensionpack/ migratordotnet/ sdc/ teambuild/ scripts/ build.tasks db/ create.sql domainuser-for-db.sql drop.sql user-for-db.sql db-setup.tasks deploy.proj directorybrowsing.xml install.tasks migrations.tasks package.tasks version.tasks src/ Infrastructure/ Database/ Migrations/ Migr_001_CreateBanner_Table.cs Sql/ [...]

Tagged , ,