简体   繁体   English

PHP自动部署和测试

[英]PHP Automated Deployment and Testing

I asked a question here on automated deployment of automatically deploying java code. 在这里问了一个关于自动部署java代码的自动部署的问题。

Our back-end Java API is accessed by a PHP web app. 我们的后端Java API由PHP Web应用程序访问。 It would be nice to be able to automatically deploy this web app (along with static files like CSS, JS and images) to our web server while performing automatic testing on PHP code. 能够在对PHP代码执行自动测试的同时自动将此Web应用程序(以及CSS,JS和图像等静态文件)部署到我们的Web服务器,这将是一件好事。 Is there something similar to this for PHP? PHP有类似的东西吗?

I also wonder if as part of this automated testing you can check that each actual page loads without a fatal error. 我还想知道,作为此自动化测试的一部分,您可以检查每个实际页面加载没有致命错误。 I am sure I read about a google project which allows you to write page tests eg click on link a, go to page b etc etc. 我确信我读到了一个允许你编写页面测试的谷歌项目,例如点击链接a,转到页面b等等。

Thanks 谢谢

您可能希望使用Phing进行部署,其功能允许使用PHPUnit和/或SimpleTest进行测试

Maybe this question handling deployment strategies can help you. 也许这个处理部署策略的问题可以帮到你。

Additionally, but maybe gone too far, tools like cruise control may help you to apply continuous integration, too. 此外,但可能走得太远,巡航控制等工具也可以帮助您应用持续集成。

PHPUnit with ant was my way to go for automated testing, which could be a vaild option for you, too since you're obviously using some java already :) 带有ant的PHPUnit是我进行自动化测试的方法,这对你来说也是一个很好的选择,因为你显然已经使用了一些java :)

Since you're working with Java, you might consider using Hudson (also mentioned in your other question), which has the ability to execute build tasks consisting of several 'steps' One step step could be unit testing your Java App, another unit testing a PHP app, yet another deployinhg Java app, and another deploying a PHP app (and you could add some more ;P ) 由于你正在使用Java,你可能会考虑使用Hudson(在你的另一个问题中也提到过),它能够执行由几个“步骤”组成的构建任务。一步可以是对Java App进行单元测试,另一个单元测试一个PHP应用程序,另一个deployinhg Java应用程序,另一个部署PHP应用程序(你可以添加更多; P)

It has a Maven plugin, so you could actually use your existing Maven scripts. 它有一个Maven插件,因此您可以实际使用现有的Maven脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM