Articles of testing

PHPSpec and WordPress

I installed PHPSpec and I’m wondering how should I get the WordPress environment up and running in order to run my tests; Essentially, now I can’t access anything from the WordPress API as the test file is outside the environment. Does anybody have any idea what should I load in order to make it work? […]

How to test drive WordPress on VPS with LEMP stack before going live?

I have example.com up and running on a VPS droplet running Ubuntu 16.04. The website was built with WordPress on LEMP stack (Linux EngineX MySql and PHP) which was done using EeasyEngine. EasyEngine would install the LEMP stack automatically. Suppose I want to experiment with example.com in another location and replace the old live example.com […]

Load testing for WordPress functionality

Does anyone know of (or have) any scripts / processes they use for testing performance under load – especially of WordPress specific behaviours, like posting many comments nearly simultaneously, while under heavy simulated traffic. I typically use apachebench to test general performance (and to make sure caching is working), but I can’t see a way […]

Plugin development: How many plugin and WordPress version combinations to support?

I’m developing a plugin (my first plugin), and I wonder how to think about [supporting and testing various plugin version and WordPress version combinations]. For example, if I develop a plugin, and release versions 1.0 and 1.1 and 2.0. Meanwhile, WordPress releases versions 3.2, 3.3 and 3.4. Now, at the one extreme: Should I assume […]

How to add an image for unit testing?

I have to test the function where it calls wp_get_attachment_image_src. How do I add an image for testing, because right now if I call this method it returns false.

Is there a way to activate different theme for specified users?

I’m looking to allow beta testing of a theme on WordPress site in production. I was thinking of a plugin to check if WordPress user has been selected for beta phase, and if this evaluates to true then activate another theme for him/her. Ideally users could opt-in/out of beta phase by just visiting their profile. […]

Can I check plugins and themes for PHP 5.6 ahead of global PHP server Update

My server is updating to PHP 5.6 next week. I manage about 30 WordPress websites. I looked for a plugin that would check if any of the code throughout the other plugins and theme would break with the update. I tried using the log deprecated notices plugin but it didn’t seem very conclusive as to […]

PHP logging framework to be used with WordPress

There are different PHP logging frameworks out there e.g. Log4php, KLogger. I want to choose one based on its experience with WordPress. Please suggest me one.

How to transfer changes from test environment to live site?

As with most other software it’s safer to try new plugins, configuration options or template changes in a separate testing environment, see e.g. WordPress local development environment. Most questions and answers I’ve seen about this is the simpler case: doing the initial development locally and then deploy everything to the live site. That is easy. […]

How can I debug my database connection for unit testing?

I’ve set up a wordpress environment on my Mac with MAMP and I’m running 3.5.1 locally (i.e. http://localhost:8888/blog works). I’m trying to run the unit test suit from wordpress.org and having trouble connecting to the database. $svn co https://unit-tests.svn.wordpress.org/trunk wordpress-tests $cd wordpress-tests $cp wp-tests-config-sample.php wp-tests-config.php edit wp-test-config.php for my setup $ cat wp-tests-config.php <?php /* […]