16-May-2011 11:01 AM  Q: So, what does the Visual Studio ALM Roadmap look like? A: Sweetness

Jason Zander just posted a blog entry about the ALM roadmap for Visual Studio vNext.

Read and enjoy.

-- bliz


   
13-May-2011 5:02 PM  Lookout fishies, here I come!!!

It’s the weekend, baby!

image


   
13-May-2011 9:50 AM  Fabulous reference for performance testing

If you’re into performance testing – and who isn’t these days? – and you haven’t downloaded the Visual Studio Performance Testing Quick Reference Guide, then you’re really missing out. Stop reading this blog post and go download it now. I’ll be here when you get back.

Why is this required reading for performance testers? Just take a look at the summary:

This document is a collection of items from public blog sites, Microsoft® internal discussion aliases (sanitized) and experiences from various Test Consultants in the Microsoft Services Labs. The idea is to provide quick reference points around various aspects of Microsoft Visual Studio® performance testing features that may not be covered in core documentation, or may not be easily understood. The different types of information cover:

  • How does this feature work under the covers?
  • How can I implement a workaround for this missing feature?
  • This is a known bug and here is a fix or workaround.
  • How do I troubleshoot issues I am having?

The document contains two Tables of Contents (high level overview, and list of every topic covered) as well as an index. The current plan is to update the document on a regular basis as new information is found.

Who can resist that?

Go. Now. Download and enjoy.

-- bliz


   
01-May-2011 8:46 AM  Saturday, April 30, 2011

Some Saturdays are laid back and relaxing. Others are full speed ahead. This was the latter.

On land

As we’re slowly getting moved into our new, smaller, already furnished home, we’ve been trying to figure out what to do with all the furniture from our old home. I love the beachy feel of the furniture the former owner left behind. It looks like it belongs on the water.

All of it.

Including the shabby/beachy kitchen table and chairs. . .

image

Pam loves most of the furniture too, but the kitchen furniture? “Shabby/shabby.”

Women.

But I digress.

On Wednesday night, Pam put a bunch of the furniture from our old house on Craigslist. She also put our horse trailer and round pen up for sale. And her e-mail box lit up. The response was amazing.

Pam set up a number of appointments for Saturday morning, so it was off to the old house bright and early. And the people showed up. Trailer: gone. Round pen: gone. Beds from both kids rooms: gone. Desk: gone. This was so much better than a garage sale. The stuff we don’t sell? We’re going to donate it to a charity.

We celebrated by going to Bob Evans for lunch. Kind of a shabby/rural kind of restaurant.

We’re into shabby these days.

Finally made it home around 4:00. Still plenty of light for a boating adventure.

On sea

I grabbed my boat bag (GPS, boat keys, flashlight, charts, fish ID book, etc), fishing pole, kissed Pam bye and headed out.

First order of business: gas.

My skiff is a shabby little 17’ center console. The gas tank sits inside the console, and I don’t have a funnel that will reach the opening, so I couldn’t use any of the gas from the jerry cans I have.

Good enough. I’ll go fill up at Shell Point Marina down at the mouth of the river.

Got to the marina, putted around looking for the fuel dock but couldn’t see one. I asked a guy who was unloading his boat. . . he said the nearest fuel was in Apollo Beach. About 10 miles north by water.

So I check my chart and off I go.

Shell Point marina to Apollo Beach. . .
image

The bay was relatively calm, and I cruised my way northeast in warm sunshine and light breezes. About halfway there I checked my watch: already 5:00 -- and realized that there was a good chance there wouldn’t be anyone there to run the fuel pump. I had plenty of gas to get back home, so no worries, I’d just continue my boating adventure another day.

But as I pulled around the corner to the fuel dock, I saw I was lucky: there was a monster of a boat fueling up. I pulled in right beside him and got my 10 gallons of unleaded. My tank holds 18. The other guy’s? I asked him. His tank holds 1,000 gallons of diesel. Three fill ups and could pay for my boat, brand new. It burns 60 gallons per hour at cruising speed.

