Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Automated Deployment and Testing

I asked a question here on automated deployment of automatically deploying java code.

Our back-end Java API is accessed by a PHP web app. 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. Is there something similar to this for 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 e.g. click on link a, go to page b etc etc.

Thanks

like image 611
christophmccann Avatar asked Jan 18 '11 22:01

christophmccann


3 Answers

You may want to look into using Phing for deployment which has features that allow testing with PHPUnit and/or SimpleTest

like image 76
wajiw Avatar answered Nov 18 '22 21:11

wajiw


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 :)

like image 28
luchaos Avatar answered Nov 18 '22 19:11

luchaos


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 )

It has a Maven plugin, so you could actually use your existing Maven scripts.

like image 1
Mchl Avatar answered Nov 18 '22 20:11

Mchl