Static Unit Testing Preparation Step 2: Code Review

RenownedOrchid avatar
RenownedOrchid
·
·
Download

Start Quiz

Study Flashcards

29 Questions

What types of system documents are generated by the engineering department?

Requirement, Functional Specification, High-level Design, Low-level Design, Code

What are some steps to prevent defects in code?

Build clean code, Use standard control, Validate input data, Provide error messages from a common source, Use assertions

What are some metrics that can be collected from a code review?

LOC/Hr, CRs/Hr, CRs/KLOC, KHr

Why is it important to handle counter data fields and buffer overflow/underflow appropriately?

To prevent potential vulnerabilities and ensure data integrity

What is the purpose of using assertions in code?

To detect impossible conditions

How can standard control help in detecting possible error conditions?

By detecting occurrences like dividing by zero and array index out of bounds

What is the purpose of a test driver in dynamic unit testing?

A test driver is a program that invokes the unit under test, provides input data, and reports the test result.

Define stubs in the context of dynamic unit testing.

Stubs are dummy programs that emulate the units called by the unit under test.

What is the purpose of scaffolding in dynamic unit testing?

Scaffolding refers to the combination of the test driver and stubs.

What does the low-level design document provide guidance on in dynamic unit testing?

The low-level design document provides guidance on the selection of input test data.

Why is it important to include a loop counter within each loop in dynamic unit testing?

Including a loop counter helps in tracking the iterations of the loop and ensures proper testing.

What are the different team roles involved in the code review process?

Moderator, Author, Presenter, Record keeper, Reviewers, Observer

During the Preparation step of code review, what are some of the questions reviewers develop?

Does the code do what has been specified? Does the procedure solve the problem correctly? Does a software module duplicate another existing module?

What is the purpose of Potential Change Request (CR) in the code review process?

To suggest change requests rather than defect reports.

What is the role of the Moderator during the Examination step of code review?

To ensure the review is on track.

What is done at the end of the code review meeting, as part of the Re-work step?

The record keeper produces a summary of the meeting.

What details are included in a Change Request (CR) according to the text?

Brief description of the issue, Priority level, Assigned person, Deadline for addressing

What is control flow testing and how is it performed?

Control flow testing involves drawing a control flow graph, selecting criteria, identifying a path, deriving a path predicate expression, and generating test data.

How is data flow testing different from control flow testing?

Data flow testing is similar to control flow testing but focuses on the data flow within a program unit.

What is domain testing and why is it important?

Domain testing involves defining domain errors and selecting test data to catch those faults.

Explain mutation testing and its purpose.

Mutation testing is a way to measure test case quality and is used to supplement traditional unit testing techniques.

When is a mutant considered 'killed' or 'dead' in mutation testing?

A mutant is considered killed/dead when the execution of a test case causes it to fail.

What is the purpose of functional program testing?

Functional program testing defines input/output domains to compute input values that produce expected output values.

What is the formula to calculate the mutation score for a set of test cases T?

Mutation score = 100×D/(N −E)

If the estimated mutation adequacy of T is not sufficiently high in step 5, what should be done?

Design a new test case that distinguishes Pi from P, add it to T, and go to step 2.

What are the two major assumptions made in mutation testing?

Competent Programmer hypothesis and Coupling effects

What is the purpose of debugging?

The purpose of debugging is to isolate and determine the specific cause of a failure.

What are the three approaches to debugging mentioned in the text?

Brute force, Induction Deduction, Backtracking

When should a set of test cases T be accepted as a good measure of the correctness of P with respect to the set of mutant programs Pi?

When the computed adequacy of T is more than an appropriate threshold.

Learn about the preparation step in static unit testing (code review) where reviewers develop a list of questions to ensure the code meets design specifications and solves problems correctly.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Use Quizgecko on...
Browser
Browser