Tag | Testing Posts

Recently, Ayende Rahien (Oren Eini) blogged about Planning for Rhino Mocks 4.0. He’s calling for all of us to contribute our ideas on how to improve Rhino Mocks. He set up a forum where we can submit our ideas and vote on them as well. This lead me to review some of my more complex tests involving Rhino Mocks (I’m on version 3.6). Were there mocking difficulties that I could propose a solution to? Let’s find out… A frequent pattern in my tests is verifying that my controllers pull properties from ...
I started to play with Moq a few weeks back under the guise of Project NEric and then… real work got in the way. However I am today revisiting mocking as I am reviewing a potential article for the Flash on, let me think, mocking. The article touches on Mocking vs Stubs which is handy, as “back in the day” my team relied heavily on stubs (clever stubs at that) and I was confused about the differences between stubbing and mocking. I’m still not 100% there but I found the following useful. Brian Guthrie ...
I’m just pulling together next Wednesday MSDN Flash newsletter and came across this gem. The last 12 months of releases from the Patterns and Practices team: Enterprise Library v4.1 is a collection of reusable software components that help developers with common development needs such as logging, validation, data access, and exception handling. They can be used “as is” or extended or modified by developers as needed. Unity Application Block v1.2 is a lightweight extensible dependency injection container ...
Download Sample Code MVVM Playground Have I mentioned lately that I love the MVVM presentation pattern?? If I haven’t please allow me to do so now. It makes unit testing much much easier, the clean separation between logic and presentation makes me feel all warm on the inside, and (Blendability) those designers in the black turtle necks can run off and build an awesome UI in XAML while us devs write our code in peace :) Ahhh, so ok there are some issues that we are going to run into in the MVVM space. ...
Almost every software project comes with a database. Sometimes it will be developed from scratch and in parallel with the actual domain model for a new (aka. 'greenfield') project, sometimes it will be a pre-existent datastore provided by the customer or coming from an already running software that has to be extended (then we can call it a 'brownfield' project). In either case, you will likely end up with a bunch of database scripts that need to be executed as part of your installation process. I ...
Yippee, I will be speaking at the upcoming XP days in Mechelen. This is a first for me, and I'm really excited about this. Pascal Mestdach and myself have submitted a session on Agile Acceptance testing with FitNesse. It just got approved ...
This podcast is an interview with Gary Short in which we discuss the DevExpress eXpressApp Framework™ (XAF) for quickly building WebForm and WinForm applications. Along the way we manage to mention testing frameworks, home-grown source control, rabbits feet, British Rail and Microsoft Access (Apologies in advance to the Access User Group) but most of it is about understanding what XAF is and when you would use it. Show Notes: XAF Posts on the Project Management application being built in XAF eXpress ...
In some scenarios, you may have a database that contains text data in a column which is restricted to a certain set of discrete values. In such a case it is a good idea to use an enumeration for representing these data in your domain. - I occasionally came across this situation when I had to deal with legacy databases with large amounts of pre-existing data. - This post demonstrates an easy and effective way to put this "enum value vs. database string" mapping under test, using the xUnit.net unit ...
In June we ran a free 2,5 hour seminar at Microsoft on the Team System 2010. It went rather well, so it's being set up again, on September 15th. It's being done as a practical demo case, we've "invented" a problem, and uses the 2010 to solve the problem. In the process of doing that, we're going through the Architect parts, the work items, the build system, coding, branching, code reviews with the static code analysis, testing with the new Test Edition ("Camano") and more. We've done it nearly power ...
I've been revisiting a POC I did a while back that involved some custom Windows Service development. It reminded me that it's a little bit of a pain managing the clean and deployment of your Windows Services as part of your MsBuild script and I just wanted to make a few notes on this as a reminder to myself and potentially help others. The below will describe what I do. Cleaning up Typically this is the section that causes some hassle. The aim is to undeploy and delete any previous instances of the ...
In most of the DBs in the server will have more space, when the backup is used to store it in the development environment or testing environment, it might not have much data, but it will occupy more space physically. To reduce the database size, then there is a way to reduce it. Shrink the Transactional Log. There are two ways of shrinking the Transaction Log. One is through Front-End and another is manual script. Front-End: Databases -> DbName. Right click on the DbName, then go to Tasks->Shrink->Files. ...
I use Rhino Mocks pretty much exclusively for mocking and testing. I find that there really isn't anything that I've wanted to do that I haven't been able to figure out how to accomplish with Rhino Mocks. What is everyone else using? I'd like to know so I can take a look. Anyway, as you know, with Expect.Call we can return property values, return values from functions, throw an error, etc. Sometimes just returning a static value isn't going to work, or it's just easier to give it some simple code ...
I have finished a couple of books that I would like to plug here. One is “The Art of Unit Testing” and the other is Regular Expressions Cookbook. I waited for both to drop, and as soon as they did I picked them up. The Art of Unit Testing The Art of Unit Testing (TAoUT) has received many awesome reviews with some folks guessing there may be a *DD book coming out soon by the same author. Well see, and it would be nice to have a compilation of *DD guidance for those that can dig(g) and use a *DD form. ...
In this Submittal-only Issue: Davide Zordan, Michael Washington, Charlie Robbins, Alex Golesh(2), Pencho Popadiyn, and Danijel Stulic From SilverlightCream.com: Silverlight 3 / Expression 3 behaviors for enabling Multi-touch gestures Davide Zordan provides two Behaviors for gestures with a Multi-Touch device. Don't miss Tim Heuer's article he references, and if you're a WPFer, he also has a companion post A WPF custom control for enabling Windows 7 Multi-touch gestures Silverlight 3 Drag and Drop ...
This week I had a need for NUnit based unit testing against a class that depended on a provided SqlConnection. Up to this point I had been able to mock external objects and their behavior based on interfaces, but with a SqlConnection I could not mock. There are some options for mocking the SqlConnection such as TypeMock, but I needed a realistic connection to test against. This also proved as a good method for building the expected DB interface. The solution that worked best for my environment (only ...

This guide provides guidance on the best practices and techniques for the following areas:

  • Finding and Eliminating Bottlenecks
  • Optimizing Performance
  • Scaling a Production BizTalk Server Environment
  • BizTalk Server Performance Testing Methodology
Bear with me on this and read me out… <VentSession> How crazy is this? I received a call from Prometric today letting me know that LANTEC, the last of their testing centers in Baton Rouge, is no longer an option for test locations. I told the guy on the phone that they needed to change something as the nearest testing centers are in Lafayette and New Orleans. Isn’t Baton Rouge the capital of the State of Louisiana? It is CRAZY that this has happened. I have several exams that I am trying to ...
It's been years now that unit testing frameworks and tools have grabbed our attention, made their way into our favorite IDE and sparked yet another wave of seemingly endless "my framework is better than yours" wars. And then there are the principal wars of whether TDD is better than Test After Development. And most excitingly the automated testing tools etc. Oh, and let's not forget mocks! So we have all the tools we need – right? Well, kind of, no. I recently attended a talk by Llewellyn Falco and ...
TestDriven.Net is a Visual Studio add-in to help with testing in general and TDD in particular. It allows the user to run a test or group of tests by right-clicking and selecting 'Run Test(s)' from the context menu...

Read the full article

 

Introduction: In this post, I will explain you how can we write a unit test in c#. It is a basic guideline for those who wants a quick start. Unit testing is an integral part of any software that is developed. It is an advantage which most of us are either not aware of or we are neglecting it. It actually helps a developer to write error free code. To write unit test, we will first install a unit-testing framework. About Unit-Testing Framework: Well, Unit-Testing Frameworks are useful to simplify ...
Using TFS and Team Build to deploy to Development, Integration, QA, Stage, Pre Production, or any other testing servers you have can be quite a bit of a challenge sometimes. I haven't really found a lot of documentation or best practices out there for it either. There are plenty of ways to move the files across each environment. I'm going to try this build definition out for a while and see how well it works. When I queue a new build definition up, I'm going to pass in the following parameters (they ...
In this Issue: Ian T. Lackey(2), Shawn Wildermuth, David Anson, Jesse Liberty(2), Scott Marlowe, Gavin Wignall, Brad Abrams, and Robby Ingebretsen. Shoutouts: John Papa's latest article is available in MSDN Magazine: Binary Encoding and Handling Faults in Silverlight 3 Stefan Olson has his own version of: Bugs fixed (or not) in Silverlight 3 RTW David Kelley has announced an MSDN Webcast: geekSpeak: Composite Application Development (Level 200) András Velvárt gave me this link which is a promo for ...
For one of our new requirement , We have got into a situation in which we need to fire a SMS whenever an insert or update is happened in a database table. I gone through some articles and found out some methodologies to achieve this, 1. Query Notification (have more dependencies and complicated) 2. SQL CLR Triggers (Less dependencies , easy to understand and implement) I decided to implement SQL CLR triggers and got success also in that. Now let me share the things what I have done for implementing ...
Using TFS and Team Build to deploy to Development, Integration, QA, Stage, Pre Production, or any other testing servers you have can be quite a bit of a challenge sometimes. I haven't really found a lot of documentation or best practices out there for it either. There are plenty of ways to move the files across each environment. I'm going to try this build definition out for a while and see how well it works. When I queue a new build definition up, I'm going to pass in the following parameters (they ...
Originally posted here: http://www.thegrubbsian.com... I was listening to a recent Hanselminutes podcast episode in which Scott spoke with Michael Feathers of ObjectMentor on the topic of legacy code. They touched on a number of really effective techniques for approaching a legacy code-base and I wanted to echo some of their thoughts and add a few of my own. First, the definition of legacy code (as was discussed in the show) is really much broader than the face value ...
It’s 6am and I am bored, so I thought I would give you a quick heads up on what’s coming in the next version of SAF (due by the end August). Here’s the Feature list : DSL with Diagram capabilities inside Visual Studio 20008. This is probably been the most exciting one for the release. We have been spending a few months working on a way to create SAF Macros visually via a VS 2008 designer window. This will give you the following advantages : You don’t need to know the Schema for a SAF Macro (which ...
Yesterday, I wrote about Windows CE Events in Windows CE: Synchronization Objects – Events. Today I thought I would write some sample code to demonstrate the behavior differences between event types (manual and auto reset) and the functions for signaling the event (PulseEvent() and SetEvent()). I started by defining some macros to make the code easier to read. The call to CreateEvent() takes some parameters that are simply TRUE or FALSE. When you are writing the code and reviewing the documentation ...
While troubleshooting some recent problems with an application requiring .NET 3.5 SP1, it was determined the installation was not correctly testing for the Service Pack, only .NET 3.5. After a little research on the issue, I found in the .NET Framework forums there is an issue where the .NET Framework Launch Condition does not have the ability to check for Service Pack levels. At this point, it became fairly obvious a Launch Condition was needed. Launch Conditions provide the ability to check registry ...
At Last! Finally, we have released the SharePoint Action Framework (SAF) on CodePlex!! Please take a look at : http://saf.codeplex.com . Now that I can take a minute, I just wanted to spend a bit of time detailing why we have spent the best part of 18 months (with lots of late nights building it!) Here's a FAQ to give you some answers: If you are developing with SharePoint, do you suffer from any of these ? Lots of Defects caused by differences in SharePoint Farms. – eg. “It works on Integration, ...

Here is a good document describing how to configure and maintain a BizTalk 2009 installation. Everything from configuring Windows Server and SQL Server to performing load and throughput testing is described.

So when I first started working with SQL Server 2008 and LINQ, I would pretty much just use the LinqDataSource because it was definitely the easiest to use. It’s pretty good for testing purposes, or really small projects, but if you’re doing anything that is going to grow / is large already, then you’ll probably not want all that logic embedded in your pages. As I became more comfortable with LINQ, I decided to take on the task of switching over to the ObjectDataSource to bind to my ListViews. Here’s ...
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.000... mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans... mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-... ...
Tags: Surface Development of Surface applications is done on the Surface Simulator. Even at Microsoft the Surface team works most of the time in the simulator: I’ve heard they have 1 Surface unit per 8 developers. The simulator works fine and is a great tool for developing the applications: the debugging experience is actually quite nice. But sometimes you have to deploy your application to the actual physical unit to see what it looks like in ‘real life’. I think that is the only way to determine ...
When I recently started looking through a certain project’s tests, I was struck by how difficult it was for me to read and understand. The tests were laid out haphazardly, and the code contained enough logic to make me wonder if it would be easier to analyze the functional code. Tests don’t do anyone good if they require that much analysis. In contrast, one of my favorite open source projects contains tests that allow me to learn the functionality of the system without looking at any functional code. ...
The project I am currently on encompasses a large push to clean-up and standardize the client's Reporting library. Currently, there are around 70 odd reports that were created and/or worked-on by an assortment of consultants and employees over the span of several years. This process was very organic, responding to the needs of the moment without any over-arcing design philosophy or guidance. As a result, there is very little consistency in how these reports are structured, or how the settings are ...

I've only been at the new contract 6 weeks and I've already have them using NUnit, Lightweight Test Automation Framework, and today I got them to set up TeamCity!

Before I started they were not using any automated unit testing suite and no they joined the dark side :)

My Pex has not flexed recently. Peli has dropped a new version of Pex with a few breaking changes and I’m two revs behind him on implementing. One thing that I’ve come to realize is that I can’t manage the churn taking place for the code under test. The last few sprints have introduce large amounts of change in our persistence model and that, well, just screws the pooch when you’re trying to keep things updated. I’m trying to figure out the best way to manage the churn in my testing libraries – and ...
While testing an AJAX enabled web app I sometimes stumbled upon this script error: 'this.get_element().style' is null or not an object. It was a hard nut to crack this one. This was the actual message (in dutch, sorry ): 12.00 Normal 0 21 false false false NL-BE X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:Standaardta... mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; ...
Normal 0 false false false MicrosoftInternetExplorer4 st1\:*{behavior:url(#ieooui) } /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.000... mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} ...
A while back I wrote a couple of posts about Testing maps in BizTalk. They are at the following links: BizTalk 2006 R2 http://geekswithblogs.net/m... BizTalk 2009 http://geekswithblogs.net/m... One possible extension to this might be if you have a map which rather than using the map designer imports a custom XSLT to perform the mapping. (If you are not familiar with this refer to MSDN). So if you have a custom ...
Today the news about Google coming out with its own operating system "Chrome" is all over the Internet and I was wondering can they make an in-road into the OS field which is basically been dominated by Microsoft for decades. And the answer to that is possibly yes, if not as a full fledge OS for desktops and servers but for portable devices. There are 2 things that I hate most about windows OS first it takes forever to boot the OS, since I had SP1 installed on my Vista it takes more than 5 minutes ...
I got some feedback a while ago asking for some advice on how we test flat file schemas and have eventually got around to writing this post. The aim of testing schemas which have been created to represent a flat file (positional or delimited) is to be able to test the schema in isolation to ensure that it can be used to parse and assemble a message correctly. The reason testing the schema in isolation is important is that it allows you to ensure it works before the schema is used within BizTalk where ...
We have run 10 seminars with myself, Mikael Nitell and Jakob Ehn on TFS 2008 during the last two years. These seminars were made from the point of our company's experience with the TFS system. We debated different aspects of it, and showed people how we had chosen to solve the different issues that arose. These seminars took in the range of 4 hours, and we've had around 700 people all in all participating in these seminars, with very favorable feedback. Now in June, June 10th, we, myself and Mikael, ...
Technorati Tags: MVC,ASP.NET,Extension Methods,Html Helper A lot of hype around MVC these days. So, of course, yours truly is working on some project utilizing MVC. While brushing the dust off my raw HTML tag memory and designing the obvious: lists, grids, repeated item displays and the such, I thought "why not use the asp.net controls instead?" For one, most of the ASP.NET data bound controls have a rich site of event post backs to hook up. MVC says: no dice! You can't rely on the event dispatch ...
In this Issue: Thierry Fierens, Shawn Wildermuth, Page Brooks, Faisal, Qixing Zheng, and Chris Klug. Shoutout Pete Brown posted an article about an application AIS did in Silverlight 2 for PETA: Silverlight Application – Animal Testing Breaks Hearts András Velvárt has another part of his UX Thoughts sequence up and definitely worth a read: UX Thoughts – Learning Phase Tools II I know the Skim page at SilverlightCream was a problem. I've got a band-aid on it, and we need to tune the query ... seems ...
The Way I've Come To See BDD Over the last year and a half, I have been moving from TDD to BDD. For those who don't know, this is not a tool or technology switch so much as it is a mental paradigm shift. Luckily, I didn't work in a lot of shops that ever did a lot of unit testing (testing units of code after you write them). Most often, we'd be under time crunches that forced PMs to make the decision to forego unit testing in order to meet a hard deadline that they got from some estimation crystal ...
BDUF was especially interesting when I heard Peter Provost and Billy Hollis speak on this topic during their presentations at the PnP Summit last year. Both made points that I could definitely relate to. You see the (embarrassing) thing about this post is that I didn’t know what BDUF was, and was living it everyday, but waterfall was supposed to be OK? I never heard anyone say BDUF until I hooked up with .NET a few years ago (I wrote my first line in December of 2003), even having done a few tours ...
Microsoft Patterns & Practices group has just released some guidance around Acceptance Test Engineering. This is fortunate timing for me as I’ve been digging into the new testing tools with Team System 2010 in an attempt to incorporate the full testing cycle into my ALM thinking. Look forward to a few posts coming incorporating this work. Technorati Tags: P&P,Acceptance Test,ALM ...
I’m building out a Windows SharePoint Services 3.0 (SharePoint 2007) site for my client. The site uses two different methods of authentication, one for intranet users and one for extranet users. The intranet users will be logging onto their workstations using their corporate domain based username and password. We have one Url in SharePoint for these users, which is set to the out of the box Windows authentication. When the user goes to this Url, IE6 is set to send the credentials to the site, so ...
The Problem: Recently was testing my web-app against a SQL-Server 2008 database and got a time-out expired message from the SQL database. No matter what I did after that it just did not want to drop the transaction and I continually got the time-out. I needed to find and stop the SQL transaction. The solution: Sign onto the SQL-Server with the Enterprise Manager. Execute sp_who2 and look for rows that are blocked on another connection (the BlkBy column will have the spid of the blocking connection ...