Question 1 of 20 ………. Developer reviews code for accuracy A.Design check B.Requirement check C.Technical check D.Desk checking Question 2 of 20 5.0 5.0 Points ………It is a review where the author lead team through a manual or a simulated execution of the product using predefined scenarios
Trang 1Khi viết white box test case, chỉ cần viết đầy đủ số lượng test case thỏa statement coverage thì
số test case đó đã thỏa điều kiện branch coverage
Trang 2"Cho đoạn code sau :
public bool ValidateEmail(string strEmail)
//Check required character
bool blnRequireChar = false;
for (int i = 0; i < strEmail.Length; i++)
//Check incorrect character
for (int i = 0; i < strEmail.Length; i++)
Trang 3A unit is the smallest testable part of an application (In procedural programming a unit may be
an individual program, function, procedure, etc., while in object-oriented programming, the smallest unit is always a method)
True
False
Bước Equivalence partitioning của Black Box Test bao gồm những việc nào sau đây
A Anticipate that errors are most likely to exist at the boundaries between partitions
B A limited number of representative test cases should be chosen from each partition
Trang 4C Behavior of software is equivalent for any value within particular partition
D Divide the input of a program into classes of data from which test cases can be
derived This might help you to reduce number of test cases that must be developed
The exact scope of a unit is left to interpretation Supporting test code , sometimes called
………., may be necessary to support an individual test
What's is "Decision coverage" ?
A.Each branch in the logic visited by a test
B.Each path through the logic is visited by a test
C.Each statement in the program will be visited by test
Trang 5Unit Testing Conductor là Testing team
True
False
Which of the following is appropriate as a description of boundary value analysis?
A.A method where boundary values are identified for the data entered into the system and used as test data
B.A method where equivalence class border values are used as test data
C.A method of analysis for identifying input values that do not produce errors but are on the borderline
D.A method of testing where boundary values that can be entered into the system are analyzed
A black box test is a type of testing technique used in software development Which of the following statements accurately describes a black box test?
A.A black box test is based on the internal specifications that describe the internal
structure and logic of the program It is mainly performed by the program developer
Trang 6D.A black box test tests whether or not the program functions as the designer intended It
is mainly performed by third parties and not by the program developer
……… reviews: Review conducted during the system development process, normally in
arccodance with system development methodology The primary objective of design reviewes is
to ensure compliance to design methodology
A.Technical
B.Design
C.Requirement
D.Process
Trang 7Question 18 of 20 0.0/ 5.0 Points Unit Test should be conducted for each module (class or function) after code review has been done
True
False
……… Review A review process that uses peer to review that aspect of the systems
development life cycle with wich they are the most familiar Typically the ……reviews offer compliance to standard, procedures, guidelines, and the use of good practices, as opposed to efficiency, effectiveness, and economy of the design and implementation
Trang 8A.Each branch in the logic visited by a test
B.Each statement in the program will be visited by test
C.Each path through the logic is visited by a test
Unit test is implemented by Development team to
A Reduce the Quality Effort & Correction Cost
B Create related documents: Unit Test cases, Unit Test Reports, …
C Detect defects and issues early
D Ensure quality of software unit
Which of the following is the appropriate description concerning standardization in programming?
Trang 9A.It is effective for clarifying the standard execution time of a program to promote the creation of efficient programs
B.Its purpose is to define rules about common items that are independent of programming languages
C.Its original purpose is not to limit an individual programming style, but to easily
achieve the effect of optimization provided by a compiler
D.Defining programming conventions is effective for preventing errors that programmers tend to make
"The below function calculate square of number
Public static integer Square (integer intNumber){
Use square function to calculate the answer
RETURN the answer
Trang 10To ensure testing robustness and simplify maintenance, test should never rely on other test nor should they depend on the ordering in wich test are executed?
"Unit Testing Deliverables bao gồm
- Tested software units
- Related documents (Unit Test case, Unit Test Report)"
True
False
Which of the following is the appropriate point to focus when preparing test data for a white box test?
A.Program input and output relationship
B.Program functions
C.Program internal structure such as algorithm
D.Boundary value for each equivalence class obtained through the application of
equivalence partitioning
"public bool ValidPassword(string password)
{
bool validPassword = false;
// Check valid password length
Trang 11if(IsValidLength(password, minLength, maxLength))
Bước Equivalence partitioning của Black Box Test bao gồm những việc nào sau đây
A Behavior of software is equivalent for any value within particular partition
B Divide the input of a program into classes of data from which test cases can be
derived This might help you to reduce number of test cases that must be developed
C Anticipate that errors are most likely to exist at the boundaries between partitions
D A limited number of representative test cases should be chosen from each partition
The exact scope of a unit is left to interpretation Supporting test code , sometimes called ………., may
be necessary to support an individual test
Trang 12Unit test should be written without explicit knowledge of the environment context in wich they are
executed co that they can be run anywhere at anytime
True
False
"Cho đoạn code sau :
public bool ValidateEmail(string strEmail)
//Check required character
bool blnRequireChar = false;
Trang 13for (int i = 0; i < strEmail.Length; i++)
//Check incorrect character
for (int i = 0; i < strEmail.Length; i++)
"There are two types of unit test case:
Black box unit test case and White box unit test case"
Trang 14B."subtle logic errors
A.A black box test tests whether or not the program functions as the designer intended It
is mainly performed by third parties and not by the program developer
B.A black box test analyzes the source program and tests program control flow and the flow of data such as variables It is mainly performed by third parties and not by the program developer
C.The objective of a black box test is to execute all of the instructions in the program at least once It is mainly performed by the program developer him/herself
D.A black box test is based on the internal specifications that describe the internal
structure and logic of the program It is mainly performed by the program developer
Trang 15D.formal design
What are the items that have to have in unit test case
A The actor that take the test
The exact scope of a unit is left to interpretation Supporting test code , sometimes called
………., may be necessary to support an individual test
A.Scaffolding
B.Conjucture
C.RemUnit
Trang 16White Box Test phải đảm bảo hoàn thành các yêu cầu nào sau đây?
A Decision (branch) coverage
B Boundary value coverage
C "Statement coverage
"
D Path coverage
Question 4 of 20 0.0/ 5.0 Points
Which of the following is an appropriate statement in regard to a module unit test?
A.Generally, test cases are created and executed by dedicated testing staff, not
programmers who have done the coding
Trang 17B.Verification should be performed, in principle, using test cases which cover all the logic paths at least once while reviewing the module design documents
C.The module interface falls outside the scope of the unit test because the module
interface cannot be tested using a single module
D.The module design documents have already been verified If a problem is found in the test results, an error exists in the test case or the module
Trang 19What's is "Decision coverage" ?
A.Each branch in the logic visited by a test
B.Each statement in the program will be visited by test
C.Each path through the logic is visited by a test
Trang 20D walkthrough
Question 15 of 20 0.0/ 5.0 Points
An inspection process is characterized by:
A Roles (who are inspector?)
B Process (How do the inspector organse their work?)
C Reading techniques (how are artifacts examined?)
Please select the test case design techniques that used to create unit test spec
A Internal boundary value testing
Trang 21A.A black box test tests whether or not the program functions as the designer intended It
is mainly performed by third parties and not by the program developer
B.A black box test is based on the internal specifications that describe the internal
structure and logic of the program It is mainly performed by the program developer
Question 20 of 20 5.0/ 5.0 Points
……… Review A review process that uses peer to review that aspect of the systems
development life cycle with wich they are the most familiar Typically the ……reviews offer compliance to standard, procedures, guidelines, and the use of good practices, as opposed to efficiency, effectiveness, and economy of the design and implementation
Trang 22HCMUT_013_CSD_02_Quiz3_Unit Testing
Return to Assessment List
Question 1 of 20 3.33/ 5.0 Points
Black box testing attempts to find errors in which of the following categories:
A incorrect or missing functions
B interface errors
C performance errors
Question 2 of 20 2.5/ 5.0 Points
Các best practice của giai đoạn Perform unit testing bao gồm
A Test each feature once
B Unit tests should be fully automated and non-interactive
C Keep tests independent
D Keep unit tests small and fast
Trang 23Public static integer Square (integer intNumber){
Use square function to calculate the answer
RETURN the answer
C.Program input and output relationship
D.Program internal structure such as algorithm
Trang 24Bước Specification derived test của Black Box Test bao gồm những việc nào sau đây
A Execute test cases to check test result will output as the specification
B Test the software at either side of boundary values
C Create test cases for each statements of specification
D Divide the input of a program into classes of data from which test cases can be
derived This might help you to reduce number of test cases that must be developed
Question 8 of 20 5.0/ 5.0 Points
Please select the test case design techniques that used to create unit test spec
A Internal boundary value testing
B Branch Testing
C Condition testing
Trang 25D State transition testing
Question 9 of 20 5.0/ 5.0 Points
White Box Test phải đảm bảo hoàn thành các yêu cầu nào sau đây?
A Decision (branch) coverage
B Boundary value coverage
C "Statement coverage
"
D Path coverage
Question 10 of 20 5.0/ 5.0 Points What are the items that have to have in unit test case
A Expected result
B Input data
C The actor that take the test
D Test case description
Question 11 of 20 0.0/ 5.0 Points Internal and unit testing can be automated with the help of … Tools
A.testing
B.coverage
C.scaffolding
Trang 26D.none
Question 12 of 20 5.0/ 5.0 Points
"Unit Testing Deliverables bao gồm
- Tested software units
- Related documents (Unit Test case, Unit Test Report)"
True
False
Question 13 of 20 0.0/ 5.0 Points
Which of the following is appropriate as a description of boundary value analysis?
A.A method of analysis for identifying input values that do not produce errors but are on the borderline
B.A method where boundary values are identified for the data entered into the system and used as test data
C.A method where equivalence class border values are used as test data
D.A method of testing where boundary values that can be entered into the system are analyzed
Trang 27Which of the following is the appropriate description concerning black box testing?
A.Attention is focused on the internal structures of programs, and verification is made as
to whether necessary portions are executed
B.Even if any redundant code exists in a tested program, it cannot be detected
C.The test case coverage is used as criteria for preparing test data
D.If branch instructions and modules increase in number, the amount of test data also leaps upward
Trang 28Question 18 of 20 5.0/ 5.0 Points
What's is "Decision coverage" ?
A.Each branch in the logic visited by a test
B.Each statement in the program will be visited by test
C.Each path through the logic is visited by a test
Question 19 of 20 5.0/ 5.0 Points
Black Box Test bao gồm
A Condition analysis
B Specification derived tests
C Boundary value analysis
Trang 30B Internal boundary value testing
C State transition testing
D Branch Testing
Black Box Test bao gồm
A Boundary value analysis
B Specification derived tests
C Equivalence partitioning
D Condition analysis
"The below function calculate square of number
Public static integer Square (integer intNumber){
Use square function to calculate the answer
RETURN the answer
Trang 31C.Program internal structure such as algorithm
D.Program input and output relationship
Trang 32An inspection process is characterized by:
A Roles (who are inspector?)
B Process (How do the inspector organse their work?)
C Reading techniques (how are artifacts examined?)
D Both A & B
What are the items that have to have in unit test case
A The actor that take the test
B Expected result
C Input data
D Test case description
Unit test is implemented by Development team to
A Create related documents: Unit Test cases, Unit Test Reports, …
B Ensure quality of software unit
C Detect defects and issues early
D Reduce the Quality Effort & Correction Cost
Trang 33Question 11 of 20 5.0/ 5.0 Points White Box Test phải đảm bảo hoàn thành các yêu cầu nào sau đây?
The testing technique that requires devising test cases to demonstrate that each program
function is operational is called
A.Grey box testing
B.black box testing
C.White box testing
A unit is the smallest testable part of an application (In procedural programming a unit may be
an individual program, function, procedure, etc., while in object-oriented programming, the smallest unit is always a method)
Trang 34True
False
Which of the following is appropriate as a description of boundary value analysis?
A.A method where boundary values are identified for the data entered into the system and used as test data
B.A method of testing where boundary values that can be entered into the system are analyzed
C.A method where equivalence class border values are used as test data
D.A method of analysis for identifying input values that do not produce errors but are on the borderline
When software is developed using a test driven-approach, the unit test may take a place of
…… Each unit test can be seen as a design element specifying classes, method and