Tag | Testing Posts

Always try to use string.Compare() method for testing string equality and inequality use string.CompareOrdinal() method for case sensitive string comparisons when returning string from a method call insure that you never return “null” return string.Empty instead Always initialize strings to string.Empty when instantiating StringBuilder use the overloaded constructor to specify the initial capacity Prefer string.format when concatenating value types into strings 1: int number = 4545; 2: string x = ...
Chippewa Valley .Net User Group Tuesday, Mar 10, 2009 at 05:00 PM Location: GreenMill Restaurant Directions Generating code for large-scale architectures is a complex topic. This talk will discuss ways to integrate the ADO.NET Entity Framework into your architecture’s code generation process and have it perform the “heavy lifting” in your Data Access Layer. We will cover an introduction to the framework itself and discuss some of the potential pitfalls (and how to avoid them) when using it in large-scale ...
I need sample / test data all the time. When ever I build an application for a client it is useful for testing and demonstrating, when I teach a course it's always useful to have a demo database on hand (I'm a bit bored of Northwind and Pubs). Over the years I've collected all sorts of useful sample data, like real surnames, first names and place names. All I've lacked is something to randomly pick from those lists to create a dataset ready to import (in the format I need at the time). During some ...
Roy Osherove written an excellent ‘Restaurant’ analogy to explain the difference between unit tests and integration tests. This type of analogy really becomes lot helpful to understand the concepts that are similar to each other, but has significant difference as well as. In the world of testing, Smoke Testing, Sanity Testing and Regression Testing are very similar to each other: to ensure the quality running the test cases of an existing application with respect to a new feature being added/dropped/modified. ...
Since PDC I’ve been working on and off on an “Oslo” based solution for deploying a BizTalk application; unfortunately I couldn’t get a good chunk of time to play with this, so it’s been dragging a bit, but I’m getting close, so here are some details - I’m a big advocate of automated builds; it’s a topic that probably deserves a post of its own, so I won’t get started on this here, but the idea is that one must have a way to be confident that, when its time to [re-]deploy the app, it will get deployed ...
With my new job, I’ve not been able to take advantage of a lot of Agile/XP practices. In a company of four, where each is effectively working on a different project, collaboration is minimal. Also, for the projects that I am working on, the customer is very adamant about getting a detailed proposal up front, including a list of all of the screens and how they will operate. I’ve managed to get by without too much detail, but it is still more than I am generally comfortable with. TDD and Continuous ...
I have to admit that when I heard there was a keynote this morning, I was somewhat taken about. The very notion seems to be antithetical to the notion of Open Spaces. On the other hand, getting the chance to hear Ward Cunningham speak was well worth the "architectural purity" of the organizational principles. Intro (Alan Stevens) referred to Channel 9 video with Ward Cunningham being interviewed by Scoble WC: "the only thing I'm sure of is that [the future] will involve cloud computing" AboutUs.org ...
In this issue: Matt Watson, Bryant Likes, Tim Heuer, Radenko Zec, Matthias Shapiro(2), Terence Tsang, Justing Angel, and Lee. Shoutouts: Shawn Wildermuth made the announcement that he will be Speaking at DevTeach in June ... way to go, Shawn ... there were lots of contenders for those speaking slots! Joel Neubeck will be speaking in a breakout session at MIX09: Mix09 - Creating Web Applications on the Internet Explorer 8 Platform ... should be a good one, Joel! The SilverlightShow guys sent me this ...
I wanted to post about one of the best tools I’ve found for getting Kerberos properly configured and in the process getting some great HOWTO information on Kerberos, how it works, etc. When working with SharePoint, and the plan is to have your site run under Kerberos, I recommend using this tool before actually provisioning the Web App. You can do it later, but you’d have to “stop” the WSS provisioned Web App before using this tool. Why? Because the IIS site you use for testing must use the DNS name ...
Software Designers often have to face a common decision factor, that whether they need to design automated test (unit test, integration test etc) infrastructure for data access layer code, specially when the data access layer codes are written using code generator tool. Basically the straight forward answer as ‘Yes’ or ‘No’ in this regard depends of several situations/ factors such the size and budget of the project etc. Here are my 5 top reasons to write automated test (unit test, integration test ...
In this issue: Maurice de Beijer, Corey Schuman, Ben Waggoner, and Bryant Likes. Shoutouts: Bill Reiss announced Help us pick a logo for new Silverlight game site SilverArcade.com ... and there's some nice-looking logos out there! John Stockton joins the exalted ranks of those that can say I’m Speaking at Mix09!... congrats John! From SilverlightCream.com: SilverUnit - Unit testing framework for Silverlight Maurice de Beijer reports on Roy Osherove's "SilverUnit" UnitTesting framework for Silverlight ...
Both Minneapolis and Saint Louis will be hosting a Build Your Skills event. This full day event will introduces developers to a range of the best practices that developers can use to create better applications in a shorter amount of time. Presented by independent developers with a proven track record of having “been there, done that”, each session will provide insight into what it takes to write applications that run faster, are easier to maintain, and are of the highest possible quality. During ...
Update: Fixed a typo and a calculation error. Josh Holmes has a great post on Return on Investment (ROI). And by “great”, I mean great even by Josh’s usual standards. He worked hard on this one. I was privileged to review three drafts before he published it; and by draft two, I was saying, “Josh, this one’s a winner. I’m going to reference this one a lot.” So stop reading me, and go read what Josh has to say. I’ll be waiting here when you get back. OK, you’ve read it. Pretty scary, huh? But the scariest ...
Today I released the first Beta of the next version of Axiom. Axiom is a C# 3D rendering engine. This year marks the 6th year of it’s existence. I have been maintaining it for the past 3 years. I am particularly excited about this release because for the first time we are shipping some brand new features. XNA Renderer The largest feature that was added for 0.7.5.0 was the XNA Renderer. It has been in development for the past year. A large hurdle for the XNA renderer was the absence of any fixed function ...
During testing ClickOnce-Deployment i wondered that in my start-menu an "application reference" is created which has no link-reference to the application which is installed at the client. Only references to the server which offers the applicaton are listed. It seems there is some magic in the ClickOnce-client-engine of .NET-FW 2.0 After searching in my user-profile i found the application under ..\Local Settings\Apps\2.0\.. in a randomly named folder. BTW: uninstalling is done by: rundll32.exe dfshim.dll,ShArpMaintain ...
Microsoft Visual Studio Team System/Test Edition provides an excellent tool to perform web site load testing. Using this load testing tool, you can monitor and measure the site performance along with system status with respect to a given load/stress. Fortunately VSTS provides a support for wide range of performance counters, from web page request per second to condition of physical disk, memories. Unfortunately, they are too huge that, initially testers/designers get overwhelmed with all of those, ...
Microsoft Visual Studio Team System/Test Edition provides an excellent tool to perform web site load testing. Using this load testing tool, you can monitor and measure the site performance along with system status with respect to a given load/stress. Fortunately VSTS provides a support for wide range of performance counters, from web page request per second to condition of physical disk, memories. Unfortunately, they are too huge that, initially testers/designers get overwhelmed with all of those, ...
Okay, recap. We got the shell of the application up and running. We’ve made two foundational modules to provide functionality to the business modules. We’ve created a couple of business modules to allow people to browse the nominees and to allow them to vote. We’ve refactored more times than I care to count. We have also created possibly the ugliest application I’ve ever been associated with. Left on the plate? We’ve got the last major business module to write (that being the module that scores the ...
A common problem I have with users of Axiom is that they will mismatch the assemblies need to get the engine up and running. Axiom uses a plugin system that allows for interchanging the platform in use (Win32, SDL, etc ) and which graphics system to use ( XNA, OpenGL, DirectX ). Unfortunately, there isn’t as loose coupling as I’d like, in particular the OpenGL rendering system has to be recompiled to use S.W.F forms or SDL forms. SLD is the particularly nasty one because it has to be paired with ...
So as I mentioned in my last post I have this large-ish .Net application which has a pretty low quality level. The first task was to convince the powers that be that there is sufficient benefit to be had to justify the cost of dedicating 1-2 developers to focusing on quality improvements. Now we need a plan for how to approach making quality improvements. Ultimately I think we are going to need to do some major work refactoring large parts of the application (hopefully we can break these down to ...
In a response to local company email about IE 8 RC, I took some time to write an email to the internal mailing lists of Raya about testing websites with different browser versions. I found it good to share with the blog readers here, and, I know the company policy in Raya emphasizes sharing knowledge and efforts with the community. Here is the email I sent: For developer and QA testing I highly recommend using IE Tester http://www.my-debugbar.com/... It enables testing the website against ...
Do you need training on SQL Server, System center, Citrix Edgesite, Exchange, Server 2008 or ITIL Practitioner? This is the deal you have been waiting for...as budgets are being cut, let us help you with your education. These classes listed below are confirmed to run, but still have open seats. Let's make a deal. Email me to begin the process! Citrix: Feb 16-20 CSA-20101I Implementing Citrix XenApp 5.0 for Windows Server 2008 http://www.nhmn.com/Courses... Feb 26-27 1800AI ...

Do you need Citrix EdgeSite 4.5 training?  We have a class running on Feb 23-27 that is confirmed to run and has open seats.  Let's make a deal.  Email me for information. 

Details:

1800AI Citrix EdgeSight 4.5: Administration, Performance Monitoring and Load Testing
http://www.nhmn.com/Courses/CrsDetail.aspx?C=CTCTX-1800AI

 

BizTalk HotRod Magazine Issue 5 is out there. In this issue, you can see below topics. Application Servers: BizTalk vs. Dublin Unit Testing in BizTalk Server 2009 Better Together – The Solution for Tough Economic Times Monitoring a WCF Service Using BAM: A Walkthrough Operations Management for BizTalk Governing the SOA Runtime with AmberPoint BizTalk monitoring and exception handling from any desktop Add Governance to BizTalk with SOA Software Previous Issues you can get it from below links. Issue ...
Okay, so the next stage, I’m going to need some data in order to do stuff. I’m going to create three DLLs, all class libraries. They are: OscarsNight.Interfaces – The interfaces for the services and the business objects. OscarsNight – The actual implementation DLL, with some data access stuff. I think I’ll use Entity Framework for that. OscarsNight.Tests – A testing DLL that tests the implementation. Business Objects For the business objects, I’m going to create two sub-namespaces, one each for Game ...
In the UK I am the technical editor for the MSDN Flash. This weeks edition was a special focused on free software. I gathered together some of the best downloads based on recommendations from friends, colleagues and customers (which in case you were wondering is an overlapping group of individuals) plus a few of my personal favourites. I have tried to get something for everyone. From fairly generic utilities such as Free Download Manager and Unlocker, specialist tools such as SketchPath for XPath ...
A build set is a set of builds running on the same solution or set of solutions, catering for different aspects of the Continuous Integration process. Why a set of builds ? Because one size doesn't fit all. Something you want to run quickly and others you want to cover a lot of stuff. This can be divided into a set of aspects. The aspects can be divided into three major parts: Developer aspect. A continuous build running normally at each check in to ensure that the code the developer checks in is ...
Okay, hopefully this is going to be a short one. Next thing that has to get done is to a little division of work. Looking over the requirements, there are only a couple of things that I’d like to, but first a word on module types. Module Types There are two types of modules that are defined in the previous incarnations of the framework (SCSF and WCSF). They are foundational and business modules. They don’t exist as fine-grained separations in Prism, but I’ve found using them to be useful concepts, ...
Recently I blogged that the Resharper install corrupted TestDriven.Net. I followed up to say that certainly wasn't the case. In fact, there was nothing wrong with TestDriven.Net. The problem was between the keyboard and chair. I kept getting an error about not being able to load one of my base test classes. At compile time everything was fine. I would get the error only when trying to run the test in TestDriven.Net. R# could run the tests with no problem. This led me to believe it was a problem with ...
[Source: http://geekswithblogs.net/E... Our ESB Guidance project is nearing code-completion and we're running System Test on an infrastructure which is suitable for production use. Designed for performance, reliability and scalability, we use servers in a combination of NLB farms, Windows clusters and SQL clusters. Shown below is a modified version of the layout, focusing on the BizTalk landscape: A few of the design decisions are worth looking at: Coordination Services run a host for Scheduled ...
Frustrated with square looking web pages, many web designers look to Flash. In addition to freedom of graphic expression, Flash brings interaction and transition effects which are difficult or impossible to duplicate. Why then shouldn't all websites be Flash laden? Several reasons pop to mind: Loading speed: Way too often, flash movies load complex graphics, forcing the viewer to stare at some progress bar. For people who want to quickly access information this is a huge turn off. A "skip intro" ...
The following is a simple checklist you can use when building web applications. Much of this still applies to other technologies and can easily be extended. I try not to get too specific on technology or methodology, but it is definitely leaning toward ASP.NET. If you can think of something I am missing or disagree, please leave a comment. Detailed information follows the checklist. How much of the checklist you follow will depend on the project. If its just a hobby site, you may skip items like ...
I have been writing a lot of unit tests over the past month using the Microsoft Test (MSTest) unit testing framework that is now part of Visual Studio 2008 Professional Edition (and higher SKUs). Currently I have about 223 unit tests covering 39 classes (about 18K lines of code, 325 methods and 176 properties) with a code coverage percent of 97%. The classes that I’m testing previously had NUnit tests (although not as many as I currently have) and used NCover and NCover Explorer for my code coverage ...
Continuing The Project That Time Forgot, a UML case study in comic strip form... (Click pictures for larger images.) After a long hiatus due to weather, illness, work, conferences, and more stuff than I can explain, the Lounge is back. This Episode gets the ball rolling for Act II, so there’s not much new UML content here yet. But I can give you a few diagrams of the team’s review process. The process starts with some preliminaries, then splits into three threads of operations, each with a separate ...
In the recent trend of software development and information technology, Agile has been a Buzz word among the developer community. There are three types of guys, while a new hype gets introduced. First, who really ignores it, as it is being hype, second, who really get excited about it, but really not very aware to utilize the concept properly, and the third, who really don’t care about whether it is hype or not, but cares to utilize and adopt it properly. It’s very hopeful that the third type of ...
I'm currently working in a BizTalk project where we are using WCF adapters with SAP bindings to communicate with SAP. We "randomly" finds that our receive locations loose the connection to SAP. In BizTalk everything looks fine, the receive location is up and running, but when we look in SAP the connection is down. A restart of the host gets the connection up and running again, but that's certainly not a preferred solution. After some investigation we found that an error occurs in one of the inbound ...
I enjoyed this article this morning. I observe and play the chicken game constantly. I always called it the "Is it done yet game". As the recession worsens we are afraid to say "that enhancement to the web site will say 2 weeks to code and a two weeks to test/fix". Instead we are told do it all in 40 hours knowing there is no stinkin way that is gonna happen. If you tell the project manager is going to take longer because of testing and integration you are told. "That is not part of the time estimate.' ...
The Enterprise Library Validation Application Block (VAB) is a great library for putting your validation in your business layer where it belongs rather than in the UI. It allows us to apply attributes to the properties of our business objects like this: 1: public class Person 2: { 3: [StringLengthValidator(1, 20, MessageTemplate="First Name must be between 1-20 characters.")] 4: public string FirstName { get; set; } 5: 6: [StringLengthValidator(1, 20, MessageTemplate="Last Name must be between 1-20 ...
So day two brought more items of interest. Unit Testing still problematic Apparently, ReSharper installs with version 2.2.8 of NUnit. I am using 2.4.8 which includes syntax helpers. A bunch of my tests were failing with multiple TypeLoadExceptions. To resolve the issue, I ran the tests in debug mode and took a look at where the nunit.framework library was being loaded from. I found that it was being loaded from C:\Program Files\JetBrains\ReSharper\v... Once I determined that I was dealing with ...
I finally installed ReSharper yesterday to try it out. I've been dragging my heals because I didn't want to have to learn a bunch of new commands and pay for that right (I'm cheap, I know). Here are a few things I noticed immediately. Keep in mind that these are first impressions, and they are sure to change over the next couple of weeks. [Update] I turns out that ReSharper is not the culprit here. See this post for more details. TestDriven.Net broken after ReSharper install. Any time I attempt to ...
Been working Selenium for the past several weeks and it's not bad as a Web testing tool. It does have some limitations (some imposed by the language in which you choose to work), but you can either ignore these in most cases for find a way around them (I wrote, for example, a .Net exe which I call from the Java code to do some Win API stuff). Selenium doesn't out of the box encourage an OO design. Everything is handled via the Selenium object using xpath expressions indicating where to do whatever ...
Last Thursday I had the pleasure of going down to a local theatre to watch through the MSDN event for Azure, debugging, and mobility. The event itself was refreshing, and I always enjoy hearing Zain speak. We have similar passions, and also similar personalities. The event started off with a brief look at Azure, which is Microsoft’s very beta cloud computing platform. The technology itself seems straightforward and easy to use, although Zain warned about a tedious process of getting the tokens necessary ...
Service Locator: Integrating Unity and Mock Objects Testing in your Application Download Sample Code Wanted to cover an issue I ran into in a couple of projects when using Unity for resolving my interface implementations and Mock Objects for testing. First, I’m assuming you have some idea of what Unity and Mock Objects are but for those who may be a bit fuzzy I’ll briefly explain: Unity is a Dependency Injection and Inversion of Control Container, it’s very powerful and is capable of much more than ...
Servers are the backbone of enterprise computing today, most websites for example run on either Apache or IIS and will be running on a server of some description. Perhaps because of servers ubiquity it is easy to become complacent about them especially as they are rarely seen but understanding what a server can offer you and it's limitations will definitely help with software development. Servers on the whole are built more of the practicality side than for the esthetics, there is no need to make ...
Yesterday I have done some changes on a web app, and today when it was send to testing server it was observed that the processor is working on high scale. As it's very clear the fact that almost always the problem of memory leaks fall in memory increasement. But it wasn't the case, only the processor was working intensively. I realized my gap suddenly :-), it was all about the fact that I put on every request end to run the GC. This is why the .NET CLR Memory\% Time in GC was showing me these oddities. ...
Just testing out SlideShare for making ppts more discoverable. This is the deck I did for the NxtGenUG Southampton. You can also get the links from http://blogs.msdn.com/ukdev... What do you think? A useful way for us to share decks as well as on MSDN? SQL Server 2008 Overview View SlideShare presentation or Upload your own. (tags: sql) ...
I came across this the other day. I recently converted a .NET 1.1 project to .NET 2.0 using VS 2008 and during development testing a collegue had complained that he had been getting errors updating columns in a DataSet. The error was that the column was ReadOnly, so therefore could not update it. I eventually tracked it down to the data coming from SQL Server 2000 database, some of the fields where not directly coming from columns in the database. Some where results from functions like IsNull and ...
So, over the holidays I migrated the ASP.NET 1.1 web app to ASP.NET 3.5. I had initially wanted to use the migration tools provided by Microsoft but I also wanted to remove some junk controls that were already part of the application and wanted to spend some time refactoring some logic so I decide to create a new application and port code over one page at a time and clean/re factor as I went. During this re-write I added some Ajax calls and also added UpdatePanels hoping to make the user experience ...
When writing unit tests that cover methods that can throw known exceptions, you generally want to make sure that your tests actually test the conditions that can cause the exception and that you do, in fact, throw the correct exception. Most unit test frameworks, including MSTest and NUnit, use an ExpectedExceptionAttribute to decorate the test method. There are actually several problems with using ExpectedExceptions that make it more difficult to write good unit tests. The first problem is the fact ...
To ease the transition from TDD to BDD, I have built my own little base class and stolen Scott Bellware’s extensions from SpecUnit.net to make my own BDD style specification framework. It keeps things simple and means very little transition pain from the NUnit testing we were doing. The base class is called SpecificationBase. It simply ties into the NUnit test methods. 1: using NUnit.Framework; 2: 3: namespace Application.Specifications.... 4: { 5: [TestFixture] 6: public abstract class SpecificationBase ...