Phases of Computer Program Development
- Phase 1: Understand the problem
- Phase 2: Design an algorithm to solve the problem
- Phase 3: Write the program code in appropriate language based on the algorithm
- Phase 4: Enter the program and save
- Execute the program
- Test the program, find errors and debug, then restest
- Document and evaluate the program
Programming Structures
Sequential structure: Top-down execution Decision structures: if/then/else Iterative (Looping):
- while loop: continue looping as long as something is true
- repeat/until loop: continue looping until something is true
- for loop: loop a given number of times
Recursive structures:
Two classic programming/database problems
Sorting: Descending order/Ascending order
- Sorting numbers
- Sorting strings (in accordance with ASCII values)
Searching: Find specific data that meet a certain criteria
In database:
- Filters: temporary search
- Queries: search criteria are saved so they don't have to be recreated
Two popular search techniques:
Sequential search: search from top to bottom or bottom to top, one item at a time Binary search:
- Only works if data is SORTED first
- Start in the middle, then go to half of that, etc.
Two classic program goals:
Efficiency: Program takes minimal time and/or resources Correctness: Program runs in expected ways and works for all expected conditions
Software testing and verification
Kinds of tests:
- Acceptance testing: Verifying whether the whole system works as intended
- Integration testing: Ensuring that software components or functions operate together
- Unit testing: Validating that each software unit performs as expected. A unit is the smallest testable component of an application
- Functional testing: Checking functions by emulating business scenarios, based on functional requirements. Black-box testing is a common way to verify functions
- Performance testing: Testing how the software performs under different workloads. Load testing, for example, is used to evaluate performance under real-life load conditions
- Stress testing: Testing how much strain the system can take before it fails. Considered to be a type of non-functional testing
- Usability testing: Validating how well a customer can use a system or web application to complete a task
Software testing is done to detect:
- Architectural flaws
- Poor design decisions
- Invalid or incorrect funtionality
- Security vulnerabilities
- Scalability issues
Testing best practices:
- Continous testing
- Configuration management
- Service virtualization
- Defect or bug tracking
- Metrics and reporting
From:"IBM What is software testing?"
|