yasmine_yang

导航

python unittest框架

四个部分:

test fixture

A test fixture represents(代表) the preparation needed to perform one or more tests, and any associate cleanup actions. This may involve, for example, creating temporary or proxy databases, directories, or starting a server process.

 

test case

A test case is the individual(独立的) unit of testing. It checks for a specific response to a particular set of inputs. unittest provides a base class, TestCase, which may be used to create new test cases.

 

test suite

A test suite is a collection of test cases, test suites, or both. It is used to aggregate(集合)  tests that should be executed together.

 

test runner

A test runner is a component which orchestrates(安排) the execution of tests and provides the outcome to the user. The runner may use a graphical interface, a textual interface, or return a special value to indicate the results of executing the tests.

 

posted on 2018-12-12 15:25  yasmine_yang  阅读(149)  评论(0)    收藏  举报