Software Testing :-
किसी Program या Software को जाँचने की प्रक्रिया ताकि यह सुनिश्चित किया जा सके कि वह सही तरीके से कार्य कर रहा है और अपेक्षित परिणाम दे रहा है।
English:
Software Testing is the process of checking a program or software to ensure that it works correctly and produces the expected output.
उद्देश्य (Objectives)
Errors/Bugs ढूँढना
Software की Quality बढ़ाना
सही Output सुनिश्चित करना
Types of Errors (त्रुटियों के प्रकार) :- 1. Syntax Error (सिंटैक्स त्रुटि) 2. Runtime Error (रनटाइम त्रुटि) 3. Logical Error (लॉजिकल त्रुटि)
1. Syntax Error (सिंटैक्स त्रुटि)
जब Program लिखते समय Programming Language के नियमों (Syntax Rules) का पालन नहीं किया जाता, तब Syntax Error होती है।
English:
Occurs when the rules of the programming language are violated.
Example (Python)
Error:
SyntaxError: expected ':'
कारण:
if statement के बाद Colon (:) नहीं लगाया गया है।
सही Program (Correct Program)
if x > 5:
print("Hello")
मुख्य बिंदु:
Compile/Interpret समय पर मिलती है।
Program Run नहीं होता।
पहचानना आसान होता है।
2. Runtime Error (रनटाइम त्रुटि):-
जब Program सही तरीके से Compile/Interpret हो जाता है लेकिन चलाते समय (Execution Time) कोई त्रुटि उत्पन्न होती है, तब उसे Runtime Error कहते हैं।
English:
A Runtime Error occurs during the execution of a program after it has been successfully compiled/interpreted.
Example
a = 10
b = 0
print(a / b)
Error:
ZeroDivisionError: division by zero
कारण:
किसी संख्या को 0 से divide नहीं किया जा सकता।
मुख्य बिंदु:
Program शुरू हो जाता है।
Execution के दौरान रुक सकता है।
Error Message दिखाई देता है।
print(x)
output- NameError: name 'x' is not defined
Variable x को पहले Define नहीं किया गया।
3. Logical Error (लॉजिकल त्रुटि)
जब Program बिना किसी Error के सफलतापूर्वक Run हो जाता है, लेकिन गलत परिणाम (Wrong Output) देता है, तब उसे Logical Error कहते हैं।
English:
A Logical Error occurs when a program runs successfully but produces an incorrect output.
Example :-