Unit 3 of 4 · BCA Sem 3

Unit 3: Design and testing

Software Engineering notes · PTU syllabus (UGCC2514)

3 min read5 topics10 exam questions
On this page
  1. Unit summary
  2. Design process and design concepts
  3. Software architecture and data design
  4. UML diagrams
  5. Testing strategies and techniques
  6. Product metrics
  7. Key terms
  8. Quick revision
  9. Important questions

Unit summary

Design turns requirements into a blueprint for code, and testing checks that the code actually works. This unit covers design concepts and quality, software architecture, data design, the main UML diagrams, testing strategies, black-box and white-box testing, debugging, and product metrics.

After this unit you can

  • Explain the design process, design concepts and quality attributes
  • Draw and explain use case, class, sequence, collaboration and component diagrams
  • Apply testing strategies and black-box and white-box techniques
  • Use product metrics for analysis, design, code, testing and maintenance

PTU syllabus topics

  • Design process and quality
  • design concepts and model
  • software architecture
  • data design
  • class/sequence/collaboration/use case/component diagrams
  • testing strategies
  • black-box and white-box testing
  • validation and system testing
  • debugging
  • product metrics for analysis
  • design
  • source code
  • testing and maintenance
HierarchyLevels of testing
  1. Acceptance testing

    Users confirm it meets their needs

  2. System testing

    The whole system against requirements

  3. Integration testing

    Modules working together

  4. Unit testing

    Individual functions or classes

1

Topic 1

Design process and design concepts

Design quality guidelines: a design should implement all requirements, be readable and understandable, and give a complete picture of data, functions and behaviour.

Key termsFundamental design concepts
Abstraction
Focus on essentials, hide detail
Architecture
Overall structure of components
Modularity
Divide software into separately named modules
Information hiding
Modules hide internal details
Functional independence
High cohesion, low coupling
Refinement
Step-wise elaboration of detail

Exam tip

High cohesion (each module does one thing well) and low coupling (modules depend little on each other) is the mark of good design.

2

Topic 2

Software architecture and data design

Software architecture is the structure of a system: its components, their properties and relationships. Common styles: data-centred, data-flow (pipe and filter), call-and-return, layered, object-oriented and client-server. Data design turns the data model from analysis into data structures and database designs.

3

Topic 3

UML diagrams

DiagramShows
Use case diagramActors and the functions (use cases) they use
Class diagramClasses, attributes, operations and relationships
Sequence diagramMessages between objects in time order
Collaboration (communication) diagramObject interactions, focusing on links
Component diagramPhysical software components and their interfaces

Example

Use case diagram for a library: actors Student and Librarian; use cases Search Book, Issue Book, Return Book, Pay Fine.

4

Topic 4

Testing strategies and techniques

ProcessTesting strategy (from small to large)
  1. 1Unit testing

    Individual modules

  2. 2Integration testing

    Modules combined: top-down or bottom-up

  3. 3Validation testing

    Against requirements: alpha and beta

  4. 4System testing

    Recovery, security, stress, performance

ComparisonBlack-box vs white-box testing
Black-box
White-box

Based on

Specifications

Internal code

Techniques

Equivalence partitioning, boundary value analysis

Basis path testing, statement and branch coverage

Done by

Testers, users

Developers

Finds

Missing or wrong functions

Logic and path errors

Cyclomatic complexity V(G) = E − N + 2 (edges − nodes + 2) gives the number of independent paths to test. Debugging finds and fixes the cause of a failure, using brute force, backtracking or cause elimination.

5

Topic 5

Product metrics

Metrics measure software quality: analysis model (function points), design model (coupling, cohesion, depth of inheritance), source code (LOC, Halstead metrics), testing (test coverage, defects found) and maintenance (Software Maturity Index).

Key terms

Cohesion
How closely the functions within a module belong together
Coupling
How much modules depend on each other
Use case
A sequence of actions giving a result to an actor
Black-box testing
Testing based on specifications, not code
Cyclomatic complexity
The number of independent paths in a program

Quick revision

  • Good design: high cohesion, low coupling.
  • UML: use case, class, sequence, collaboration, component.
  • Unit → integration → validation → system testing.
  • V(G) = E − N + 2.

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

  1. Q1.Differentiate between cohesion and coupling.
  2. Q2.What is information hiding?
  3. Q3.What does a sequence diagram show?
  4. Q4.Differentiate between black-box and white-box testing.
  5. Q5.What is boundary value analysis?
  6. Q6.Define cyclomatic complexity.

Long-answer questions

  1. Q1.Explain the fundamental design concepts in software engineering.
  2. Q2.Draw a use case diagram and a class diagram for an online shopping system.
  3. Q3.Explain software testing strategies from unit to system testing.
  4. Q4.Explain black-box and white-box testing techniques with examples.

Stuck on this unit?

Message SBS on WhatsApp for help with Software Engineering, or to ask about studying BCA at Synetic.

WhatsApp us