Now that’s some serious money.

I check my watch, look at the sun, and figure I have about 3 hours of light (including twilight) left. Time to head across the bay to Healy’s. Not going to call him. Just going to show up. If he’s home I’ll say Hi. If he’s not home, no worries. Still an adventure.

So I check my charts again, and set my GPS toward his place.

Apollo Beach to Riviera Bay. . .
image

It’s a bit of a hike to Joes’ place, but the wind was very light, and I had a full tank of gas. Off I go.

As I make my way around the south end of Apollo Beach, I see a cruise ship off to my north, heading south down the ship canal, with Tampa in the background. Awesome! If I hurry I’ll be able to take some cool pics.

Cruise ship to the north. . .
image

I race across the bay to a spot just to the west of the ship canal, near where it’s going to turn the head due south again.

She looks kinda small compared to my awesome skiff, doesn’t it?
image

Turns out she was the Radiance of the Seas, heading out on a 15-day Panama Canal cruise, winding up in San Diego in 2 weeks. . .
image 

image  image

Bon voyage!!!

Anyway, back to my (much more modest) cruising adventure.

I turn back to the west towards Riviera Bay and floor it. The bay has glassed out by now, and I’m able to go full throttle. Which is a good thing, because it’s going to be a horse race getting back home before dark.

The passage into Healy’s neck of the woods is a bit twisty-turny. Luckily I’ve made the trip a few times, and have the GPS tracks from previous runs up the inlet. At one point there’s a sharp right-hand turn (almost a U-turn), and then it gets really narrow and shallow. I’m making my way through OK, then

WHUMP!

The boat bogs down.

What the?

I’m on course, in the marked channel. What’s up with that?

But the tide is ebbing, and the shallows had shifted. So I raise the engine to almost complete out of the water and try to find some deeper water. Found it way off to the right. And start putting along cautiously. . . and thinking about the time, because this was supposed to be a fast stretch, and there was a long stretch of idle-speed-only still to go.

Ah well, going to cut it even closer getting home before it’s completely dark, but my running lights work and I know the way home thanks to the GPS.

And the sinking sun doesn’t stop me from snapping a picture. Still another hour and a half till sunset.

Pelican grooming itself off Wheedon Island. . .
image

As I’m slowly approaching Healy’s place I decide to give him a call. Of course, he’s not home, so I snap a photo as evidence that I’d made it across the bay.

Dock’s looking good, Joe!
image

And then I turn to make the long run home. . .
image

Of course, I can’t just race my way along and ignore the pretty scenery.

St. Pete skyline . . .
image  image

image  image

And then the sun was gone. And I was still at the mouth of the Little Manatee River with about a mile of upriver travel remaining.

Typically I make my way along this path below. I’ve never really looked at the charts, just followed some other boats and paid a little attention to the markers. But at the stretch indicated by the arrow, it’s a bit shallow. And by now I was at low tide. This is a 25-knot section of the river, and I was cruising along about at 20.

image

And the water was gone.

WHUMP! (That’s two for the day.)

Another What the. . .???

I’ve been through this area a couple of times before, at pretty low tide. But . . . I’m grounded. And it’s really shallow.

Luckily the bottom is very soft – no rocks or oyster shells – so no damage to the engine.

So I hop out of the boat, start pulling and tugging, trying to figure out which way to deeper water. I manage to find it after a few minutes, but by now I’m spooked. Have I been flying over very shallow water each time I’ve come down river?

Putt, putt, putt, I go.

And I bottom out a few more times. (Total? about 6 for the day. I started to lose count.)

By now the twilight is gone. It’s dark. But I see another boat heading upriver, and I drop in behind it. And I limp my way back home. Tired, ego a bit bruised, but safe and sound.

Looking at the chart this morning, it looks like the safer and deeper (but slower because it’s so narrow), route is to the north around a little island.

image

Lesson learned.

I’ll probably check it out later today. But first, we’re off to buy a lounge chair (or two) for the pool.

To be continued. . .


   
26-Apr-2011 10:24 PM  Perfect evening

Late night homemade tacos outside by the pool with Pam, the sound of Linda Ronstadt singing “Blue Bayou” gently drifting across the water from the other side of the cove. Dogfish Head 60 Minute IPA to wash down the tacos.

Perfect evening.


   
26-Apr-2011 3:34 PM  Note to self: SOx and TFS 2010

Take a look at the new paper just published this month regarding SOx and TFS 2010.

This paper provides an overview of the Sarbanes-Oxley Act of 2002 (also known as SOx) as it relates to software development practices and the associated risks to financial systems. Visual Studio Team Foundation Server 2010 can be used to reduce many of those risks and provide evidence as proof of compliance for auditors.

http://msdn.microsoft.com/en-us/library/gg983694.aspx


   
11-Apr-2011 3:46 PM  Hyper-V settings for a rocking fast VM

Yesterday I went back to the scene of the crime, the Treasure Island side of the Tampa office MPR, where my VM ran as slow as molasses as I was presenting a hands-on workshop for 5 customers. My goal was to see if the new video driver I had since installed would help resolve 1) the issues I was having with the projector, and 2) perhaps some of the VM performance issues. (#2 was a stretch, but I’ve heard rumors of video drivers that cause machine performance issues.)

The new driver did fix the problems with the projector, but didn’t seem to do anything to improve the VM performance.

After I got back home, I took a look at the processor settings for my VM, a highly customized version of Brian Keller’s public VS 2010 RTM hyper-V image.

I shut down the VM (it has to be off to do this) and bumped the Number of logical processors from 1 to 4, the Virtual machine reserve (percentage) from 0% to 50%, and also changed the RAM from 3000 MB to 4096 MB.

image   image

When I booted the VM, the difference was amazing. It is now rocking fast. I haven’t been able to get back to the MPR to see if it’s just a place with bad demo karma, but my bet is on the new settings.

There are other things that you can do to make your Hyper-V images fast, such as using a fixed disk, etc., and that VM in particular, such as turning off the data warehouse sync service, and the SharePoint timer service. . . which were already done on this image.

-- bliz


   
10-Apr-2011 12:00 PM  Walking the walk. . .

In my job I do a lot of presentations. I try do to demos as often as I can, to make things a bit more real for the “audience.” I also use slides, usually to to help convey complex points, or to “demonstrate” things that I can’t really run locally on my laptop just because the demo would require too much horsepower. Lab management would be one of those things.

One of the things I’ve talked about in so many of my presentations is configuring Team Foundation Server in a two-tier setup – an app tier for the TFS server, and a separate database tier for the database. In all the TFS installations I’ve done in the past (and there have been oodles of them) I’ve always taken the simplest route and installed everything on one server: Database, TFS, and even Visual Studio, Test Manager, etc., etc., etc.

Everything in one virtual machine. Simple to set up, simple to manage.

On Saturday I finally decided that it was time to install TFS in a two-server configuration, one for the database and one for the app tier. And in that decision I also decided not to put VS on the TFS server - to create a separate developer VM. And to make things more interesting, I decided to create my own domain VM as well.

It’s been quite a learning experience. So far I’ve created the following environments:

  • Domain controller on ws08r2
  • Database server on ws08r2
  • TFS app tier server on ws08r2
  • VS 2010 developer / Test Pro 2010 environment / IIS on Windows 7

Smile for the camera! Here is a picture of the four, idling away, waiting for me to get back to work:
image

I’m going to give these a little test, to see if they perform OK when I try to do some simple TFS-related stuff from the client desktop. (Let’s call it a smoke test for my laptop.) If that works OK, I’ll create some simple apps and see if how they perform.

If my laptop doesn’t crater, then I have a few more VMs I’d like to bring into the mix. I’m not looking for a fast environment, or something that I would demo in front of people, just a nice playpen in which I can actually walk the walk instead of just talking about it. The other VMs:

  • Test Pro desktop on Win 7
  • Separate development web server on ws08r2
  • Separate app server on ws08r2

That’s a lot of virtual machines, requiring a lot of disk space to hold the VMs and a lot of RAM to run them concurrently.

Fortunately my laptop has a lot of both. With up to 7 VMs running concurrently, I’ll have to skimp the RAM a bit on each of them – allowing only 2 GB each. (I’ve already restricted the first 4 that way.)

The laptop’s processor is an i7, but it’s not the fastest of that series . . . When I bought it, the i7 hadn’t been out long and the ones at the very top end GHz-wise were amazingly expensive. They’ve come down quite a bit since then, as all computer prices do. But, I have what I have. And I’m not complaining at all.

It will be interesting to see if the laptop can do all the above. Right now I think it will probably be dog slow, but that’s OK.  : )

