A simple php testing tool simpletestphpunit is a good unit testing tool. This article introduces a more lightweight unit testing tool, open source, simpletest, 1 download: & nbsp; http://sourceforge.net/projects/simpletes php a simple test tool simpletest
Phpunit is a good unit test tool. This article introduces a more lightweight unit test tool, open-source,
Simpletest,
1 download:
Http://sourceforge.net/projects/simpletest,
Unfortunately, the XXX document and project main site is required.
2. use
After the download, you can use the following two files in the Test File:
Require_once ('simpletest/autorun. php ');
Require_once ('simpletest/web_tester.php ');
?>
3. test an interface.
Require_once ('simpletest/autorun. php ');
Require_once ('simpletest/web_tester.php ');
Class SimpleFormTests extends WebTestCase {
Function testDoesContactPageExist (){
$ This-> get ('http: // www.example.com/contact.php ');
$ This-> assertResponse (200 );
}
}
?>
You can also test the form submission action.
Function testIsProperFormSubmissionSuccessful (){
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.