unittest automated testing framework

Conceptual framework

In the system development process, the frame is a portion designed for specific applications and application system to achieve the overall structure of the subsystem.
The application framework is divided into classes and objects, and how responsibility, class and object definitions of classes and objects collaborate, and the thread of control between objects. These common design factors previously defined by the framework, define the framework for automated testing:
tool consists of one or more automated test base module, automated test management module, automated testing statistics module and other collections.

  • By definition framework to points, automated testing framework can be divided into: basic functional testing framework, the management framework for implementation;
  • Different types of test points, can be divided into: automated testing framework functionality, performance automated testing framework;
  • By testing phase points, it can be divided into: automated testing framework unit, the interface automated testing framework, automated testing framework system;
  • Press the composition structure points, can be divided into: stand-alone automated testing framework, distributed automation testing framework.

Unittest unit testing framework

Unittest frame (aka PyUnit frame) unit test frame Python language.
Its official introduction to document links: https://docs.python.org/2.7/library/unittest.html#module-unittest

Unittest use testing framework introduced

1. Use the import statement to introduce unittest module
2. The test is performed so that all classes are inherited from TestCase class, TestCase can be seen as a method to test for a particular class collection
3.setUp () method for initialization before the test , teardown () method after the execution of the test cleanup

Guess you like

Origin www.cnblogs.com/TD1900/p/11946750.html