If things run like molasses, there are couple of things I can do:

  • offload some of the VMs to external drives (I’m currently using the laptop’s second internal drive to hold all the VMs) I may move some of the VMs to external drives (either USB or eSATA);
  • move some of the VMs to another laptop and network the two machines together;
  • beg for a few more laptops. (cough)

As I mentioned, this is a learning process for me. In other posts I’ll let you know some of the “fun” I’ve already run into, and stuff that comes up along the way. I’ve already fumbled / stumbled a number of times, leveraged some excellent excellent information on the internet, and occasionally even (gasp!) RTFM.

-- bliz

 

Post Script

But right this minute I’m heading back to the Tampa office to connect my laptop to the projector in the MPR (multi-purpose room). On Friday I connected my laptop to that projection system for the first time, and the display driver stopped working. Fortunately I could see things on the system’s external monitor, but my laptop display was toast for the day.

Then things really got bad. My demo VM (everything installed in one VM, natch), which always performs quite well, began to crawl. Double-dog slow.

The folks in the room were very nice and understanding, and Quent helped me tremendously by doing an excellent impromptu tap dance while I tried a number of things to get things working, and finally ended up using my Win 7 image and slightly different demos.

So, I’m going to go try to kill that gremlin, the one living in the Treasure Island conference room’s projection system.

Wish me luck.

[Update: . . . Or maybe it was the incredibly old display driver that was causing the problem. Just installed the latest one, and I’m heading to the office to give it a try. . . ]


   
10-Apr-2011 11:59 AM  Simple test post from here . . .

Just making sure I’ve configured Live Writer correctly.

image


   
28-Mar-2011 5:45 PM  When simple seems incomprehensible

[Update: here’s a video of the demo . . . Note: When you watch it on the YouTube site, you’ll probably like it better in a pop out window so you can resize it a bit larger. Direct YouTube link.  ]

========================================================================

When the demo gods are against you, what are you going to do?

Sometimes the problem that causes a demo to crash and burn is something horribly complex and difficult to diagnose, and sometimes it’s the simplest thing that can cause a demo to go wrong.

And when you’re in front of a bunch of folks, sometimes a simple issue looks horribly complex. Unfortunately this was the case during my DevConnections session this afternoon. The problem looked huge. My Web Performance Tests wouldn’t complete successfully. The load tests wouldn’t run. I would walk through my web application, no problem. I’d make the recording, no problem. But when it came time to run the automated test: problem.

A failing test. . .
image 

The thing is, I had been running through this demo for a few days. And it had never failed like this. I even ran a load test prior to the session, while I was waiting on folks to arrive, and it seemed to be working.

All systems go, right?

Wrong.

And I just couldn’t figure out what was going on. I tried running against IIS Express, against the site in IIS itself, and it would display fine in the browser, but when I tried to run the test against it, it would fail. I closed down VS and re-opened it, but no. That wasn’t it either. Crash and burn. Flames everywhere.

Fortunately I had made some screen shots and was able to talk about what things should have looked like, but. . .

