ECS 36A Lecture Notes - Lecture 19: Airbus A400M Atlas, Functional Testing, Valgrind
156 views3 pages
Published on 29 Nov 2018
School
Department
Course
Professor

ECS 36A - Lecture 19 - Testing and Debugging
Software testing -- process to make sure the actual outputs of a program match the expected
results,lets you check for bugs
● Software bugs can and have caused tragic accidents in real life, such as
○ Airbus A400M plane crash (May 2015)
○ False NORAD report that the US was under missile attack
Functional testing
- Program is tested against functional specifications
- Basic and common method: feed input and examine outputs
Hierarchy of Functional testing
Unit Testing -- individual units/components (basic functions)
Integration Testing -- individual units are combined (logical functions/classes)
System Testing -- complete & integrated software is tested (whole program)
Acceptance Testing -- if system is ready to be released for others to look at
Testing applied to ECS 36A Homework 2: Tips on writing good test case
1) Check if tokenizer can handle unusual cases ( translate 100 100 )
2) Works with single command or not (line X0 Y0 X1 Y1)
3) Single command and single transformations (translate X Y)(line X0 Y0 X1 Y1) -- test all
possible scenarios and test cases
4) Test single commands and multiple translations (translate X Y)(rotate X)(line X0 Y0 X1
Y1)
5) Testing software with big testcases -- inputs of 20-30 lines
● Start with basic test cases to test the bare functionality(Unit Testing) of your program
and then work to more complex cases that eventually test more and more different parts
of the program together
Non-Functional Testing
- Checks for non functional aspects (performance , usability, reliability)
~Usability and Reliability are mainly for when a program will be made public and possibly
handled by people with varying levels of programming experience (want to make it easier to
read and understand so it can be improved upon by others) ~
Debugging
-- look for the errors that cause a program to crash
Print Debugging
-- traces the flow of the software
● Done with tools like Valgrind & GDB