站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Automated Testing
”(章节)
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
== 运行测试 == The wp-test.php will initiate the automated test suite run. There are some options for which to control what tests are run and other options which trigger how the automated test suite works. Without any arguments, all tests will be run with default options. wp-test.php会将运行的自动化测试suite初始化。有些选项可以控制运行哪个测试,还有一些选项关于自动化测试suite是怎样运行的。没有任何参数的情况下,所有的测试会使用默认选项运行。 The average time for running all of the tests can range between 2 minutes and 7 minutes. This is with the current 399 test cases. When the amount increases, so will the time it will fully take to execute all of the tests. 运行所有测试的平均时间从2分钟到7分钟不等,这是关于当前399 test cases。当test cases数量增加的时候,运作所有测试的时间也会增加。 '''Note for Windows Users:''' The wp-test.php makes use of [http://www.php.net/getopt getopt()] function, which does not work on Windows before PHP 5.3. You will have to wait until PHP 5.3 comes out before you can use the command line on Windows or add some hacking to get it to work for you. ''' Windows 用户 应该注意:''' wp-test.php使用了[http://www.php.net/getopt getopt()]函数,这个函数在PHP5.3之前的Windows上不能够运行。你需要等待知道PHP5.3出现,你才能够在Windows上使用命令行或者添加一些hacking,使得函数能够运行。 Run the tests by typing: <tt>php wp-test.php</tt> in the command line. 通过在命令行中输入:<tt>php wp-test.php</tt>运行测试。 === Arguments === === 参数=== * -v : You can run WordPress Mu instead of WordPress, by typing <tt>php wptests.php -v mu</tt> * -v :通过输入<tt>php wptests.php -v mu</tt>,你可以运行WordPress MU而不是WordPress * -t : Choose which test you want to run, this is the class name, which is the test suite with the test cases. * -t :选择你想要运行哪个测试,这是class名称,是test cases的test suite。 * -r : The directory of WordPress which will be used to test. You may create custom patches on other locations and this allows you to not have to checkout multiple Automattic WordPress Tests repositories for which to apply those patches for testing. * -r :WordPress目录,将会用于测试。你可以在其它的地址上创建自定义补丁,这使你不用检查多个将补丁应用来测试的Automattic WordPress Tests知识库, * -s : If this option exists, then known WordPress bugs will be skipped. * -s :如果存在这个选项,那么会删除已知的WordPress程序错误。 * -f : If this option exists, then it will force skipping known WordPress bugs. * -f :如果存在这个选项,那么会迫使删除已知的WordPress程序错误。 The first three require a value to be after it, the last two only need to be typed. All arguments are optional. 前三个参数的后面需要加上一个值,后两个参数只需要输入即可。所有的参数都是可选择的。 === Examples === === 例子=== For example, if you wanted to run the Plugin API Actions test suite, then you would type the following on the command line: php wp-test.php -t WPTestActions 例如,如果你想要运行插件API Aciton 测试 suite,那么你需要在命令行中输入以下的内容: php wp-test.php -t WPTestActions If you wanted to skip known bugs, you would type the following: 如果你想要删除已知的程序错误,你需要输入以下的内容: php wp-test.php -s And if you wanted to force it: php wp-test.php -s -f php wp-test.php -s 如果你想要强迫删除程序错误,输入: php wp-test.php -s -f
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)