That’s kind of like the difference between 
showing you a picture of a key lime pie while telling you how good it is,
and handing you a piece of key lime pie to let you taste for yourself.

It’s just not the same thing. Totally lame.

So, of course, as soon as I got out of the room and sat in a chair and looked at the screen, I saw the problem.

The web site in the browser. . .
image 

and

The web site in the test run results. . .
image 

See the red X of death in the test run results? Over there, where the RSS button image is supposed to be?

Yeah, that was the problem. The image was cached in the browser. But the automated web test wasn’t going to have any of that… it wanted to SEE it. It wanted to get the image from the source; it didn’t want a cached version. So it failed the result.

During the session, all I should have done was expanded any one of the failed steps to the lowest node, such as this:

The culprit. . .
image 

When I pulled the source code for my public web site and got it running on my laptop, I’d forgotten to change the reference to the RSS button image. Which pointed back to SnowstormLife.com. On the internet.

EVERY TIME I HAD RUN THROUGH MY DEMOS BEFORE THE SESSION, I HAD BEEN CONNECTED TO THE INTERNET.

But in the session itself, I wasn’t connected. As a result, the automated test run couldn’t resolve the image location. The test results were just sitting there, trying to tell me that that was the issue. Screaming at me!

But I missed it.

And this was a session on testing. And figuring out what’s going on with an application that’s being developed. Ironic, eh?

Whiff!!!

I guess this is what A-Rod feels like in October.

So, even though this falls into the “too little, too late” category, I’m going to record the demo (a working version) and post it online for you to watch. If you’re interested. I’ll update my blog entry with the link once I’ve posted it.

And in the meantime here’s a link to my slides, which are already online: http://bit.ly/eT5P6M. Feel free to download them, print them out, then throw them into the shredder. That’s what I’m going to do. Then the demo gods will be happy and I’ll be able to move on.

Anyway, thanks for coming to the session. Wish I could have let you taste the piece of the key lime pie. It’s delicious.

-- bliz

P.S. Baris, I hope you enjoy the Zune!!!


   
22-Mar-2011 3:47 PM  See you in the cloud . . .

Up until now you’ve had to use a credit card if you wanted to sign up for Azure services. I just found out that Microsoft now has two options for billing: credit card or invoicing. This is for any charges that occur for usage over your MSDN/Azure benefits. So what are the benefit levels included with your MSDN subscription? Take a look here.

If you’re an MSDN customer, activating your MSDN Windows Azure benefit is either a one or two step process:

Credit Card Option: Activate using Credit Card as security for any usage in excess of your benefit

  1. Activate by going to the Windows Azure Portal

Invoicing Option: Activate using Invoicing option as security for any usage in excess of your benefit

  1. Set up invoicing <Detailed Instructions here >
  2. Activate by going to the Windows Azure Portal

 

See you in the cloud!


   
22-Mar-2011 8:59 AM  Finished the VS 2010 SP1 installation

About a week ago I attempted to install TFS 2010 SP1 and VS 2010 SP1 into my download of Brian Keller’s public VS 2010 virtual machine. (Remember, that VM is set to expire on June 1, 2011.)

Last week the TFS SP1 installation went fine. No problems at all there. However, when I kicked off the VS 2010 SP1 installation, the first thing it did was checked the hard disk space available. And there wasn’t enough. The VM only had about 2GB of hard disk available, and the service pack needed over 5GB.

Yesterday I finally had a chance to do something about it.

First I used VHDTool to expand the VHD file from ~30GB to ~50GB. Well, the real first thing I did was I exported the hyper-v image to a second external hard drive just in case I destroyed the VHD file. (Backups == good.) Then I made sure the VM itself was turned off (not in a “saved” state) and deleted all the snapshots, letting hyper-v physically delete the snapshot files.

Then I used the VHDTool to expand the VHD file.

After that I started the VM and went to disk management. I expanded the active partition to include all the the brand new hard disk space the VHDTool had created for me.

And that was it. I took a snapshot, exported the VM to make another backup copy, and I was on my way.

This time the VS 2010 SP1 install went as smooth as silk. I followed that with a huge list of other installations, taking a snapshot after each one. Finished up around 10 PM (after watching (and falling asleep to) “Team America”).

What did I put on the Brian Keller VM, you ask? Here’s the list, in the order I installed it:

  • VS 2010 SP1
  • TFS 2010 SP1
  • Uninstalled the VS 2010 performance tools
  • Installed VS 2010 performance tools with SP1 x86
  • Eclipse
  • Java JDK
  • Team Explorer Everywhere
  • TEE SP1
  • Expression 4 Ultimate
  • Expression Blend 4 SP1
  • VS 2010 March training kit

After completing the last step I shut down the VM, deleted all the intermediate snapshots, took another “final” snapshot, then exported that to my second external hard disk.

Whew.  Time to relax.

Belize hammock

What extra things have you added to your version of Brian Keller’s VM?


   
14-Mar-2011 4:13 PM  Installing TFS 2010 SP1 and VS 2010 SP1

[Update: the public VM doesn’t have very much available disk space. VS 2010 SP1 requires 5.3 GB to install. Roadblock found.]

I’m currently installing TFS 2010 SP1 into my version of Brian Keller’s public VM. Read more about his VM here. Note that this VM expires on June 1, 2011.

image
Do I really want to install this? Yep. . .

The wizard started right up, and after selecting Next it asked me if I really, really wanted to do this. I agreed, and it started to do its business.

(Since I’m using the Hyper-V version of the virtual machine and I have a snapshot as a backup, I didn’t make a backup of the TFS database. If things go wrong I’ll just turn off the VM, apply the last snapshot, and start over. Nothing simpler than that.)

It took a couple of minutes to verify all the files, but now it’s installing. (I’ve mapped a network drive from my VM to the USB drive that’s attached to my host OS. That could be part of the reason it’s taking a couple of extra minutes.)

image
Installing the files. . .

So, what are TFS 2010 SP1 and VS 2010 SP1 going to give you? Details here: http://blogs.msdn.com/b/bharry/archive/2010/12/07/vs-tfs-2010-sp1-beta-has-released.aspx and here: http://msdn.microsoft.com/en-us/library/bb385832.aspx#ServicePack1

I’m going to install VS 2010 SP1 just as soon as TFS SP1 is done. (I hope that installation order is OK. I’ll let you know if this order crashes and burns.)

 

UPDATE

OK. TFS SP1 has successfully installed. Now starting VS 2010 SP1 installation.

image
Starting the VS 2010 SP1 install . . .

And immediately I hit a snag:

image
Eh? What? Only 2GB of hard disk available?

image
OUCH. . .

Guess I’ll have to install this into a different virtual machine.


   
11-Mar-2011 1:58 PM  Yellow card

A couple of days ago I was cleaning out the garage, trying to make things look nice and neat. As I was going through boxes of papers and books, I came across a real throwback – my assembly language book and a yellow card from my days at UWF. They somehow followed Pam and me as we’ve moved our way across the country and back over the past 20-something years.

scan0007 scan0008
A couple of relics from the Land Before Time. . .

Back in those days nobody gave a hoot about UI design – why bother when everything was on punch cards and paper terminals, right? Well, it wasn’t quite as stone age as that, but it was close: 3270 screens, ISPF, TSO, VM. All the lovely green-screen ways to talk to the computer. And by “computer,” we all know that we’re talking about a System/370. Everything else is just a poser. Just try to deny it.

The one book that I really wanted to find was my Advanced COBOL book, from Richie Platt’s class. That class was the killer in the computer department. It’s not that COBOL was hard: it was the amount of data validation that had to be done. Tons and tons of writing, reviewing, testing, re-writing. Hour upon hour, late nights and weekends spent in the computer lab and in the little temporary building just outside. Fond memories of drinking Coke and eating peanut butter crackers from the vending machines while puzzling over a tree’s worth of printouts. And the oh-so-tricky tests Richie would throw at us. It’s amazing anyone at all passed the class.

