Tag | Unit Testing Posts

A couple of notes about my environment that I didn’t state before. The laptop I’m use is a typical laptop 4Gb of memory standard dual-core, with 64-bit Vista Ultimate as the OS. There don’t appear to be any limitations Pex in on 64-bit, but there are a few messages you’ll see on the dashboard that state that Pex Explorations are going through some kind of “(x86) cold-start”. The first time saw this I thought that I might need to spin up a test project on a 32-bit VM, but it works fine on a 64-bit ...
When unit testing you sometimes need to test that values are being set to the correct literal/constant value - and this value is often stored in a resources file. However, for some reason the VS2008 'Create Private Accessor' feature did not work for me for resources (maybe be cause they're all static properties and the generated _Accessor classes need to be instantiated). So to make these resource available within the unit test project I simply made the Resources class public (by default it's internal). ...
You read it correctly...TypeMock is giving out free licenses... well not to everyone, but hey... you can try. I'm posting this in hopes I get some licenses that I can hand out to readers... and that would be all of you :) I'll let you know how it goes :) Unit Testing ASP.NET? ASP.NET unit testing has never been this easy. Typemock is launching a new product for ASP.NET developers – the ASP.NET Bundle - and for the launch will be giving out FREE licenses to bloggers and their readers. The ASP.NET ...
Typemock guys, the guys behind the only mocking framework that can apply mocking in complex environments like Microsoft SharePoint, are releasing a new Product,, ASP.NET Bundle. Here is what they’re saying about it: Typemock is launching a new product for ASP.NET developers – the ASP.NET Bundle - and for the launch will be giving out FREE licenses to bloggers and their readers. The ASP.NET Bundle is the ultimate ASP.NET unit testing solution, and offers both Typemock Isolator, a unit test tool and ...
6 words: Scott Guthrie May 26 Phoenix Free Do I need to say anything else?? Oh ok, here's the rest of the info: ASP.NET MVC Presented By Scott Guthrie (ScottGu) We’ll walkthrough building an application from scratch using the recent ASP.NET MVC 1.0 release. You’ll learn what ASP.NET MVC is, the design decisions behind it, and how to build a real application with it. We’ll cover topics ranging from the basics of application creation through to concepts like unit testing and dependency injection. Silverlight ...
A couple of weeks ago I presented WPF databinding at TCCC6. It was the end of a very hectic couple of weeks. I do not often post personal stuff to this blog, but in this the story is just too crazy. It all started during my family’s annual trip to Mexico. My nephew Drew has Spinal Muscular Atrophy, is wheelchair-bound, and the slightest illness poses a serious threat to him. I stayed with my family in Mexico for one week, then I returned home. My family was scheduled to stay for an additional week. ...
This year Codestock is selecting their sessions by attendee votes. As people register for Codestock, they are are asked to select the sessions that they would most like to see. While I think this is a way cool and awesome method for selection, it is driving me crazy wondering what the results will be!! Here are the sessions that I have submitted. If you would like to see these at Codestock, register online and vote for me!! Speaker Name Kirstin Juhl Session Name WPF Databinding ++ Technology WPF ...
Recently I was on a project with no Unit Tests, no Continuous Integration Server, not even a Build. I was asked to deploy the application to a server so that the client could begin using it. (No, we had had no User Acceptance testing either formal or informal, but that's neither here nor there...) I tweeted what I thought was a rhetorical question: "I am deploying an application by pulling the source code, compiling it on my laptop, and copying the DLLs to the server. What's wrong with this picture?" ...
[Source: http://geekswithblogs.net/E... DataContract classes in WCF can be declared as implementing IExtensibleDataObject to provide in-built support for schema versioning. Any data contracts created through svcutil or Add Service Reference implement the interface, and it's good practice to implement it for any custom DataContract classes you write. On deserializing, elements which are not declared in the data contract are extracted by the DataContractSerializer and added to the ExtensionDataObject ...
The Current state of Unit Testing in the software industry. 10 years ago, when the web boom started and applications were built with classic asp and ado, Unit Testing wasn't much on developers minds. But, in 2009, I'm amazed by the lack of unit testing in most environments I've encountered... In fact, most environments (not all, but most) I've seen don't even have a dedicated QA team, or even testers!!! There are no excuses. Visual Studio (since 2005) have right-click generation of unit test projects ...
We’ve all heard the mantra – Unit Testing is good for the soul. We hear about the goodness of things like JUnit, NUnit, and TDD from other people. But you’re not convinced. After all, it takes more time to write unit test code – and you’d rather get on with the next feature. Besides, whether it’s true or not, you certainly feel like your progress is measured by how many features you crank out. In my own journey, I found I went through three distinct stages to testing heaven. Look at my “diary” for ...
In this issue: Karim Hernandez, Gavin Wignall, David Anson, Corey Schuman, Terence Tsang, Shawn Wildermuth, John Papa, Nigel Sampson, Bryant Likes, Aurturo Toledo, and Alex Knight. Shoutout: Mike Ormond reports that Microsoft Live Labs has Seadragon Ajax... so for both of you that read this and are not using Silverlight, there ya go :) From SilverlightCream.com: radiobuttons in a datatemplate in silverlight Karim Hernandez of IdentityMine sent me this link, and I'm going to be watching his blog... ...
Here's what's happening: Attendees: 428 Sessions: 73 Speakers: 49 Tracks: 15 Sessions: ASP.NET Make your Data Dance with ASP.NET Dynamic Databy Shawn Weisfeld + Show Description ASP.NET Dynamic Data is a framework that lets you create data-driven ASP.NET Web applications easily. It does this by automatically discovering data-model metadata at run time and deriving UI behavior from it. A scaffolding framework provides a functional Web site for viewing and editing data. You can easily customize the ...
I spoke at the Roanoke Code Camp over the weekend on Web Testing with Selenium. Some random thoughts in no particular order: - XNA > Testing - Few ppl show up to the testing sessions, but those that do are serious about it - Selenium seemed to be well recieved - No one threw fruit, so I must've done ok - Roanoke was not what I expected - Got to see an old buddy. That rocked. - Put a couple of faces to Twitter names. Also rocked. - The UG in Roanoke is a great group of folks. - Robin runs the show ...
Prism is the sexier term for the Patterns and Practices Composite Application Guidance for WPF and Silverlight (You can find out more info and download the components for it here). If you’re going to be doing complex, larger-scale development utilizing Silverlight (or WPF), you should definitely check it out as there’s a great deal of helpful information on how to structure and develop your app. Setting up Prism is not a turn-key type of operation though. Like other application blocks, you download ...
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. ...
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 ...
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 ...
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 ...
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" ...
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 ...
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 ...
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 ...
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 ...
Programming Visual Basic applications? Typemock have released a new version of their unit testing tool, Typemock Isolator 5.2. This version includes a new friendly VB.NET API which makes Isolator the best Isolation tool for unit testing A Visual Basic (VB) .NET application. Isolator now allows unit testing in VB or C# for many ‘hard to test’ technologies such as SharePoint, ASP.NET MVC, partial support for Silverlight, WPF, LINQ, WF, Entity Framework, WCF unit testing and more. Note that the first ...
Programming Visual Basic applications? Typemock have released a new version of their unit testing tool, Typemock Isolator 5.2. This version includes a new friendly VB.NET API which makes Isolator the best Isolation tool for unit testing A Visual Basic (VB) .NET application. Isolator now allows unit testing in VB or C# for many ‘hard to test’ technologies such as SharePoint, ASP.NET MVC, partial support for Silverlight, WPF, LINQ, WF, Entity Framework, WCF unit testing and more. Note that the first ...
Note the GeekSpeak today at 12:00 PST by John Papa. In this issue: Seema Ramchandani, Jeff Wilcox, John Papa, Pete Brown, and Lee. Shoutouts: I had to look up "Otaku", but then thought my granddaughter might like Laurence Moroney's Silverlight and Otaku – A match made in heaven :)... plus it's DeepZoom, so what's not to like! Yeah, Laurent... it's sort of SilverlightCream with a steaming helping of WPF on the side :) ... and here's a WPF link from Adam Kinney: PhotoSuru, an innovative photo-viewing ...
A while back I made a post about the Joel test and how badly my current employer is doing according to it. I've made it a personal goal to help improve my working conditions here as long as I am employed here, and as such I've started tackling weak areas, namely beginning with implementing source control management (SCM). As I've mentioned in my year wrap-up, we've made great progress in this department. I no longer write code unless I've first created a repository. For older jobs, as I use and update ...
Previous Posts: Part 0 of 4: Introduction Part 1 of 4: Testing the Service Part 2 of 4: Testing the Client Part 3 of 4: Testing the Asynchronous Client Functional Testing the WCF Application In functional testing, the goal is to test as much of the application that you can to determine that it does what you want from a functional perspective. It differs greatly from unit testing in that a unit test is only concerned with an individual class. Functional tests are concerned with testing the interactions ...
I'm created a simple utility class for unit testing serialization for my first post of the year. I originally created the class to test data contract serialization, but I extended it for IFormatter based serializers for another class I needed to test. I hope it proves useful. You'll need the following using statements: using System; using System.IO; using System.Runtime.Serialization; The following utility class will help you with unit testing serialization for your data contracts and serialization ...
Previous Posts: Part 0 of 4: Introduction Part 1 of 4: Testing the Service Part 2 of 4: Testing the Client Testing Asynchronous Clients Up to this point, we have tested the service and we have tested the client -- both in isolation. We have written unit tests and our code has good coverage. Unfortunately, my clients are not always synchronous. In Silverlight client, for instance, the framework will not permit you to make synchronous service requests. As it turns out, writing tests for asynchronous ...
Ok - no credit to me for any of this good stuff. All I'm doing here is posting on how to get database rollback working in your Nunit tests. Roy Osherove created something called XtUnit - "An Unofficial Unit Testing Extensibility Framework - Add new attributes to NUnit or MbUnit easily" - http://weblogs.asp.net/rosh... His blog talks you through all the cool stuff that you can do with this framework, like implementing your own attributes to do cool things pre and post ...
I really enjoyed the first St. Louis Day of .Net. There were over 200 people that showed up! My session this year was on Open Source Solutions for Application Lifecycle Management. Besides being one of the non totally Microsoft sessions, I also had the honor of having the longest title for the entire Day of .Net. Application Lifecycle Management is a huge topic, and I only had 50 minutes to cover some stuff, so I limited it to the following 4 areas: Defect Tracking and Change Management Unit Testing ...
A while back in my series of articles about testing with BizTalk I covered a technique for testing pipelines and pipeline components. The background to the approach is still valid in BizTalk 2009, but the technique is improved. To review the previous article refer to the following link: Pipeline Components - http://geekswithblogs.net/m... Pipelines - http://geekswithblogs.net/m... In this post although we could ...
A while back in my series of articles about testing with BizTalk I covered a technique for testing maps. The background to the approach is still valid in BizTalk 2009, but the technique is improved. To review the previous article refer to the following link: http://geekswithblogs.net/m... In this post although we could do testing of maps, to be honest it was a little bit of a pain. In the newly released BizTalk 2009 CTP there have been some improvements ...
We’ve been working internally to ensure we have a good story when it comes to testing our Integration solutions. We identified short-comings in our ability to confidently regression test changes and also to capacity plan and predict future growth and resource needs. Too tackle this we have been working on a testing framework for running unit tests, integration tests and load/stress tests using tools like BizUnit and LoadGen. While doing one of our bi-weekly reviews with the development team it struck ...
In this issue: Page Brooks, Jeff Wilcox, Jesse Liberty, Robby Ingebretsen, Rob Zelt, and Jonas Follesø. Shoutouts: Jeff Weber is giving some sneak peeks at a new game: Introducing Tire Storm (Sneak Peek). Shemesh has updated his Grid splitter: Silverlight: GridSplitter with a collapse button (V2). From SilverlightCream.com: Building a Resizable Silverlight Control Page Brooks has a nice tutorial on building a resizable control... why you may need to do that and how... cool stuff, Page! Creating a ...
I've been looking around for sometime, but never found some good information about it. Well, today, I've found some interesting articles (It's not really that new, the article is dated September 15 2008). It seems that there's a possibility for Unit Testing with SharePoint, you can do it with TypeMock. The article is found here. Here are some other referenced articles that might be interesting. Unit Testing SharePoint Beginners guide to TDD Webpart development Sharepoint typemock wrapper (on codeplex) ...
I try to use keyboard shortcuts as much as possible. Here are some that are handy when unit testing with Visual Studio: Ctrl + R, A – Run all tests Ctrl + R, T – Run tests in context (based on if cursor is in function, class, or namespace) Ctrl + R, F – Runs all tests that are checked in Test Results – very handy because that window is impossible to navigate without a mouse Ctrl + R, Ctrl + A – Run all tests in debug mode Ctrl + R, Ctrl + T – Run all tests in context in debug mode Ctrl + R, Ctrl ...
In our last episode, The UML Guy showed Evil Tester how he could use UML to define new test cases with ease. Now The UML Guy wonders what sort of monster he created... (Click picture for a larger image.) When you're a kid, and somebody famous shares your name, it opens your eyes to possibility. It gives you a sense that Hey! That could be me! You Johns had Wayne (the ultimate tough guy) and Cash (the incredible musician). You Jims had Stewart and Cagney and Garner. You Robs had Redford. We had Feldman. ...
As suggested by Pete O'Hanlon, I am going to take a look at NUnit. I am not very familiar with it as yet, so I am basically doing research to see it's capabilities :-) I heard that I will be teached about it in lecturers in the near future, so I will be blogging even more once I get a good grab at it. What is NUnit? NUnit is a free unit testing framework designed to be used with .NET projects. This framework provides a library that has classes and methods which help writing test scripts. Nunit has ...
Integration Testing: The methods/procedures/functions that were tested seperately in Unit Testing are combined and tested as a group. Integration testing is mostly use to check the performance, reliability of a product and to check whether the requirements have been met. Advantage: It is important to test in groups before testing the application as a whole because you can find code problems earlier in the project. Disadvantages: Boring, monotonous Time consuming ...
[Source: http://geekswithblogs.net/E... There are a few situations when you're unit testing a component which calls out to another worker – a SQL insert from a separate thread, or a file drop from an asynchronous service call. You want to verify that the worker's completed correctly, but don't want to make the test run any longer than needed. Previously I've used bespoke code in tests where this was required, but the number has been increasingly recently so I've added a RetryAssert method ...
In this issue: John Stockton, Pierlag, Mel Lota, Ning Zhang, Carole Snyder, Martin Grayson, Jesse Liberty, Public Sector DPE Team, Mike Ormond, Andy Beaulieu, and Arturo Toledo. Somasegar has an Application Architecture Guide 2.0 referenced on his site that bears reading. The Swiss MSDN Team Blog invites you to Try out the DeepZoom app on our Shape Website ... and this is very nicely done... Dan Wahlin reports his Amazon.com AlbumViewer Application for Silverlight 2 Released . From SilverlightCream.com: ...
White Box Testing White box testing is known as clear box testing and glass box testing. The technique in white box testing is to have a very good knowledge of the internal code. The testers need to know what the product does, what the code really does because they need to examine the output values as well as the values within the methods/procedures/function. If the tester, does not know the code well, this kind of testing will be a failure and not accurate at all. It is ideal to do this kind of ...