The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Software Testing >> Unit Testing

Pages: 1
rahulonline
Newbie


Reged: 02/05/11
Posts: 2
Unit testing testing of C file
      #659370 - 02/05/11 11:20 PM

Hello,

I have developed a C file.
I want to do unit testing of my C file.
Can you please give me any proposal how to do this.
I want to provide input values and expected output values.
Can you please provide me required code which will run my C file and calculate actual output values,also it will compare actual output values, obtained from the c file, with
the expected output value provided by user.


Post Extras: Print Post   Remind Me!   Notify Moderator  
RichardK
Newbie


Reged: 02/14/11
Posts: 1
Re: Unit testing testing of C file [Re: rahulonline]
      #660554 - 02/15/11 02:25 AM

First, what is the purpose of your testing?
  • test that your code meets its defined requirements
  • test the robustness of your code
  • test because you need to (standards compliance or maybe your boss told you!)
  • create a test to 'baseline' the code to ensure that future changes do not break the existing functionality.

In all these cases you need to
  • set input data
  • call the software under test
  • and optionally check that the output data is correct


In the last case, the 'baseline' test case, there are tools available to help automate this. By hand you can write the tests and then update the checks on the expected data to make them pass before modifying the code and re-running the test to confirm it still works as expected.

--------------------
Testing Products Support and Development manager at IPL, developing Cantata++ - C/C++ testing tool and AdaTEST - Ada/Ada95 testing tool.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:  AJ, Jeanj 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 2362

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5