So what do I do to keep a reminder of the past? The command prompt. It’s the sole refuge of a simpler time. Gotta keep it Kermit green with black background.

image
The way any self-respecting command prompt should look. . . I don’t know why it’s not the default color settings.

Good times.


   
11-Mar-2011 1:50 PM  Coded UI test-keep on trucking

So, have you ever wished you could make your Coded UI test keep on running to the end, even if it finds errors along the way?

I had someone ask me about that the other day and after doing a little searching, discovered that since it’s a Coded UI test, you can make it do pretty much anything you want. Including keep on running even if an assert fails.

How? It’s pretty simple, actually.

You’ll need to modify your CodedUITest1.cs file (or whatever the name of the generated code file is) to add try/catch statements around the calls to the Assert methods, and add a bit of logic to fail the test at the end of the routine if any of the assertions failed along the way.

When an assertion fails you can catch the exception and write a message to the Console, or to a log file, a database – wherever. (Someplace that you’ll be able to review after the test ends.) The sample code below writes to the console.

Also when an Assert fails I set an indicator, and at the end of the test run I check to see if all the Asserts passed. If one or more failed, I throw an Exception of my own so the test will show up as Failed in the Test Results window.

An enhancement would be to add a finally block to the try/catch, to do any necessary clean up after a failed step during the test run. The app I was testing is pretty simple and didn’t need anything extra.

Here’s the result of a failed test run in the Test Results window:

 

 

In the Test Results window you’ll need to double click on the row for the failed test (highlighted with red outline in the image), which will open the details of the test run.

The specific errors will be in the “Standard Console Output” section of the test results detail window, as highlighted in the image below:

 

In this test run, both the Add and Subtract routines failed.

And that’s it!

Your Coded UI test will run to completion even if an assert fails, and you’ll also be able to see the individual errors.

Here’s the SAMPLE code that I created to do it:

//
// NOTE: This code is for illustration purposes only and is
// provided AS-IS, with out any warranties or support.
//

[TestMethod]
public void CUITestCalculatorRoutines()
{
// Original test method calls generated by the Coded UI recorder
//this.UIMap.CUITestAdd();
//this.UIMap.Assert5plus6Works();
//this.UIMap.CUITestSubtract();
//this.UIMap.Assert4minus2Works();
//this.UIMap.CUITestDivide();
//this.UIMap.Assert8dividedBy2Works();
//this.UIMap.CUICloseCalc();

//————————————————-
// Modified test method calls

// Need to keep track of any failed assertions so I can throw
// an exception at the end of the test. That way it will show up
// as a failed test in the Test Results window.
bool bAllTestsAreGood = true;

//———————————————
// Testing the Add routine
this.UIMap.CUITestAdd();
try
{
this.UIMap.Assert5plus6Works();
}
catch (Exception ex)
{
Console.WriteLine(“ERROR in Addition routine!!! ” + ex.Message);
bAllTestsAreGood = false;
}

//———————————————
// Testing the Subtract routine
this.UIMap.CUITestSubtract();
try
{
this.UIMap.Assert4minus2Works();
}
catch (Exception ex)
{
Console.WriteLine(“ERROR in Subtract routine!!! ” + ex.Message);
bAllTestsAreGood = false;
}

//———————————————
// Testing the Divide routine
this.UIMap.CUITestDivide();

try
{
this.UIMap.Assert8dividedBy2Works();
}
catch (Exception ex)
{
Console.WriteLine(“ERROR in Divide routine!!! ” + ex.Message);
bAllTestsAreGood = false;
}

this.UIMap.CUICloseCalc();

// Now we check to see if all the tests were good. If one or more assertion
// failed, this assertion will fail and the test run will be marked as Failed.
Assert.IsTrue(bAllTestsAreGood, “An Assertion failed during the test. See the Standard Console Output for details.”);

}

Helpful?


   
      <<< Older entries       Newer entries >>>