Quality Assurance II

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/41

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

42 Terms

1
New cards

What is White Box Testing?

Also called clear box or glass box testing. Testers must understand internal structure and logic of the software.

2
New cards

What are White Box Testing Techniques?

1. Code Coverage: Ensure every method, statement, or instruction is executed at least once.

2. Logic Path / Decision Point Coverage:└ Branch coverage - all if/else paths taken

└ Path coverage - all execution paths are tested

3. Mutation Testing: Introduce small code changes (mutants) and ensure tests detect them (kill the mutants).

3
New cards

What are Coverage Methods?

- Function Coverage: Has each function been called?

- Statement Coverage: Has each statement been executed?

- Decision Coverage: Have all decision outcomes been executed?

- Condition Coverage: Have all Boolean expressions evaluated both true and false?

- Branch Coverage: Each branch executed at least once

- Loop Coverage: Has each loop executed 0, 1, >1 times?

- Path Coverage: Has every possible route through code been executed?

4
New cards

Statement Coverage Example?

knowt flashcard image
5
New cards

Decision Coverage Example?

knowt flashcard image
6
New cards

Branch Coverage

knowt flashcard image
7
New cards

What is Mutation Testing?

- Run test suite, confirm software works

- Generate mutants by altering code

- Run test suite against mutants

- If output differs, mutant is killed (test caught issue)

If output same, test suite is inadequate

8
New cards

Regression Tests

Ensure no new bugs after changes- Often automated; require proper versioning

9
New cards

What is Integration Testing?

The entire system is viewed as a collection of subsystems (sets of classes) determined during the system and object design.

Goal: Test all interfaces between subsystems and the interaction of subsystems

<p>The entire system is viewed as a collection of subsystems (sets of classes) determined during the system and object design.</p><p>Goal: Test all interfaces between subsystems and the interaction of subsystems</p>
10
New cards

Bottom-up Integration

• The subsystems in the lowest layer of the hierarchy are tested individually first

• Then the next subsystems are tested that call the previously tested subsystems

• This is repeated until all subsystems are included

• Drivers are needed

<p>• The subsystems in the lowest layer of the hierarchy are tested individually first </p><p>• Then the next subsystems are tested that call the previously tested subsystems</p><p> • This is repeated until all subsystems are included </p><p>• Drivers are needed</p>
11
New cards

Top-down Integration

• Test the top layer or the high-level subsystem first

• Then, combine all the subsystems that are called by the tested subsystems and test the resulting collection of subsystems

• Do this until all subsystems are incorporated into the test

• Stubs are needed to do the testing.

<p>• Test the top layer or the high-level subsystem first </p><p>• Then, combine all the subsystems that are called by the tested subsystems and test the resulting collection of subsystems </p><p>• Do this until all subsystems are incorporated into the test </p><p>• Stubs are needed to do the testing.</p>
12
New cards

What is System Testing?

Test complete system against requirements. Includes both functional and non-functional requirements (e.g., GUI, stress, compatibility)

13
New cards

Smoke vs. Sanity Testing?

- Smoke Test: Basic build checks

Sanity Test: Narrow, focused testing on new changes

<p>- <strong>Smoke Test:</strong> Basic build checks</p><p> <strong>Sanity Test:</strong> Narrow, focused testing on new changes</p>
14
New cards

Acceptance Testing Types?

• Goal: Demonstrate system is ready for operational use

• Written, conducted and evaluated by the customers

- Alpha: Client tests in developer's environment with dev support

- Beta: Client tests in real environment without dev present

15
New cards

What is Non-Functional Testing?

Testing qualities beyond features, such as performance and scalability

<p>Testing qualities beyond features, such as performance and scalability</p>
16
New cards

Types of Non-Functional Testing?

- Stress Testing: to determine the breakpoint (both data and users)

- Load Testing: Measure performance based on a large number of users

- Volume Testing: Test what happens if large amounts of data are handled

- Configuration Testing: Test the system with each one of the supported software and hardware configurations

- Compatibility Testing: Evaluate the application's compatibility within different environments

17
New cards

Test Design Stages?

1. Test Strategy

2. Test Planning

3. Test Case Design

4. Test Procedure

18
New cards

What is a Test Strategy?

a statement of the overall approach to testing for a software development organization.

Specifies the levels of testing to be done as well as the methods, techniques and tools to be used

19
New cards

What is a Test Plan?

specifies in detail how the test strategy will be carried out for the project.

Specifies items to be tested, levels, order, environment.

20
New cards

What is Test Case Design?

A set of test inputs, execution conditions, and expected results developed for a particular objective, such as to exercise a particular program path or to verify compliance with a specific requirement.

Test cases are specified separately at each level: unit, integration, system and acceptance

21
New cards

Test Case Anatomy?

ID, title, related requirement, module, priority, steps, data, expected/actual result, pass/fail status, author, last run, bug ID

22
New cards

Example Test Cases?

knowt flashcard image
23
New cards

Test Procedure

final stage of test design is the test procedure, which specifies the process for conducting test cases

includes the use of

• test harnesses (programs written solely to exercise the software or parts of it on the test cases),

• test scripts (automated procedures for running sets of test cases), or commercial testing tools

24
New cards

Test Report

Summarizes test outputs. Highlights failures. Should be concise, standardized.

25
New cards

Walkthrough vs Code Review vs Inspection?

