Summarize about defining a specific state note point

Source: Internet
Author: User
Automated tests need to be executed many times. To ensure that the testing process is repeatable, we want to test it in some known state, which we call a specific state. For example, in a blog app, test the article creation feature, each time we test, the table related to the article (for example. The Post table, Comment table) should be restored to a specific state. The PHPUnit documentation is a good description of the general construction of a particular state. This section focuses on how to build a database-specific state as in the example just described. Setting the specific state of the build database is probably one of the most time-consuming parts of testing an application with a database for back-end support. The Cbbfixturemanager application component introduced by YII can alleviate this problem effectively. When a set of tests is performed, it basically does the following: it resets the test-related data to a known state before all tests are run. Before a single test runs, It resets the specific table to the known state. During a test method execution, it provides a provider for the row data that is supplied to a particular state. Please press

1. Yii Framework Official Guide Series 38--define a specific state (fixtures)

Summary: Automated testing needs to be executed many times. To make sure that the testing process is repeatable, we want to test it in some known state, which we call a specific state. For example, test article creation in a blog app ...

"Related question and answer recommendation":

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.