Please enable JavaScript.
Coggle requires JavaScript to display documents.
J276/02 - Section 6 - Design, Testing and IDEs (Notes from Lesson (2.5 -…
J276/02 - Section 6 - Design, Testing and IDEs
-
Testing
-
-
Programming Errors can be Syntax ,Logic and Runtime Errors
Errors
SYNTAX ERRORS — when the computer doesn’t understand something you’ve typed as its not actual grammar of the programming language.
LOGIC ERRORS — when the compiler or interpreter is able to run the program, but the program does something unexpected.
RUNTIME ERRORS - program crashes or device runs out of memory, e.g. infinite loop.
Syntax errors can be diagnosed by compilers they’ll be unable to
turn the source code into machine code.
-
Logic errors are more difficult to diagnose and track down Logic errors are found through general use of the program and by systematically testing it, compilers won't pick them up.
-
-
-
Notes from Lesson
Defensive Design
-
-
1) Identify possible misuse, e.g. intentional, malicious or accidental (giving wrong data) - brute force, SQL injection.
Maintainability
Reasons why
Error, add or improve, update, debug, tests show possible misuse.
-
Types of testing
Iterative testing - testing as you create, e.g. turning a guitar
-
Errors
Syntax - rules, grammar, spellings, compiler doesn't understand - unable to turn source into machine code.
Logic - program will run but unexpected output, e.g. wrong output.
Runtime error - program crashes or device runs out of memory, e.g. infinite loop.
Test data
Use a range of data.
-
-
-
Invalid, e.g. put text into a number field
-
Out of range, e.g. Year 2 or Year 22
-
-
Characteristics
-
Interpreter
-
-
Reads the source code and translate at one line at a time. If there are no errors it mores to the next line if not then it stops
-
-
-
-