Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
14 views

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.
0
votes
0answers
12 views

What is WP_MULTISITE and why it causes WP_UnitTestCase to create 404 page?

I'm using WP_UnitTestCase to create a post for unit test. I'm using WP_MULTISITE=1 on my CI and it causes create_post to create post type 404. $post_id = ...
7
votes
1answer
351 views

Testing hooks callback

I'm developing a plugin using TDD and one thing that i completely fail to test are... hooks. I mean OK, i can test hook callback, but how could I test if a hook actually trigger (both custom hooks ...
0
votes
1answer
27 views

How to initialize something in unit test before the init hook being called?

I've a simple PHP Unit written for WordPress and want the initialize code before the main 'init' action being called from the plugin I want to test, e.g. class MyPlugin_Test_Example extends ...
0
votes
0answers
19 views

Unit Test ignores stubbed method second time around in a dataProvider

I am writing a sample unit test that checks a title of a post for a token and if it exists add the post to a category. https://gist.github.com/matstars/bebedbacedd7a85d8dc7 In my test for this I am ...
1
vote
1answer
65 views

Activate different theme for temporary preview

I wanted that when i access my site with specific parameter, my site used a different theme at that moment (only temporarily, to show only to me as a preview). I want it for test purposes. Is there ...
2
votes
1answer
60 views

How to properly test a method that is called by an action hook

The constructor in my class adds an action to the 'init' action hook: class My_Custom_Post_Type { function __construct( $type ) { $this->type = $type; add_action( 'init', ...
0
votes
0answers
17 views

What is a good way to test that plugin upgrades have completed properly?

I'm working to automate plugin upgrades across all my WordPress installs. Part of that process is making sure the plugins upgraded correctly, didn't introduce errors and don't cause new conflicts with ...
1
vote
0answers
30 views

WordPress Automatic Testing Probelm

After much trial and error. I've managed to get the automatic testing setup and running. I'm running a test on a plugin that has no code. It's just the plugin header. Just to make sure everything is ...
3
votes
1answer
699 views

PHPUnit testing WordPress Plugin

Using answers on this site and from other resources, I have started writing my next plugin using PHPUnit tests and the WordPress test environment. Distilling down what I have in my plugin's ...
0
votes
0answers
30 views

Migrating a Test site to Main site on a multisite

I have cloned my main site using the plugin WP-Clone to a folder and installed wordpress on it (Mysite.com/test) and have spent about a month adding features and installing plugins and adding pages ...
0
votes
0answers
22 views

Folder installation to be in ROOT

What I want to achieve is just a simple removal of the /folder name after my website.com URL and have all my links and WordPress login just under website.com/wp-login.php. 1.) I did a restore ...
0
votes
0answers
52 views

What is the best way to move an entire multi-site Wordpress to a new domain?

I have a multi-site Wordpress 3.x instance set up with over 100 sites. I'm preparing to upgrade to version 3.7.x I want to allow my users to test what version 3.7 is going to look like ahead of ...
0
votes
1answer
47 views

How do you create a development site into a subdirectory of the live site?

I have a WordPress site at http://example.com and I want to create a clone development site at http://example.com/test. I want http://example.com/test to be its own root URL as well as the live one ...
0
votes
1answer
22 views

Change post date for testing purposes

Is there a way I can change a post date to preferably a different month and a year for testing purposes?
1
vote
1answer
507 views

Theme Check gives: Required: This theme doesn't seem to display tags?

I am testing my theme with Theme Check plugin and it shows this message: Required: This theme doesn't seem to display tags? Picture: How can i fix this?
3
votes
1answer
495 views

Why Can't PHPUnit UnitTest My Wordpress Website

I have been researching this issue for days and although many people ask this question I never found a clear and concise answer. I am running: PHP Unit: Version 3.7.21 WordPress: Version 3.5.1 OS: ...
1
vote
0answers
63 views

How to split test a menu item

I have four links in my main navigation menu, which is displayed on every page of my site. Link 1 | Link 2 | Link 3 | Link 4 I have a form that once completed is a goal/conversion and redirects to a ...
2
votes
1answer
1k views

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 ...
0
votes
1answer
67 views

can I run the test suite without a web server?

I'm trying to set up a Test Driven Development environment and I was wondering if it's possible to run the WordPress test suite without a web server. I'm on a mac (10.7.5) and I've set up phpunit and ...
3
votes
1answer
397 views

WP_UnitTestCase missing?

I was looking at tests for wordpress and some, if not all the classes have WP_UnitTestCase but I cannot find the class, why do I care? I have downloaded The most up to date version of this from github ...
4
votes
2answers
2k views

PHP unit testing WordPress?

Given how WordPress is written and how it interacts with a database and given how its not very much OOP oriented, is there a way to unit test a theme? is there a way unit test a framework (not a theme ...
0
votes
2answers
596 views

Publishing Wordpress from stage to production server

I'm having trouble configuring wp-config.php correctly in a staged server environment. I'm being told that I should be working in my stage environment for Wordpress with an example address of ...
2
votes
1answer
239 views

Can I get at WordPress code from inside a Selenium test?

I'm writing unit tests using PHPUnit and WP_UnitTestCase, and using Selenium for front-end testing. My Selenium test classes merrily click around my pages without trouble. What would be truly useful, ...
1
vote
3answers
686 views

Wordpress installation site folder move to the final site destination

My client have a site : business.com All the files of the old fashion site is there, images, video, html, css. i just made a folder called business.com/cms and installed wordpress here. FOr 2 month ...
1
vote
2answers
109 views

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 ...
0
votes
1answer
52 views

Test site pages go to main site

I have a test site installed on www.mydomain.com/testsite. The problem I have is that if I type in the url www.mydomain.com/testsite/about I get redirected to www.mydomain.com/about. My page for my ...
2
votes
1answer
62 views

automated tests as a user?

I checked out (with svn) the code for Automated Testing. However, I want to run unit tests as a specific user. Is there a way to do that? That is, is there a way to loggin with php code alone?
5
votes
2answers
4k views

Show different theme for admin?

I'd like to test some theme changes on my live site, but I obviously don't want regular users seeing any errors that may arise from it. I'd like to just duplicate my theme folder and if I'm logged in ...
1
vote
2answers
714 views

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 ...
1
vote
1answer
132 views

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 ...
10
votes
1answer
413 views

Developing, Testing and Releasing

How do you develop, test and deploy-to-live your Wordpress sites? Its always a bit of a faff I find, especially where databases are concerned - mainly due to the fact that having a testing site needs ...
0
votes
1answer
116 views

Testing performance of WordPress files

I would like to test the performance of PHP files in my installation, to find any bottlenecks. I already use plugins like Debug Queries and WPDB Profiler to watch the SQL Queries being generated, but ...
0
votes
1answer
223 views

Create a blank test.php

Sometimes it's necessary to figure out CSS errors or whatever and then it's great if you have a minimal test page where you just insert the specific code you want to test. How can I create such an ...
25
votes
1answer
320 views

How to perform unit testing on proposed patches in Trac?

I was looking for some insight and good resources on how to correctly perform unit testing on proposed WordPress patches in the Trac and how to accurately report the results from the testing. I'm new ...
0
votes
3answers
1k views

Duplicate a Wordpress Install for Testing Purposes

I want to test some plugins on my Wordpress site. However, I do not want to mess anything up. Is there a way to duplicate my Wordpress site to a new directory so that I can test plugins there before I ...
1
vote
1answer
105 views

A/B testing of posts with unique URLs for each variant AND editing in custom fields

I'm wondering if anyone could offer advice on how to think about creating an A/B testing plugin for posts that: A) lets me assign unique URLs for each variant post*1) and* B) is customizable on ...
6
votes
2answers
249 views

Creating Unique Post URLs for A/B Testing… Is this even possible?

I want to create a WordPress plugin that allows me to do A/B testing for WordPress standard posts, but I can't use the Shrimptest plugin because I need a spin: Since I'm ultimately testing ...
1
vote
2answers
94 views

Wordpress themes that are browser tested and maintained?

Are there any developers that offer themes that have a defined list of browsers tested, on desktop and mobile devices, that are also periodically updated to account for new browser versions?
4
votes
4answers
229 views

Is there an A/B testing plugin that lets you vary the heading, featured image, and content in a Wordpress post?

If not, are there alternate solutions that can let me accomplish this? Do I need to develop my own plugin?
1
vote
0answers
275 views

How can we set up a solid test site with Network mode (sub-domains) enabled? [closed]

Update: I came by a reasonable alternative to the approach explained below, instead using a GIT repo and a WordPress Multisite plugin: Deploymint: a staging and deployment system for WordPress. ...
2
votes
1answer
460 views

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.
2
votes
1answer
74 views

Is there any free (or cheap) software that can be used for testing WordPress functionality?

Is there any free (or cheap) software that can be used for testing WordPress functionality? I would like to create some test scripts and then them against my self-hosted WordPress installation.
5
votes
1answer
705 views

Programmatically create blogs with dummy content on a WPMU site

I'm trying to set up a WPMU test environment with 5-6K blogs, lots of posts comments, users etc. Browsing trough the WP's functions, I picked up wp_insert_post, wp_insert_comment, ...
11
votes
3answers
983 views

Unit testing for plugin development

I need to apply unit testing for one of my plugins. I recently re designed it into classes, so unit testing should be easier to apply now. What are some effective strategies to unit test my plugin? I ...
0
votes
2answers
110 views

How to run a test WordpressMu to Wordpress3 update?

Currently I am running a wordpress MU site with ~100 blogs. It's Wordpress MU version 2.8.x Because it was so heavily used, I was asked not to update to Wordpress 3 right away. The users are ...
0
votes
1answer
158 views

pingbacks testing

I have a few questions regarding functionality testing of PBs in a new wp installation (3.0.4): Are pingbacks sent immediately when a post is published, or are they scheduled as a cron job? If the ...
1
vote
3answers
826 views

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 ...
13
votes
2answers
2k views

Best Practices for Regression Testing WordPress Websites?

Hi all, I'd like to hear what others who are delivering complex non-blog solutions to clients with WordPress as a platform what they are using for automated Regression Testing? For those not ...
4
votes
1answer
1k views

Tutorials for Unit-Testing in WordPress and for unit-test.svn.wordpress.org?

I'm starting to learn Selenium and PHPUnit and I am interested in implementing what I've learned in my WordPress projects. I've seen http://unit-test.svn.wordpress.org and wonder if there are any ...