Unit test drive module pile module common storage process, unit test

Source: Internet
Author: User

Unit test drive module pile module common storage process, unit test

 

Answer: D

Resolution:

Software testing methods-unit testing, integration testing, system testing, validation testing

The driver module is used to simulate the upper-level module of the tested module, which is equivalent to the main program of the tested module. It receives data, transmits the data to the tested module, enables the tested module, and prints the corresponding results.

Pile module and drive module (take C language as an example ):

Many people may be confused about the concepts of the pile module and the drive module. The following describes these two concepts:

Module structure instance diagram:

Assume that the project team has assigned seven members to implement a module. You are responsible for Module B. You are excellent. The first one completes the encoding.WorkAnd now needs to be carried outUnit TestFirst, analyze the structure:

1. Because Module B is not the top-level module, it must not contain the main function (module A contains the main function), so it cannot run independently.

2. Module B calls Module D and module E. At present, neither Module D nor module E hasDevelopmentWell, it is impossible to compile Module B through the compiler.

So how can we test module B? You need:

1. Write two modules, Sd and Se, respectively, to replace Module D and module E (the function name, return value, and transmitted parameters are the same), so that Module B can be compiled. The Sd module and the Se module are the pile module.

2. Write A module Da to replace module A, which contains the main function. You can call Module B in the main function to run Module B. The Da module is the driver module.

Knowledge point:

In addition to making the program compile, the mission of the module also needs to simulate the various possible return values of the replaced module (when to return the value depends onTest Cases).

The mission of the driver module is to call the tested module according to the design of the test case, and determine whether the returned values of the tested module are consistent with the expected results of the test case.

Answer: B

Resolution:

 

Answer:

Resolution:

 

Answer: C

Resolution:

JS plug-ins are not only JQuery, but also prototype. js and other good plug-ins. They also use $. So sometimes when you use these two JS plug-ins at the same time, the right to use $ conflict may occur.

JQuery has a function. jquery. noConflict () is used to transfer the control of $. Then we can use jQuery instead of $ to get the dom node.

Method 1:

<Script type = "text/javascript">

JQuery. noConflict (); // assign control of variable $ to prototype. js

JQuery (function () {// use jQuery

JQuery ("p"). click (function (){

Alert (jQuery (this). text ());

});

});

$ ("Pp"). style. display = 'none'; // use prototype

</Script>

 

Answer: D

Resolution:

 

 

Answer: D

Resolution:

 

 

 

 

Answer: BC

Resolution:

B: where is followed by and

C: from is followed by the table name

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.