Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Scientific method and testing

 
Greenhorn
Posts: 2
Android Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I wat to know Your opinion about using Scientific method in testing and debugging. Is it only correct way? What do you think about intuitive approach?

regards,
Maciej Sawicki
 
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is your opinion on either of them?
 
author & internet detective
Posts: 40913
840
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maciej,
While an empirical approach is very thorough, it often isn't possible. For example, suppose you write a function to find the factorial of a number. Can you test all the values? Of course not, you'd be there forever. What you can do is test different equivalence classes of inputs so you test all the logic.
 
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Think of testing as approaching the problem from many different angles. For instance:

Unit testing: making sure the code does what the programmer though it should
Functional testing: making sure a feature works as expected. Think: login, add to cart, or search as features.
Integration testing: making sure sets of features work together. "Bob logs in, adds three widgets to his cart, checks out, and chooses express delivery".
Performance testing: making sure the app responds within an agreeable, and industry comparable timeframe.
Security testing: ensuring the application doesn't expose sensitive data, protects against XSS, SQI, etc.
Lateral testing: testing with non-standard data, locking accounts and seeing what info you can get, trying to retrieve data from rendered source code or log files.

The important thing to remember is that you don't have to approach every problem from every angle on every project. Well tested code = an intelligent idea about the product quality. Untested/poorly tested code = guessable product quality.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic