Static Unit Testing Preparation Step 2: Code Review
29 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

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?

<p>To prevent potential vulnerabilities and ensure data integrity</p> Signup and view all the answers

What is the purpose of using assertions in code?

<p>To detect impossible conditions</p> Signup and view all the answers

How can standard control help in detecting possible error conditions?

<p>By detecting occurrences like dividing by zero and array index out of bounds</p> Signup and view all the answers

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

<p>A test driver is a program that invokes the unit under test, provides input data, and reports the test result.</p> Signup and view all the answers

Define stubs in the context of dynamic unit testing.

<p>Stubs are dummy programs that emulate the units called by the unit under test.</p> Signup and view all the answers

What is the purpose of scaffolding in dynamic unit testing?

<p>Scaffolding refers to the combination of the test driver and stubs.</p> Signup and view all the answers

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

<p>The low-level design document provides guidance on the selection of input test data.</p> Signup and view all the answers

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

<p>Including a loop counter helps in tracking the iterations of the loop and ensures proper testing.</p> Signup and view all the answers

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

<p>Moderator, Author, Presenter, Record keeper, Reviewers, Observer</p> Signup and view all the answers

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

<p>Does the code do what has been specified? Does the procedure solve the problem correctly? Does a software module duplicate another existing module?</p> Signup and view all the answers

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

<p>To suggest change requests rather than defect reports.</p> Signup and view all the answers

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

<p>To ensure the review is on track.</p> Signup and view all the answers

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

<p>The record keeper produces a summary of the meeting.</p> Signup and view all the answers

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

<p>Brief description of the issue, Priority level, Assigned person, Deadline for addressing</p> Signup and view all the answers

What is control flow testing and how is it performed?

<p>Control flow testing involves drawing a control flow graph, selecting criteria, identifying a path, deriving a path predicate expression, and generating test data.</p> Signup and view all the answers

How is data flow testing different from control flow testing?

<p>Data flow testing is similar to control flow testing but focuses on the data flow within a program unit.</p> Signup and view all the answers

What is domain testing and why is it important?

<p>Domain testing involves defining domain errors and selecting test data to catch those faults.</p> Signup and view all the answers

Explain mutation testing and its purpose.

<p>Mutation testing is a way to measure test case quality and is used to supplement traditional unit testing techniques.</p> Signup and view all the answers

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

<p>A mutant is considered killed/dead when the execution of a test case causes it to fail.</p> Signup and view all the answers

What is the purpose of functional program testing?

<p>Functional program testing defines input/output domains to compute input values that produce expected output values.</p> Signup and view all the answers

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

<p>Mutation score = 100×D/(N −E)</p> Signup and view all the answers

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

<p>Design a new test case that distinguishes Pi from P, add it to T, and go to step 2.</p> Signup and view all the answers

What are the two major assumptions made in mutation testing?

<p>Competent Programmer hypothesis and Coupling effects</p> Signup and view all the answers

What is the purpose of debugging?

<p>The purpose of debugging is to isolate and determine the specific cause of a failure.</p> Signup and view all the answers

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

<p>Brute force, Induction Deduction, Backtracking</p> Signup and view all the answers

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?

<p>When the computed adequacy of T is more than an appropriate threshold.</p> Signup and view all the answers

More Like This

Use Quizgecko on...
Browser
Browser