12 Replies - 1976 Views - Last Post: 22 July 2009 - 04:32 AM

#1 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 774
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

How do you test your software?

Post icon  Posted 05 July 2009 - 02:37 PM

Every developer that respects his job and wants to deliver high quality products, tests his/her creation before releasing it.

So the question is - how do you guys, developers (and maybe we even have qualified testers here), test your software?

First of all I am testing the program by trying to insert invalid values and values that could potentially cause errors. If it works fine after this, I am usually testing the software modules for functional problems (I split every program, if it is a complex one, in separate modules) by just releasing them among my friends and (started recently to increase feedback) publish some of them here on DIC. Besides I am also testing my modules on different machines with different configurations (both hardware and software) to see if it is compatible with different computers. Since I am an independent developer, I am trying to balance time for testing and development, so one won't affect another.

What's your story?

Is This A Good Question/Topic? 0
  • +

Replies To: How do you test your software?

#2 chris772  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 190
  • Joined: 13-March 09

Re: How do you test your software?

Posted 06 July 2009 - 11:20 AM

I'm mostly a hobby programmer so I don't do a lot of testing unless I am working for a client. When I do however, I try to make it work first and test every piece of the code possible for errors/bugs. After that I try to break the program and cause an error/expose a bug. After I've found a few bugs I write in a safeguard or change the code or do whatever is needed to fix it.

edit: Also if I'm making an application for multiple operating systems I test on my other machine or in a VM.

This post has been edited by chris772: 06 July 2009 - 11:22 AM

Was This Post Helpful? 0
  • +
  • -

#3 Darkhack  Icon User is offline

  • D.I.C Head

Reputation: 36
  • View blog
  • Posts: 208
  • Joined: 25-November 08

Re: How do you test your software?

Posted 10 July 2009 - 11:28 AM

I do what most developers do. Test inputs with valid inputs and then invalid. It gets boring sometimes because there can be so many cases. I also do lots of printf() statements to be sure I have the right value at each step of the algorithm. And lastly, I'll run it through valgrind or mtrace to check for leaks or errors. I actually don't use a debugger at all.

Of course that is only hypothetical as I always right perfect code the first time and testing isn't necessary. ;-)
Was This Post Helpful? 0
  • +
  • -

#4 Kanvus  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 42
  • View blog
  • Posts: 452
  • Joined: 19-February 09

Re: How do you test your software?

Posted 11 July 2009 - 03:53 PM

i do what most penguins do. run it on vista. if it works then u r god
Was This Post Helpful? 0
  • +
  • -

#5 Zerobu  Icon User is offline

  • Black Hatter

Reputation: 13
  • View blog
  • Posts: 1,822
  • Joined: 14-January 08

Re: How do you test your software?

Posted 11 July 2009 - 04:44 PM

Well, I try a number, of test cases to crash it. If it doesn't crash, then i must have done a good job.
Was This Post Helpful? 0
  • +
  • -

#6 Premier2k  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 180
  • Joined: 26-August 08

Re: How do you test your software?

Posted 17 July 2009 - 01:24 PM

I'm a qualified software tester (ISEB), and the testing you would do (and amount of) would depend on the type of application. Our company develops IT Governance software, we audit client machines and return hardware and software audits.

So one part would be testing software recognition, i would potentially install different apps and check the the client returns version numbers and manufacturers correctly for example.
Other parts include the GUI, where we can check that what happens if a license expires or the number of clients exceeds the number of licenses purchased. How has the developer controlled that?
Sometimes I can spend an entire day installing the application on different platforms with different combinations of databases, both local and remote, then, what happens if it's an upgrade?

The first thing I do when I get a build is spend a day using the software as an end user, just play with it. Then start thinking, what if? What happens if I enter a letter instead of a number where a number is expected?

The other thing I look out for is labels that tell me to do a specfic task, for example "Clicking back will cancel your entry", so I look at that and enter some stuff and then click Back and then Next again, does it clear it? It should do! (Often it doesn't ;-) )

I think the biggest tip I can give is to start off using your application like you would expect it to be used, then start thinking outside the box!

Hope that helps!

Premier2k
Was This Post Helpful? 0
  • +
  • -

#7 wildgoose  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 67
  • View blog
  • Posts: 468
  • Joined: 29-June 09

Re: How do you test your software?

Posted 17 July 2009 - 01:41 PM

Each function (especially math) has a test function to test proper and improper cases. I almost always single-step the function to make sure it is doing exactly what I thought I was programming for to make sure it is doing as expected!

If writing assembly code, I write it in C first, then in assembly, then using the same test code, run them both and compare the results. A mismatch indicates a problem!
Was This Post Helpful? 0
  • +
  • -

#8 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 774
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

Re: How do you test your software?

Posted 17 July 2009 - 01:46 PM

@Premier2k & wildgoose - Those are indeed some interesting testing methods. How much time do you guys spend on testing, compared to the overall time spent on the solution development?
Was This Post Helpful? 0
  • +
  • -

#9 wildgoose  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 67
  • View blog
  • Posts: 468
  • Joined: 29-June 09

Re: How do you test your software?

Posted 17 July 2009 - 04:16 PM

Code is an investment. I choose to test my code on the front end of a project. Most programmers I know do an inital pass, rubber stamp it, then spend lots of time on the backend of the project finding wierd bugs.

I prefer knowing I have rock solid code and thus I'm sure the problem is 99.999% elsewhere! But occasionally you do need to double-check things like assertions and debug checks as quite often there'll be a wizenheimer programmer thinking he's doing everyone a favor by turning of the assertion checking because it keeps breaking the application.

Years ago I used to write test code, test, the delete it. I stopped doing that about ten years ago. Now its on a compile switch but out of the way so as not to be an eyesore, but still available if needed without wasting time rebuilding it from scratch.

This post has been edited by wildgoose: 17 July 2009 - 04:18 PM

Was This Post Helpful? 0
  • +
  • -

#10 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1638
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: How do you test your software?

Posted 17 July 2009 - 04:34 PM

I use NUnit extensively. It's a great software testing framework and makes unit testing much simpler than running hypothetical tests all day.
Was This Post Helpful? 0
  • +
  • -

#11 Tom9729  Icon User is offline

  • Segmentation fault
  • member icon

Reputation: 180
  • View blog
  • Posts: 2,641
  • Joined: 30-December 07

Re: How do you test your software?

Posted 17 July 2009 - 05:18 PM

Depends what I'm working on. For Dagger I write examples that double as tests. The downside is that all of the examples compiling does not mean that they all work. I'm looking into some kind of unit testing (like JUnit).
Was This Post Helpful? 0
  • +
  • -

#12 Aeternalis  Icon User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 291
  • Joined: 13-July 09

Re: How do you test your software?

Posted 20 July 2009 - 01:26 PM

NUNIT is my employers choice of testing suites.. it seems to be a great framework. There are versions of this for other languages like C++, java, etc.. each one has its own similar framework. Testing is such an important part of software development that our code is 100% unit tested and then 100% integration tested.

We are actually considering moving to the Test Driven Design model. There is a great article on that in the MSDN Magazine June issue here.

IMO test is the least discussed issue of software development on sites like this.. I would love to hear more about it here.

Aeternalis
Was This Post Helpful? 0
  • +
  • -

#13 prajayshetty  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 31
  • View blog
  • Posts: 920
  • Joined: 27-April 07

Re: How do you test your software?

Posted 22 July 2009 - 04:32 AM

i test by using number of printf statements well if it works well then i later remove those statements
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1