Testing
There are 4 entries for the tag
Testing
download the VS2008 solution here
Introduction
In a previous post I presented a class that enables the programmatic control of Visual Studio 2008 development server, WebDev.WebServer.exe. This use case for this functionality as presented here is in the interest of testing web applications and endpoints.
Refactored
While the previous implementation is capable in the context of interactive test runners, there were a few resource management issues affecting the usability in more autonomous scenarios such as continuous integration.
Amongst these were the use of static port assignment and the lack of a means to shut down an instance, specifically the ability to start and stop an instance...
UPDATE: This post is valid as reference information, but an improved version of the code presented can be found here.
While I generally use CassiniDev for smoke testing, sometimes a quick and simple way to run some tests against a site using the built in server comes in handy.
Spinning up an instance of WebDev.WebServer.exe is fairly simple.
The executable can be found at C:\Program Files\Common Files\Microsoft Shared\DevServer\9.0\WebDev.WebServer.exe (Program Files (x86) for x64 Windows).
If you invoke the .exe with no arguments you will see the usage document listed below.
Listing 1: WebDev.WebServer Usage
---------------------------
ASP.NET Development Server
---------------------------
ASP.NET Development Server Usage:
WebDev.WebServer /port:<port number> /path:<physical path> [/vpath:<virtual path>]
port number:
[Optional] An...
These classes build a non-denominational fixture that will Drop-Create-Drop a database in MS SqlServer. Following are sample implementations using NUnit and Fluent NHibernate.
To use the fixture, just supply a connection string that points to the database you want to create, override TestFixtureSetup and add some DDL script to the Scripts StringCollection.
NOTE: the fixture takes care of dropping and creating and declaring USING so to prepare a standard DB create script:
remove drop/create statements.
remove all USING statements.
The latest source and tests are at http://spikes.codeplex.com/SourceControl/changeset/view/41478
In use with NUnit
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using DeadSimpleDTO;
using...
I am always a bit annoyed with myself and others when nunit is employed to perform simple code exercise.
I find this perfect for quickies and one-offs as well as for exercising code in examples. Just drop the file in and be done with it.
µUnit (uUnit.cs)
// <copyright file="uUnit.cs" company="Sky Sanders">
//
// This source is a Public Domain Dedication.
//
// http://salientqc.codeplex.com
//
// Attribution is appreciated.
//
// </copyright>
using System;
namespace Salient.QualityControl
{
/// <summary>
/// uUnit
/// A micro test runner.
///
/// For those times...