Fred Mastropasqua's Facebook profile

Microsoft Test And Lab Management with Test Runner and Visual Studio 2010 CodedUI Testing UI

by Fred Mastro 8. December 2009 15:23

Ok who at Microsoft can I go hug and bow down too for creating Test and Lab and Test Runner and the CodedUI Recorder script generator.  Client of mine wanted to do more automated and better testing of their web apps. I knew VS 2010 had new testing tools but didn’t know to what extent. So I did some quick research and installed it on my own and tried it out against a business application I develop.  Wow.

I still have a lot to learn on it’s use but in 5min I created a script that I could automate and test the UI functionality of the business web app.

Applications to look at:

  • Visual Studio 2010
  • Microsoft Test and Lab Management 2010 (Yes this only works with Team Foundation Server 2010. If you have TFS 2008, you’re out of luck.
  • Microsoft Test Runner 2010 (Comes as part of Test and Lab I believe)

Some quick overview features

  1. You can record your testing and play it back later to automate it
  2. It’s designed for non-developers but not end-users, for someone in QA
  3. With this tool you can have “Shared” scripts, so say you create 100 scripts and we change the login functionality. You would only need to edit that one shared script and all the other 100 are changed.
  4. Manual Testing can be turned into automated testing
  5. You can setup test environments for local, QA and Prod
  6. You can do full screen capture when manual testing and it will create Bug item in Team Foundation System with your screen shots and all the steps you performed and what data was used when you were developing.
  7. You can use datasource for username’s and passwords and addresses to test with etc.
  8. You can perform Coded UI Automated Scripts without coding anything, a recorder records and generates it for you.

You can view the Test and Lab Management Video here, skip ahead to 13:10 into video to see it in action. http://mschnlnine.vo.llnwd.net/d1/ch9/2/8/2/3/7/4/104Episode23AnIntroductionToManualTesting_ch9.wmv

CodedUI Functionality in VS 2010 Video. Fast forward to 2:20 to 7:10:  (You can do this on any VS 2008 project you have, using VS 2010 only) http://mschnlnine.vo.llnwd.net/d1/ch9/5/4/1/8/6/4/104Episode18FunctionalUITesting_2MB_ch9.wmv

Good Post on some of the Lab stuff: The Microsoft Test Runner – innovation for the Generalist Tester

Show Ports In Use on your Windows OS

by Fred Mastro 2. December 2009 14:47

TCP Ports:

netstat –anop TCP

UDP Ports:

netstat -anop UDP

Tags: , , ,

Troubleshooting | Microsoft | Operating Systems

Test SMTP Server via Telnet

by Fred Mastro 18. November 2009 09:28

As a developer I always have to write code to send emails, here's a quick way as a developer to make sure the SMTP Server is working properly.

Telnet to Port 25 to Test SMTP Communication

1. Telnet into Exchange or SMTP Server using port 25.
Command is telnet <servername> 25

c:\>telnet 192.168.0.5 25
220 fredmastro.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Sun, 29 Nov 2009 10:22:22 -0400

2.Start by typing the following:
helo <your domain name><enter>                 
response should be as follows
250 OK

 

c:\>helo
250 fredmastro.com Hello [10.x.x.x]



3. Type the following command to tell the receiving SMTP server who the message is from:

mail from: <your Email Address><enter>
response should be as follows
250 OK - mail from <your Email address>

For example,

c:\>mail from: fredmastro@fredmastro.com
250 2.1.0 fredmastro@fredmastro.com....Sender OK



4.Type the following command to tell the receiving SMTP server whom the message is to. Use a valid recipient SMTP address in the domain that you are sending to.

For example, if you are sending to someguy@gmail.com, you must be certain that someguy@gmail.com exists in your domain. Otherwise, you will receive an NDR.

rcpt to: <recipient address><enter>
response should be as follows
250 OK - Recipient <recipient address>

For example, 
c:\>rcpt to: someguy@gmail.com
250 2.1.5 someguy@gmail.com

5.Type the following command to tell the SMTP server that you are ready to send data:

data<enter>
response should be as follows
354 Send data.  End with CRLF.CRLF

c:\>data
354 Start mail input; end with <CRLF>.<CRLF>
Test Message
.

250 2.6.0 <someguy@gmail.com>
Queued mail for delivery

6. Close the connection by typing the following command:
c:\>QUIT

response should be as follows:
221 closing connection

Another good reference: http://www.messagingtalk.org/content/470.html

Tags: , ,

Developer Tools | Troubleshooting

Slow Closing of Visual Studio on Remote Web Projects

by Fred Mastro 9. December 2008 01:59

Found this post, and though it would be worth noting for my development friends.

If you are experiencing slow project close, try switching off participation in the feedback program in  Help | Customer Feedback Options... dialog. If it does not help, try disabling component in registry by changing

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Packages\{2DC9DAA9-7F2D-11d2-9BFC-00C04F9901D1}

to

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Packages\Disabled-{2DC9DAA9-7F2D-11d2-9BFC-00C04F9901D1}

Tags: ,

Troubleshooting | Visual Studio

Installed Visual Studio 2008 SP1 and started getting “Value does not fall within the expected range.” on trying to create a Unit Test.

by Fred Mastro 7. November 2008 01:47

When I tried to create a unit test and expand my website to find the classes and namespaces.. I started to get "“Value does not fall within the expected range.” popup message. Well found the solution below, those they are doing it for a different reason it works nevertheless.

Found the solution here:

"...open the Configuration Manager from the Build menu, and for each of your website projects listed there, change its Platform to “Any CPU”.  Be sure to make these changes for each configuration type defined for your solution (e.g. Debug, Release). "

http://blogs.msdn.com/chrissc/archive/2008/08/22/vs2008-sp1-website-profiling-bug-and-workaround.aspx

Tags: ,

Troubleshooting | Visual Studio

Debugging Timeout on Vista IIS7 with Visual Studio

by Fred Mastro 2. September 2008 01:42

Well I've had this problem awhile.. where if you move over to Vista and IIS 7 you'll notice that your Debug sessions timeout very quickly, 90 seconds to be exact.

It's very annoying.  I had once went through my app pool changing every time value I found to something higher just to fix it for the moment, which is a bad idea. I usually like to know why something happens and figure how to fix it properly.

So I came across a forum article on asp.net written by jshallard.

Here is the solution for fixing your Debugging Timeout Issue:
I went with the first option, I like to debug forever

In IIS 7 go to the Application Pools and select the Advanced Settings for the pool which you process runs in. In the Process Model section you can do one of two things;
    * Set the Ping Enabled property to False. This will stop IIS checking to see if the worker process is still running and keep your process alive permanently (or until you stop your debugged process)
    * If you prefer to allow IIS to continue the monitoring process then change the Ping Maximum Response Timeout value to something larger than 90 seconds (default value).

Tags: , , , , ,

Operating Systems | Troubleshooting | Visual Studio

Windows Live Messenger On Vista Error 81000306

by Fred Mastro 10. April 2008 01:40

 So when I'm at one location, say home, my Live Messenger connects fine. No problems what so ever. However, connecting from another location say the office, it doesn't connect. Or once in a blue moon it might make a connection that last a few minutes then gets booted.

Of course if you look up this error, you will get lots of posts on "make sure your connected to the Internet" or "it's your proxy settings", or a lot of other basic solutions to a more advanced problem.  Very frustrating, especially if you are more then an end user that knows and understands networking.

So after some research I found a post out there that had a suggestion that actually worked.

You basically need to disable AutoTuningLevel on your TCP connection.

This is the command to view the autotuninglevel
netsh int tcp show global

This is the command to disable it. disabled: Fix the receive window at its default value. This one worked for me, I've thought of using the restricted version but haven't had any problems yet.
netsh int tcp set global autotuninglevel=disabled


This is the command to return it to the default normal setting. normal:
Allow the receive window to grow to accomodate almost all scenarios.
netsh int tcp set global autotuninglevel=normal


This is the command to set it to restricted which is you get some benefit from autotuning. restricted: Allow the
receive window to grow beyond its default value, but limit such growth in some scenarios.
netsh int tcp set global autotuninglevel=restricted

After making this change I didn't need to reboot, but you may. I closed and re-opened MSN and it connected instantly. Hopes this helps someone else down the road.

Flash Player 9.0.115.0 on Vista Does Not Display Content

by Fred Mastro 8. February 2008 01:23

You may have noticed, if you're running Vista, that with the latest update to Flash Player 9.0.115.0, you no longer are seeing pages with Flash Content. You'll go to YouTube or GrandCentral.Com and notice that it tells you that you need the latest version of Flash.  You'll install it for the 50th time and still doesn't work.

Solution? You need an update to your Flash Player for Vista, which you can find located here, after you've installed the Flash Plug-in/Player.

Here are the steps I finally found from the Adobe site.

    Windows Vista installation failure

    On some Windows Vista systems Flash Player may be installed, but will not display Flash content. In some cases updating to the latest Flash Player using the included utility can correct the User Account Control settings that cause this problem.

    To run the utility, find your installed Flash folder:

  • Right-click C:\Windows\System32\Macromed\Flash\FlashUtil9d.exe

    The letter changes with each Flash version, so may be "FlashUtilb.exe" or "FlashUtile.exe"

  • Select "Run as Administrator"

  • Follow the steps to complete the Flash Player installation

  • Restart your computer

 

Now, this only worked on my Vista 32bt OS, doesn't work so good on my 64bit.  Upon running the utility it doesn't seem to complete. So I took they Flash folder from my 32bit and over wrote the Flash folder on my 64bit. Located at C:\Windows\SysWOW64\Macromed\Flash.

Seemed to fixed the problem after a reboot.

Tags: , , , , ,

Operating Systems | Troubleshooting

TeamFoundation TFS Deleting / Solving Multiple Workspace Problem

by Fred Mastro 29. January 2008 01:14

So you're setting up a new Workspace for Team Foundation and you get an error when you try and point a Source Control Project to a local folder that someone else was using as well..... Then you get the error message....

Error: "The working folder ... is already in use by another workspace on this computer"

I ran into this problem setting up a contractor's PC after the previous contractor using that PC had left.

The problem is you can't just go load up and delete workspaces unless your the owner. So in order to solve the problem I had to run a command line command for Team Foundation. Open Visual Studio 200x Command Prompt.

Tf workspace /delete developer05;<domain>\jsmith

 

To get that info I needed the owner name of the workspace and the workspace name. You can do

 

tf workspaces

  

You can find a list of Team Foundation (tf) commands here:

http://msdn2.microsoft.com/en-us/library/z51z7zy0(VS.80).aspx
You can see commands on that MS site, however the two most useful to me in this situation was listing the information, so I could see who was the other person blocking access, and then deleting it.

 

tf workspaces [/owner:ownername] [/computer:computername]
[/server:servername] [/format:(brief|detailed)]
 


tf workspace /delete [/server:servername] workspacename[;workspaceowner]

Note: Common mistake is to forget the domain name of the owner if you are on a domain. <domain>\UserName

Tags: , , ,

Troubleshooting | Visual Studio | Developer Tools

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About the author

A Certified MCSE (NT4 & 2k), MCDBA (2k), A+, CCA, with over 10 years of experience with Windows Networking and Development. Developing mainly in ASP.NET, VB.NET and T-SQL. Also develops in Objective-C (iPhone), XAML (SilverLight & WPF), C#, "Classic" ASP 3.0, ADSI,  VBscript, WScript.

Non-technical hobbies include other areas such as Movie watching (action, epic, comedy, some romantic comedy, well everything), Reading (Science Fiction, Fantasy, Detective and Programming categories), Film Editing, Directing with Special effects (using Adobe Premiere and Adobe After Effects), Dungeons & Dragons (D&D 4th Edition), Auto-Cross Racing & Cars (BMW M3, MazdaSpeed's), Motorcycles (Honda CBR 600), TV Shows (Flight of the Conchords, Lie To Me, DollhouseBattleStar Galatica, Smallville, Alias), Music (Akon, Billy Joel, Micheal Bublé, Bid Daddy Weave, T-Pain, Barlow Girl, Notorious B.I.G and more, love all types of music), and Religion (Christianity, debating and prophecies).


Web Tools - QuickLinks

Web tools I use more then others. Some of these are on my Link Collections page, but this made it easier for me to go to my site and click a tool.

  1. Telerik Code Converter (C# to VB/VB to C#)
  2. Lorem Ipsum - Dummy Text for Prototype Apps
  3. Web Color Values
  4. Open Source Icons

 

Highlights

  • Some websites I've worked on. This is a small collection of sites I've developed or added to awhile back.

  • Revenge Movie Trailer. Trailer I made with Adobe Premiere and After Effects. Jason Christman is the main star and I'm the director behind the camera.

  • Essential Software For your Mac. - I'm a Microsoft geek, but I've switched over to Mac. There was a lot of stuff I needed to get installed that I missed on my Windows machine. Also I had no idea how to do it :p Here's some help.

  • Speed Football. I wanted to make a special effect like the Smallville or Superman running fast. All the other ones I've seen, the person in the frame was the only moving object while everything else was blurred. I wanted to create the effect but interact with another normal moving object.
  •    
  • Code Snippets and Quickies. Sometims I find something or develop something that I think is useful and it can be copied and pasted anywhere for someone to use. Here's a collection of things I've posted on.
  • Books I've Read or Reading