Program Testing in c language in hindi , प्रोग्राम टेस्टिंग क्या है कैसे करते है कि प्रोग्राम सही है या नहीं

प्रोग्राम टेस्टिंग क्या है कैसे करते है कि प्रोग्राम सही है या नहीं , Program Testing in c language in hindi :-
Program Testing और debugging का मतलब है किसी प्रोग्राम से error को पहचाना और हटाना जिससे की प्रोग्राम सभी condition मे desired आउटपुट दे सके |सभी प्रोग्रामर को ये बात assure कर देनी चाहिए की प्रोग्राम सभी condition मे perfect आउटपुट दे रहा है |इसलिए किसी प्रोग्राम को error free बनाने के लिए ,error को detect ,isolate और correct करना जरुरी है |
Types of Error
हमने इससे पहले के अर्तोइक्ले मे कई common error को पढ़ा |लेकिनं इसके अलावा कई दूसरी error भी होती है जिसे सही करना जरुरी होता है |इस्लौये सभीerror को चार भागो मे बाटा गया  है :-
1. Syntax Error
किसी भी computer language के rules मे violation से syntax error generate होती है |Compiler in error को डिटेक्ट और isolate करता है |जब भी किसी प्रोग्राम मे error डिटेक्ट होती है ,compiler प्रोग्राम के execution को terminate कर देता है और सभी error की एक लिस्ट बना देता है |और ये लिस्ट error की position को होल्ड करता है |लेकिन कई बार ये line number (error position) सही नहीं होती है इसलिए प्रोग्रामर को खुद ही syntax error को ढूढ़ कर सही करनी होती है |
एक syntax error कई दूसरी syntax error को generate कर देती है |
2. Run time Error
किसी भी variable के data type मे mismatch और array मे out of range जैसी error को compiler डिटेक्ट नहीं कर पाता है |इस्लोइयुए प्रोग्राम execute हो जाता है लेकिन errornous आउटपुट देता है |इस प्रकार की error को run time error कहते है |इस प्रकार की error को isolate करना बहुत मुश्किल होता है |
3. Logical Error
ये error किसी प्रोग्राम के लॉजिक से related होता है |इन error मे ,प्रोग्राम का execution गलत होना या किसी operator मे operator के precendence को ध्यान मे न रखना मुख्य है |ये error show नहीं होती है |अतः प्रोग्राम
run जाता है errornous आउटपुट देता है |in error का मुख्या कारण होते है :-
1. Poor Understanding of logic
2.Wrong inter petition of algorithm into program
3.Operator precedence का lack of knowledge
4. latent error
ये एक hidden error होती जो की किसी particulate data के कारण generate होती है |जैसे
int div=124/(a-b);
इस statement tab होगी जब a और b की value सामान  होगी |
Program Testing
Testing एक एसी प्रोसेस होती है जिसमे किसी प्रोग्राम को reviewing और executing करने के लिए error को पहचाना और सही करना |किसी प्रोग्राम को syntax error को तो  पहचाना जा सकता है लेकिन run-time और logical error को पहचाना मुश्किल होता है |इस प्रोसेस मे ,सभी method को include किया जाता है जिससे सभी error को पहचाना जा सकता है |इसमें दो प्रकार की method होते है :-
1. Human Testing 
ये सबसे effective method होता है जो computer based testing से पहले execute होता है |इस method मे निन्म कार्य include होते है :-
1.Code का programmer द्वारा inspection करना |
2.code का किसी group द्वारा inspection करना |
3.किसी peer group द्वारा review देना |
Testing मे ,किसी code के statement wise statement  analysis होता है | इसके अलावा programming style और algorithm को भी review किया जाता है |
2. Computer based testing
computer based testing दो stages को include करता है :-
Compiler Testing:ये इन दोनों testing मे सबसे आसन होती है|इसमें एसी syntax error को find किया जाता है जो human testing मे नहीं पहचाना जा सकता है |जब कोई भी error डिटेक्ट नहीं होती तब प्रोग्राम execute हो जाता है |
Runtime Testing :run time error testing,run time error message जैसे stack overfull और null pointer assignment आदि देते है |अगर प्रोग्रम मे ये error नहीं होती तब प्रोग्राम execute होगा लेकिन आउटपुट का correct होना जरुरी नहीं है |इसके लोइए comparsion किया जाता है real आउटपुट और  coming आउटपुट मे |
programming testing  modules मे हो सकती है |इसमें किसी प्रोग्रम को छोटे छोटे  modules मे divide कर दिया जाता है | इन  modules को check किया जाता है |जब तक check किया जाता जब तक  modules error free न हो जाये |
जब सभी modules यूनिट test हो जाते है तब in सभी  modules को integrated कर दिया जाता है |लेकिन integration मे data mismatching भी हो सकता है इसलिए last मे integration test हो सकता है |
Program Debugging
Program Debugging का मतलब है किसी प्रोग्रम मे error को isolate और correct करना |
Program Debuggingका simple method है print statement को पुरे प्रोग्राम मे जगह जगह पर लिखना जिससे की हमे सभी variable की value का पता हो |इस method से से हम प्रोग्राम के various stage मे ,वरिअबेल को compare कर सके|जबब हमे किसी statement मे error मिले तब in error को हटा कर,debugging statement को हटा देगे |
दूसरा method है deduction |इस प्रोसेस मे error की location तक elimination और refinement process से debuging कर सकते है |इसमें सभी error की possible कॉज की एक लिस्ट use होती है |
तीसरा method backtracking होता है |इस method मे incorrect error को ट्रैक किया जाता है जब तक की logic मे error find नहीं हो जाती है |
इस प्रकार मे किसी प[रोग्राम को बनाने के बाद ,आप error को पहचान कर use हटाकर error free बना सकते है |