Unit 3: Testing tools and object-oriented testing
Software Testing and Quality Assurance notes · PTU syllabus (BSIT602)
On this page
Unit summary
Tools multiply testers' productivity, and object-oriented software needs its own test strategies. This unit covers comparative evaluation of testing tools, dynamic analysis tools, test data generators, debuggers and test drivers, technical metrics for analysis, design, testing and source code, object-oriented testing strategies, test case design and interface testing.
After this unit you can
- Compare categories of testing tools
- Explain dynamic analysis tools, test data generators, debuggers and drivers
- Apply technical metrics
- Test object-oriented software and interfaces
PTU syllabus topics
- Comparative evaluation of testing tools
- dynamic analysis tools
- test data generators
- debuggers
- test drivers
- technical metrics for software (analysis, design, testing, source code)
- object-oriented testing strategies
- test case design
- interface testing
- Equivalence partitioning
- Test one value from each input class
- Boundary value analysis
- Test at and around the edges
- Statement coverage
- Every line runs at least once
- Branch coverage
- Every decision true and false
- Regression testing
- Re-test after changes
Topic 1
Comparative evaluation of testing tools
Test management
Plan tests, track execution and requirements
TestRail, Zephyr, Azure Test Plans
Functional and UI automation
Record or script user actions
Selenium, Playwright, Cypress, Appium
Unit testing frameworks
Automate developer tests
JUnit, PHPUnit, pytest, NUnit
Performance and load
Simulate many users
JMeter, LoadRunner, k6
Static analysis
Inspect code without running it
SonarQube, ESLint, Checkstyle
API testing
Test web services
Postman, REST Assured
Defect tracking
Log and manage defects
Jira, Bugzilla
- Fit
- Supports your technology and test levels
- Cost
- Licence, training, maintenance — open source vs commercial
- Ease of use
- Learning curve, scripting language
- Integration
- CI/CD pipelines, defect tracker, version control
- Reporting
- Clear results and dashboards
- Vendor and community support
- Updates, documentation
Topic 2
Dynamic analysis tools
- Static analysis examines code without executing it; dynamic analysis observes the program while it runs.
- Coverage analysers
- Measure statements and branches executed — JaCoCo, gcov
- Memory analysers
- Detect leaks and invalid access — Valgrind, AddressSanitizer
- Profilers
- Find time and resource hot spots — VisualVM, perf
- Run-time monitors
- Watch threads, assertions and exceptions in execution
Topic 3
Test data generators, debuggers and test drivers
Test data generator
Creates input data — random, from specifications, or by path analysis
Faker libraries; database seeders; fuzzers
Debugger
Runs code step by step with breakpoints, watches and call stacks to locate faults
GDB, IDE debuggers
Test driver
Calls the unit under test with inputs and checks results
JUnit test class
Stub
Stands in for a called module not yet ready
Mock objects — Mockito
Topic 4
Technical metrics for software
Analysis model metrics
Size and functionality from requirements
Function points, number of use cases
Design model metrics
Structure and complexity of design
Fan-in and fan-out, coupling, cohesion, depth of inheritance tree, CK metrics suite
Source code metrics
Code size and complexity
LOC, Halstead length and volume, cyclomatic complexity
Testing metrics
Effectiveness and progress of testing
Test coverage, tests passed, defects found per test hour
Program length
N = N1 + N2 (total operators and operands)
Vocabulary
n = n1 + n2 (distinct operators and operands)
Volume
V = N × log₂ n
Topic 5
Object-oriented testing strategies
- OO features change testing: the smallest testable unit is the class; encapsulation hides state; inheritance means inherited methods must be retested in the new context; polymorphism multiplies possible behaviours.
- 1Class (unit) testing
Test operations and state behaviour of each class
- 2Integration testing
Thread-based (classes for one input or event) or use-based (independent classes first, then dependent)
- 3Cluster testing
Collaborating classes together
- 4Validation testing
Use cases and user-visible behaviour
- 5System testing
Whole system with recovery, security, stress tests
Topic 6
Object-oriented test case design
- Fault-based testing
- Design tests for plausible faults
- Scenario-based testing
- Derive tests from use cases and user tasks
- Random testing of a class
- Random valid sequences of operations — open, deposit, withdraw, close
- Partition testing
- Group operations by state, attributes or category
- Inter-class testing
- Test messages among collaborating classes
- State-based testing
- Exercise every state transition from the state diagram
Example
Account class sequence tests: open → deposit → withdraw → balance → close; also invalid sequences such as withdraw before deposit, to check that exceptions are raised.
Topic 7
Interface testing
- Interface testing checks that modules, classes, APIs and systems exchange data correctly.
- Interface misuse
- Wrong parameter type or order — test every call
- Interface misunderstanding
- Wrong assumptions about behaviour — test boundaries and empty inputs
- Timing errors
- Producer and consumer at different speeds — test delays and concurrency
- API testing
- Check status codes, response data, error handling — Postman
- User interface testing
- Navigation, validation messages, accessibility
Key terms
- Dynamic analysis
- Analysing a program while it executes
- Test data generator
- Tool that creates inputs for testing
- Debugger
- Tool for stepping through code to locate faults
- Halstead metrics
- Metrics based on counts of operators and operands
- Interface testing
- Testing data exchange between components
Quick revision
- Tool categories and selection criteria.
- Coverage analysers, memory analysers, profilers.
- Test data generators, debuggers, drivers and stubs.
- Analysis, design, code and testing metrics; Halstead.
- OO testing strategy; fault-based, scenario-based, random, partition, state-based tests; interface testing.
Important exam questions
Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).
Short-answer questions
- Q1.Distinguish static and dynamic analysis.
- Q2.Name two test automation tools.
- Q3.What is a test driver?
- Q4.Define Halstead volume.
- Q5.Why must inherited methods be retested?
- Q6.What is interface misuse?
Long-answer questions
- Q1.Explain the categories of testing tools and how to evaluate them.
- Q2.Explain dynamic analysis tools, test data generators, debuggers and drivers.
- Q3.Explain technical metrics for software.
- Q4.Explain object-oriented testing strategies and test case design.
Stuck on this unit?
Message SBS on WhatsApp for help with Software Testing and Quality Assurance, or to ask about studying B.Sc IT at Synetic.
