I got a preliminary look.
PHPUnit
Feel
单元测试
is to use a test class, simulate the browser to fill out the form, submit the form, test whether the normal operation can be successful.
功能测试
I don't know yet.
I think, PHPUnit is not for a small website, the role is not very good?
What is the right size to use PHPUnit?
I don't think PHPUnit can test out some potential pitfalls and bugs (submitting unexpected form data, etc.). Writing a test class is not as good as opening a browser test yourself, is it?
In addition, it can be said that the use of phpunit experience and feelings.
Reply content:
Preliminary understanding of the PHPUnit
feeling
单元测试
is to use a test class, simulate the browser to fill out the form, submit the form, test whether the normal operation can be successful.
功能测试
I don't know yet.
I think, PHPUnit is not for a small website, the role is not very good?
What is the right size to use PHPUnit?
I don't think PHPUnit can test out some potential pitfalls and bugs (submitting unexpected form data, etc.). Writing a test class is not as good as opening a browser test yourself, is it?
In addition, it can be said that the use of phpunit experience and feelings.
First answer you 1th, unit test you said with the browser form simulation under the submission, this is not wrong, but with the form of the simulation submission, may not be able to cover all of your code logic, unit testing coverage, general formal enterprise, the requirement coverage of more than 80%;
2nd, if each run unit test need manual intervention, then this unit test meaning is not very much; usually you finish your module, then write the test code separately, then you will hand over the tool "continuous integration" to complete, only you submit an SVN version number, then go back to work, the next day, After continuous integration, you will be given a list of the results of the unit tests, as well as some other problems with the code, such as Cyclomatic complexity, number of lines of code, etc...
Third, the general small site does not need to waste time to write unit testing, because unit testing is time-consuming, generally with the write business time is 1:1, so like a large web site, security requirements are relatively high, or those large to need to split the application layer of the level of each module, will write unit test script, Otherwise, small companies can not spend this time to do this, after all, the time cost equivalent to the programmer's wages.
Do not know whether this answer to solve your doubts?