- Walkthrough: Informal, 2-3 ppl, verify small changes

- Code Review: Formal, 3-5 ppl, for substantial changes

- Inspection: Most formal, for documents/code, finds defects early

26
New cards

What is Inspection?

Structured review with defined rules. Used in mission-critical systems. Includes planning, overview, preparation, meeting, reporting, rework, and follow-up.

27
New cards

Roles in Inspection?

- Moderator: runs process

- Author: wrote item

- Reviewer: finds defects

- Scribe: records

- Management: should NOT attend

28
New cards

Effective Inspections Tips?

- Use structured checklists to guide what to look for

- Assign clear roles (moderator, scribe, reviewers, author)- Keep meetings focused (max 2 hrs)

- Train all participants- Preparation is key: review material ahead of time

- Focus on defects, not opinions or style

29
New cards

Inspection Metrics

- Track number of defects found

- Time spent on inspection

- Size of artifact reviewed (e.g., lines of code)

- Defect types (logic, syntax, performance)

- Common defect triggers

- Use structured walkthroughs, checklists, and paraphrasing to find issues

30
New cards

Code Review Checklist (General)

- Is logic correct?

- Code follows style conventions?

- No duplicate/redundant code?

- Modular, with reusable components?

- Are names meaningful?-

Proper loop/control structures?

31
New cards

Checklist (Performance, Security)

- Code optimized for performance?

- Inputs validated?

- External systems securely accessed?

- Are there any buffer overflows, SQL injection risks, or race conditions?

32
New cards

Documentation Checklist

- Do comments explain why, not just what?

- Are functions documented properly?

- Describe edge cases or 3rd-party dependencies?

- Incomplete areas are clearly flagged (TODO, FIXME)?

33
New cards

Testing Checklist

1. Variable & Constant Declaration Defects

1.1 Descriptive names with naming conventions

1.2 No confusingly similar names

1.3 All variables initialized

1.4 Localize non-local variables

1.5 Replace literals with constants

1.6 Use constants where needed

2. Method Definition Defects

2.1 Descriptive method names

2.2 Validate parameters

2.3 All return paths return correct values

3. Computation Defects

3.1 Check underflow/overflow

3.2 Use parentheses to avoid ambiguity

4. Control Flow Defects

4.1 Ensure all loops terminate

<p><strong>1. Variable &amp; Constant Declaration Defects</strong></p><p>1.1 Descriptive names with naming conventions</p><p>1.2 No confusingly similar names</p><p>1.3 All variables initialized</p><p>1.4 Localize non-local variables</p><p>1.5 Replace literals with constants</p><p>1.6 Use constants where needed</p><p><strong>2. Method Definition Defects</strong></p><p>2.1 Descriptive method names</p><p>2.2 Validate parameters</p><p>2.3 All return paths return correct values</p><p><strong>3. Computation Defects</strong></p><p>3.1 Check underflow/overflow</p><p>3.2 Use parentheses to avoid ambiguity</p><p><strong>4. Control Flow Defects</strong></p><p>4.1 Ensure all loops terminate</p>
34
New cards

Code Review Tips

- Be respectful, never take critiques personally

- Make feedback actionable and clear

- Explain reasons: "This failed in past because..."- Share resources (e.g., blog posts)- Keep context clear when recommending changes

35
New cards

Static Program Analysis

- Examines code without execution

- No test cases needed

- Checks code structure, detects violations of best practices and common errors

36
New cards

Static Analysis Tools

- FindBugs/SpotBugs: Detects bug patterns

- JLint: General static checker

- PMD: Flags inefficiency and complexity

- ESC/Java2: Advanced checker for specs

- Linters: Broad tool family used widely

37
New cards

What are Metrics?

- Quantitative measurements of code/artifacts

- Track size, complexity, structural/dependency info

- Help predict maintainability and reliability

38
New cards

Metric Types

- Code Size: SLOC (Source Lines of Code)

- Complexity: Parameters, functions

- Structural: Depth of calls, transactions

- Design Complexity: Modularity, coupling

39
New cards

McCabe’s “Cyclomatic Complexity” Metric

If the control flow graph G of program P has e edges and n nodes, then the cyclomatic complexity v of P is

v (P) = e – n + 2

v (P) is the number of linearly independent paths in G

<p>If the control flow graph G of program P has e edges and n nodes, then the cyclomatic complexity v of P is</p><p><strong> v (P) = e – n + 2</strong></p><p>v (P) is the number of linearly independent paths in G</p><p></p><p></p>
40
New cards
<p>Example</p>

Example

#nodes: 6

#edges: 7

#decisions : 2

#regions: 2

#Independent Paths / Cyclomatic Complexity: #edges - #nodes + 2 = 3

Or

#decisions + 1 = 3

Or #regions + 1 = 3

So, we have 3 independent paths to tests

41
New cards
<p>Exercise</p>

Exercise

Functional:

1. Insert card → validate

2. Prompt PIN → validate

3. Select "Withdraw"

4. Enter amount

5. Choose account type → validate

6. Ask for receipt

7. Eject card

8. Dispense cash

9. Print receipt

Non-Functional:

Performance: Handle high user load********

Security: PIN + card auth, protect account info

42
New cards

Testing Practices at Big Tech

- Spectrum of Responsibility: Some use dedicated testers, others test as team

- Spectrum of Importance: Some test pre-release, others post-deployment

- Common Practice: Heavy use of automated testing