Rough Book

random musings of just another computer nerd

Tag: development

Displaying images side-by-side in WordPress

I’ve been using WordPress for about two months now and I really like it. It takes away a lot of the pain from blogging. Recently I was writing a blog post and I was trying to get two images displayed side-by-side. This proved to be more difficult than I thought. There’s no immediately obvious way in WordPress to display images side-by-side. I tried to use tables, but that didn’t work out. I also tried to use the gallery, but that displays all the images, and I just wanted to display two. I was able to get it working finally.
Read the rest of this entry »

Duct-tape programmers are not heroes

Today, I ran into this article from Joel on Software. Usually, I listen to what software professionals have to say regarding software development and software-development processes in general, and I mostly agree with them. However, I found myself vehemently disagreeing with this article.
Read the rest of this entry »

Writing Performance Tests in Grinder using a Framework

This project is now available on GitHub.

Before reading this tutorial (if you haven’t already), please took at look at my last two tutorials (Performance Testing using The Grinder and Anatomy of a Grinder test-script). In this tutorial I’ll talk about easily writing Grinder test-scripts using a framework I designed. As a disclaimer, I’d like to point out that I’m not a Python programmer and therefore certain things may not be very python-esque. If that’s the case, I apologize. My personal opinion is that this framework is especially useful (of course, since I wrote it ;)) for web applications where you have a already have a lot of test data. In that case, you can simply record all your discrete tasks once and then construct different scenarios with them. But if you feel differently and have some constructive criticism, I do look forward to hearing from you! Also, if you’d like to try out the framework I’ve got a tarball and a zip file available for download on the very last page.
Read the rest of this entry »

Anatomy of a Grinder test-script

This is my second post regarding Grinder. In this post I’ll go over the anatomy of a recorder Grinder test-script. If you haven’t read my previous post, please take a look at it. Otherwise this post won’t make much sense!

High-level structure of a Grinder script

The high-level structure of a recorded Grinder-test-script looks like this:

[
...
import statements
...
]

[
...
header definitions
...
]

[
...
url definitions
...
]

[
...
request and test definitions
...
]

class TestRunner:
     [
     ...
     method definitions - a method is defined for each recorded page
     ...
     ]

     def __call__(self):
     [
     ...
     calls to defined methods, which actually runs the requests
     ...
     ]

     [ utility function (I'll go over this later) ]

     [
     ...
     calls to utility function to wrap/instrument tests (I'll go over this later)
     ...
     ]

Read the rest of this entry »

Performance testing using The Grinder

About a month ago at work, I was trying out a bunch of different performance-testing tools to figure out which one to use to performance-test our software. I ended up discovering a tool called The Grinder which uses Jython to build performance-testing scripts that you can then use to test your application. I even built a little framework in Jython to make the test scripts more modular and reusable. Over the next few days I’ll be publishing three articles (this one included) that talk about Grinder.

Introduction

In this article I’ll go over installing and setting up Grinder. I am not going to go into too many details since my aim is to provide information that will enable you to have Grinder up and running quickly. If you want more information, you can look at the rather thorough Grinder User Guide. At the end of this guide, you’ll know how to install and set up grinder, record a test, modify (and/or parameterize) it, start running it through the console, and record data from the test. Note: The instructions in this guide relate to a Linux environment. You can run Grinder in Windows; the set-up is not much different. The only differences will be in installation locations and shell scripts. If you want more information about setting up Grinder in a Windows environment, please take a look here.
Read the rest of this entry »

All original content on these pages is fingerprinted and certified by Digiprove
%d bloggers like this: