News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Maarten Balliauw:
Running unit tests when deploying to Windows Azure Web Sites
January 30, 2013 @ 10:25:20

Maarten Balliauw has a new post to his site showing you how to execute your unit tests (in this case PHPUnit) when you deploy your instance out to the Windows Azure platform.

When deploying an application to Windows Azure Web Sites, a number of deployment steps are executed. For .NET projects, msbuild is triggered. For node.js applications, a list of dependencies is restored. For PHP applications, files are copied from source control to the actual web root which is served publicly. Wouldn't it be cool if Windows Azure Web Sites refused to deploy fresh source code whenever unit tests fail? In this post, I'll show you how.

He creates a super basic script using Silex and writes up a test with some dummy assertions, checking if true equals true. He then steps you through updating the current "deploy.sh" script to add in a call to execute PHPUnit and an "exitWithMessageOnError" statement. This statement kicks it back and causes the deployment to fail when tests don't pass (as seen here).

0 comments voice your opinion now!
windows azure phpunit unittest execute deploy fail


blog comments powered by Disqus

Similar Posts

Sebastian Göttschkes' Blog: Extending the Testclass for Unittests

Mike Lively's Blog: Pear Channel set up for Phake

Phil Sturgeon: Testing and Contributing with Composer Packages

Elizabeth Smith's Blog: How to Compile PHP5.2 and PHP-GTK2 on Windows using Visual C++ Express

Sebastian Bergmann's Blog: Test Dependencies in PHPUnit 3.4


Community Events











Don't see your event here?
Let us know!


overview framework symfony2 hhvm threedevsandamaybe release introduction opinion hack composer unittest application facebook component install security podcast package code language

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework