Translate

05 February 2009

Blogging Tips : How To Sleep Better After an Upgrade

Blog Unit Testing


Upgrading your blog platform? This guest post from Sid Savara, who writes about personal development and personal productivity is for you.

If you’re a Thesis user (like me) you may have had some issues recently when upgrading to version 1.4. The issues affected a minority of Thesis users, and required reverting to an old version of Thesis for the sites to function while Chris Pearson troubleshot the issue - on his customer’s servers, free of charge. Chris was very responsive and issued a patch the same day (1.4.1), followed by another patch over the weekend (1.4.2). My hat’s off to Chris for providing what can only be called unparalleled customer support in a difficult situation.





This experience brings me to the larger issue - how do you ensure everything on your blog still works after an upgrade? This isn’t the first time I’ve had an issue upgrading - and I’m certainly not the first Wordpress user to experience hiccups during the upgrade process either. We all occasionally have issues when we upgrade plugins, install a new plugin or upgrade Wordpress itself.

Perhaps the most sinister are those issues where everything looks like it’s working fine. Sometimes after an upgrade I won’t even notice an issue until days later, and I’ll have to go back through my plugins one at a time to see what originally caused the problem.

Until recently, I checked for problems after an upgrade with the old blogger favorite “randomly click around and see if anything looks broken” strategy. The weakness of this strategy is the propensity to miss errors. I decided I needed a way to be more certain that everything went smoothly, and borrowed a couple concepts from my background in software engineering to help: Unit Tests and Regression Testing.

Unit Tests and Regression Testing

Units tests are simple, single function tests done to ensure every part of the software does what it is supposed to. If the test fails, you know exactly where the problem is and can fix it. Likewise, for my blog, each unit test checks for a specific piece of blog functionality.

In software development, a test might work at the time I first run it - but down the road I may change something that causes the test to fail. Repeating the tests whenever any change is made is called regression testing. In my years of software development, I’ve learned that a new change can cause software to react in ways we may not expect. Upgrading a plugin may cause another plugin to fail, or perhaps cause errors in your RSS subscriptions (which happened to me). For this reason, whenever I upgrade or install anything new to my blog, it is important I retest everything, every time - even if the change appears unrelated.

Blog Unit Tests

With that background, here is a handy checklist to review every time you install new plugins or themes, or upgrade any part of your blog. Some tests are especially relevant when installing a new theme, while some should be reviewed carefully in cases of plugin installs and upgrades. Since you won’t know exactly what is affected by each change, it’s important to go through the entire list every time. This list gives you specific checks you can run through in 15-30 minutes and know that your installation is successful. I use Wordpress - but this list should apply regardless of your blog or CMS platform.

Note: When running these tests, be sure to force a refresh and clear your browser cache before beginning so you are seeing the current version of your site. If this sounds like Greek to you, here’s a brief explanation of forcing refreshes.

  1. Index page
    1. Title of the page. Is it what you want it to be? Are site name and tag line in the order you desire?
    2. Site name. Is it present? Is it clickable (if you want it to be)?
    3. Description/tag line. Is it present? Is it clickable (if you want it to be)?
    4. Header image. Does clicking on it return you to the home page? Do you want it to?
    5. Favicon. Is your favicon still present? This is a sinister one, as browsers sometimes cache these even if you are forcing a refresh.
    6. Excerpts, Thumbnails and Full Posts. Is the index showing excerpts or full posts the way you want it to? If applicable, are thumbnails and featured posts where they should be?
    7. Post Titles/Permalinks. Does clicking on a post title take you to the blog post?
    8. Comment links. Are the correct comment counts displayed? Does clicking the link take you to the appropriate comment form?
    9. Categories/Tags. Are category and tag links displayed? Do you want them to be?
    10. Meta description. View your page source. Look for […]” />. Is the value in the […] what you expect it to be? See SEO Tips for Blogs for a detailed discussion of why this is important. You may, optionally, want to repeat this test on single post pages.
  2. Index sidebar (s), navigation links and footer
    1. Widget enabled theme. Are all the widgets present?
    2. Widget order. Are the widgets in the order they should be?
    3. Links in widgets the sidebar. Does clicking a link take you where you expect it to? Appropriate pages, external sites, etc? Do the links open in a new window, or the current window?
    4. Site wide navigation (if applicable). Are all the links present? Are they in the order desired? Click a couple. Do the links work? Do the links open in a new window, or the current window?
  3. Archive pages - tags, categories, sitemap, and date based
    1. Index page tests. Repeat all the same tests as the index page. Spot check one category, one tag and one month archive as applicable. If you have a sitemap, check that as well.
  4. Single Post pages
    1. Title bar. Is the post title and site name in the order desired? Does it show everything you want? Post Title, Category, Site Name, Tag Line?
    2. Post Title. Is the post title present? Is it clickable (or not) depending on what you want?
    3. Comment links. Do you want a link to the comment form displayed near the post title? Are the correct comment counts displayed? Does clicking that link take you to the appropriate comment form?
    4. Next/Previous post links. Are they displayed? Before, after, or both? Are they nofollowed or dofollow based on your preference?
    5. Page layout. Are sidebars, navigation links and footer present? Repeat the checks described under #2 above, Index sidebar (s), navigation links and footer .
    6. Categories and tags. Are categories displayed (or hidden) as desired? How about tags? Are they clickable? Are they nofollow or follow based on your preference?
    7. Breadcrumbs. If you have breadcrumbs, are they present and appropriate for the navigation you desire?
    8. Comment and Trackbacks: run through the list below.
  5. Comment and Trackbacks
    1. Comment form. Is your comment form present?
    2. Comments. Are comments displayed? Are the comment counts accurate? Do the gravatars work, if desired?
    3. Trackbacks. Is the trackback link present? Do you want it to be? Are your trackbacks listed?
    4. Test comment. Submit a test comment. Does your comment submit? Is it held in a moderation queue?
    5. Comment subscriptions. Subscribe to comments option
      1. Comment feed. Subscribe to a comment feed - do you see all the comments? When you submit/approve a new comment, does it update?
      2. Subscribe by email. If applicable, try subscribing by email and then submitting another comment - are you notified via email?
  6. Regular pages
    1. Comments on pages. Do you have comments enabled? Do you want them to be? Trackbacks?
    2. Sidebars. Are sidebars present? Do you want them to be?
    3. Page hierarchy. Is the hierarchy displayed the way you want it to be? How about your permalink?
    4. Repeat all the tests for the single post pages.
  7. Images and image links
    1. Images. Navigate to a page or blog post with images hosted on your blog. Do your images load? Check the alt text and title text on the images - are they what you want them to be?
    2. Larger image. Does clicking the image bring up the large version (if applicable)? Is the link nofollow or follow based on your preference?
  8. RSS feed
    1. New post. Publish a test post - does it appear in your feed? (You are subscribed to your own feed, right?)
    2. RSS Link. Double check the RSS link - is it pointing to your feed?
  9. Errors and Redirects
    1. 404 page. Type in an address that does not exist. Review the 404 page. Is it the way you want it to be?
    2. Redirects. Have you redirected posts or pages in the past? Spot check a few. A couple internal posts, a couple internal pages, and a couple external links.
  10. Contact form (if applicable)
    1. Send a test email. Send yourself a test email to ensure your contact form still works. Do you receive the email? Are all the fields present?
    2. Confirmation. Do you see an appropriate confirmation shown to the user on the site after submission? If applicable, is a confirmation email sent to the submitter?

This is only a partial list - but it’s a great starting point. If you have specific plugins installed such as CommentLuv, or various search plugins, be sure to check all of them individually as well. If you have a plugin that generates your sitemap, and you upgrade it - that’s a good time to go and double check that your sitemap page still loads appropriately.

What do you think? What tips do you have for ensuring upgrades go smoothly?

No comments: