• No results found

of 20 0.0/ 5.0 Points Which of the following is an appropriate statement in regard to a module unit test?

HCMUT_013_CSD_02_Quiz3_Unit Testing

Question 3 of 20 0.0/ 5.0 Points Which of the following is an appropriate statement in regard to a module unit test?

A.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.

B.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.Generally, test cases are created and executed by dedicated testing staff, not programmers who have done the coding.

Question 4 of 20 5.0/ 5.0 Points

Internal and unit testing can be automated with the help of ….. Tools.

A.testing

B.coverage

C.scaffolding

D.none

Question 5 of 20 5.0/ 5.0 Points

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 observable behavior.

B.informal design

C.unique design

D.formal design

Question 6 of 20 5.0/ 5.0 Points

Technical review are more …….. That is, they aim to remove defects as soon as possible.

A.Objective

B.Subjective

C.Descriptive

D.Preventive

Question 7 of 20 5.0/ 5.0 Points

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

D.All of above

Question 8 of 20 5.0/ 5.0 Points

To 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?

True False

Question 9 of 20 5.0/ 5.0 Points

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)

True False

Question 10 of 20 5.0/ 5.0 Points

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

Question 11 of 20 5.0/ 5.0 Points

Các best practice của giai đoạn Perform unit testing bao gồm

A. Keep unit tests small and fast

B. Keep tests independent

D. Test each feature once

Question 12 of 20 0.0/ 5.0 Points

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 him/herself.

B.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.

C.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.

D.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.

Question 13 of 20 5.0/ 5.0 Points

Unit Testing Conductor là Testing team

True False

Question 14 of 20 0.0/ 5.0 Points

A main focus of reviews and other static test is …..

A. To help remove the need of testing altogether

C. finding and fixing defects cheaply

D. to carry out testing as early as possible

Question 15 of 20 5.0/ 5.0 Points

Bước Specification derived test của Black Box Test bao gồm những việc nào sau đây

A. Test the software at either side of boundary values

B. Create test cases for each statements of specification

C. 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.

D. Execute test cases to check test result will output as the specification

Question 16 of 20 5.0/ 5.0 Points

The most common approach to unit testing require drivers and stubs to be written

True False

Question 17 of 20 5.0/ 5.0 Points

The two major quality assurance verification approaches for each life cycle phase are ………

A.Technical check

B.Technical review

C.Requirement check

Question 18 of 20 5.0/ 5.0 Points "The below function calculate square of number

Public static integer Square (integer intNumber){ Try

If input<0 THEN

Print error message ""Square root error – illegal negative input"" RETURN 0

ELSE_IF input=0 THEN RETURN 0

ELSE

Use square function to calculate the answer RETURN the answer

END_IF Catch

Print error message “The system error” End Try

}

How many test cases used for branch test ?"

A.3

B.4

C.1

D.2

Question 19 of 20 1.67/ 5.0 Points

Unit test is implemented by Development team to

A. Create related documents: Unit Test cases, Unit Test Reports, …

B. Ensure quality of software unit

D. Reduce the Quality Effort & Correction Cost

Question 20 of 20 5.0/ 5.0 Points

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

Part 1 of 1 - 96.67/ 100.0 Points

Question 1 of 20 5.0/ 5.0 Points

Unit Testing Conductor là Testing team

True False

Question 2 of 20 5.0/ 5.0 Points

A. Security test

B. Load test

C. regression test

D. Performance test

Question 3 of 20 5.0/ 5.0 Points

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

Question 4 of 20 5.0/ 5.0 Points

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 observable behavior.

A.informal design

B.both A & B

C.unique design

D.formal design

Question 5 of 20 5.0/ 5.0 Points

Khi 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

True False

Question 6 of 20 5.0/ 5.0 Points

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 him/herself.

B.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.

C.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.

D.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.

Question 7 of 20

5.0/ 5.0 Points "Cho đoạn code sau :

public bool ValidateEmail(string strEmail) {

//Check null or empty

if (string.IsNullOrEmpty(strEmail)) {

return false; }

//Check required character bool blnRequireChar = false;

for (int i = 0; i < strEmail.Length; i++) { if (strEmail[i].ToString().Equals(""@"")) { blnRequireChar = true; } }

//Check incorrect character

for (int i = 0; i < strEmail.Length; i++) {

if (char.IsLetterOrDigit(strEmail[i])) {

continue; }

else if(char.Equals('.',strEmail[i]) || char.Equals('@',strEmail[i])) { continue; } else { return false; } }

return true; }

Đoạn code trên cần ít nhất bao nhiêu test case?"

A.5

B.7

C.8

D.6

Question 8 of 20 5.0/ 5.0 Points

……. A series of probing question designed to review a predetermined area or function

A.Meeting list B.Checklist C.Minutes D.Plan list Question 9 of 20 5.0/ 5.0 Points ……… 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 Question 10 of 20 5.0/ 5.0 Points "public bool ValidPassword(string password)

{

bool validPassword = false; // Check valid password length

if(IsValidLength(password, minLength, maxLength)) {

validPassword = true;

// Check valid password mix between lowcase and upcase if(!IsMixedCase(password))

return false;

// Check valid password mix between alpha & numeric if(!IsAphaNumeric(password))

return false; }

return validPassword; }

How many unit test cases you must do to check this function to cover all path! "

A.4

C.3

D.6

Question 11 of 20 5.0/ 5.0 Points

Black box testing attempts to find errors in which of the following categories:

A. incorrect or missing functions

B. performance errors

C. interface errors

Question 12 of 20 5.0/ 5.0 Points

Black Box Test bao gồm

A. Equivalence partitioning

B. Condition analysis

C. Specification derived tests

D. Boundary value analysis

Unit Testing is to validate that individual units of software program are working properly.

True False

Question 14 of 20 1.67/ 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. Path coverage

C. "Statement coverage "

D. Boundary value coverage

Question 15 of 20 5.0/ 5.0 Points

Which of the following is the appropriate description concerning black box testing?

A.The test case coverage is used as criteria for preparing test data.

B.Attention is focused on the internal structures of programs, and verification is made as to whether necessary portions are executed.

C.If branch instructions and modules increase in number, the amount of test data also leaps upward.

D.Even if any redundant code exists in a tested program, it cannot be detected.

Question 16 of 20 5.0/ 5.0 Points

Technical review are more …….. That is, they aim to remove defects as soon as possible.

A.Objective

B.Descriptive

C.Subjective

D.Preventive

Question 17 of 20 5.0/ 5.0 Points

What are the items that have to have in unit test case

A. Input data

B. Test case description

D. The actor that take the test

Question 18 of 20 5.0/ 5.0 Points

White Box Test Case phải đảm bảo các yêu cầu nào sau đây?

A. Each test case is combination of condition and confirmation

B. Coverage boundary cases

C. Keep testing at Unit Level

D. Make sure that all of the code is coverage.

Question 19 of 20 5.0/ 5.0 Points

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

Question 20 of 20

5.0/ 5.0 Points To 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?

True False

Related documents