Results 1 to 5 of 5

Thread: Best Way to Test Application?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    Best Way to Test Application?

    What in your opinion is the best method of testing an application? To make sure that on no occasion would it crash - that it would continue to function properly.

  2. #2
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497

    Re: Best Way to Test Application?

    Release it.
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    Re: Best Way to Test Application?

    Quote Originally Posted by Lord_Rat View Post
    Release it.
    That would not be a good idea as several companies will heavily rely on this product. So far from running the application on various test computers I have found no errors however I would not like to take the chance of something going wrong with my program when it is relied upon.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,302

    Re: Best Way to Test Application?

    Making sure an application doesn't crash and making sure there are no unexpected errors are two different things. A crash is an unhandled exception, so preventing a crash is as simple as ensuring that no exception goes unhandled. To do that, handle the AppDomain.UnhandledException event and, in WinForms app, the Application.ThreadException event. That will allow you to log any unexpected errors and shutdown gracefully.

    Preventing unexpected errors in the first place is a different thing altogether. It's very difficult to eliminate them altogether in software of any reasonable complexity. The only possible way to be sure is to test every single feature of the app under all possible circumstances, which is basically not possible.

    You can start by architecting your app in such a way as to make it unit-testable, and then cover as much of the code as you can with unit tests. You then need to actually run the finished product and make sure that it behaves as expected under as many different sets of circumstances as possible, both expected and unexpected, e.g. it's all well and good to make sure that the app can retrieve data from a database, but what if the network goes down and the database is unavailable?

  5. #5
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497

    Re: Best Way to Test Application?

    Noah, I was simply responding to the part "what's the best way to test an application" in that once you release it, your users inevitably find problems, no matter how well you feel you tested it yourself.

    Now, that's not to say that I recommend that you release code that you've barely glanced at and "feel good about" instead of testing. Testing is key, for sure.

    But in the end, users always manage to find ways to muck it up. =)
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width