Home > Microsoft .Net Development Tips > Application Testing and Security > Faster testing of ASP.NET applications
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

APPLICATION TESTING AND SECURITY

Faster testing of ASP.NET applications


John Sorensen
11.19.2002
Rating: -5.00- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


This tip was submitted to the Visual Studio .NET Info Center Tip Exchange by member John Sorensen. Let other users know how useful it is by rating the tip below. Got a tip or code of your own you'd like to share? Submit it here.


System testing and debugging on our large ASP.NET project was taking too long. For every test, we needed to compile, load and authenticate. We were spending more time loading, navigating and authenticating than we were spending testing and debugging -- until we found a useful shortcut.

I am working on a large ASP.NET project where we are using Microsoft Passport authentication. We have completed unit testing, so we have started system testing. Every time I want to perform a test, I have to authenticate with Passport to get to the site.

This is what I have to do: Go to the IDE. Then hit the Start project button in the tool bar (F5), which builds and starts the project. Next, I have to wait for the project to load. I then have to log into Passport (which takes a long time since I am hitting the development servers), and then I have to navigate to the page I want to look at (which takes more time -- even longer depending on which portion of the site I am working on). Then I have to test my code. If I didn't quite get the code correct, then I have to stop the IDE, correct the code and do it all over again. This is a very time consuming process.

Here is a feature of Visual Studio .NET that saves me from having to wait for the IDE to load, log into passport, wait for the development Passport servers to authenticate me and then navigate to the correct section of the Web site before I can do my test.

  1. Open up a browser. (Let's call it "A.") Go to the section that you are interested in viewing ("http://localhost/Subsection/ObscurePage.aspx" for example).

  2. When you hit the "Debug -> Start" (F5 shortcut key) in the IDE, another browser (let's call it "B") opens up.

  3. In the IDE, place a break point some where in the "ObscurePage.aspx.vb."

  4. Now, in Browser "A, initiate an event that will reload the page (a button click, or just reload the page). Browser "A" will then go into debug mode even though Browser "B" is the browser that was associated with the debugging session.

  5. Step through the code.

If you discover that you need to make a change to the code, step all the way through the code so that Browser "A" is no longer attached to the debugger. Click on the "Stop" button in the IDE toolbar (Debug -> Stop Debugging or Shift+F5). Browser "B" will close. Make your change to the code. Rebuild the project (Build -> Build Solution or Ctrl+Shift+B). Hit Refresh in "Browser A", and you will see the new code that you just worked on displayed in Browser A. If you need to step trough the code again, repeat steps 2 - 5 above.

I have done this same process when using Terminal Services to log into a remote machine and execute code on my local machine. In this case, Browser "A" was on a different machine, but using steps 1 - 5, I could step through the code locally. I have done this where Browser "A" is a version of Internet Explorer or a version of Netscape. This has been a huge time saver.

Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
ASP.NET Development
How to use jQuery to solve Javascript browser compatibility problems
How to write an out-of-browser Silverlight 3 application in 3 steps
Silverlight 3 beta SDK download lets developers try new RIA features
Visual Studio's IntelliSense for jQuery doesn't autocomplete correctly
Dundas Map for .NET kicks up geographic visualization
Return to CodePlex: Into the Sandcastle…
VBScript Tutorial
Use PHP with Visual Studio to create Web sites
Visual Studio Team System Add-ins: Conchango Scrum for Team System and Scrum Dashboard
Visual Studio 2008 and .NET Framework 3.5 SP1 introduces ADO .NET Entity Designer

Application Testing and Security
Test-driven development in .NET yields complete unit test coverage
How to write installers in Vista that work correctly under UAC
How to elevate programs' privileges correctly using Vista's UAC
Internet Explorer 8 beta's development tools add source visualizations
Microsoft previews new features in Visual Studio 2010
Advanced Windows Debugging Book Chapter and Podcast
Book excerpt: Advanced Windows Debugging
Book excerpt: Pragmatic unit testing in C# with NUnit
Security interoperability with .NET/WSE and WebLogic Workshop 8.1
How to avoid regression bugs while adding new features

.NET Framework security best practices
New features in Windows 7 bring new UI considerations for developers
Podcast: Windows CardSpace authors speak
Book excerpt: Java EE and .NET security interoperability
Book excerpt: Advanced Windows Debugging
Book excerpt: Pragmatic unit testing in C# with NUnit
Security interoperability with .NET/WSE and WebLogic Workshop 8.1
Windows Developments: Product news, December 2007
How to avoid regression bugs while adding new features
VB code: New additions, November 2007
VB code: Application security downloads

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
common test platform  (SearchWinDevelopment.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Database Programming Solutions - .NET XML, Visual Studio LINQ, ORM .NET
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts