Posts Tagged ‘Integration Testing’

Using Badboy to build JMeter Test Plans over an SSL

Wednesday, June 8th, 2011

I’ve just recently began using JMeter to stress/load test a Coldfusion application. After reading some blogs on JMeter I got everything set up locally and created a proxy site to my application. But I quickly realized that the proxy is not supported for applications running under an SSL.

The JMeter forum revealed that an easy way to create test cases under an SSL is to actually create the test with a program called Badboy. Luckily for me I’ve been using badboy for automated regression testing for the past year or so. I had never noticed however, that once a badboy test is created there is an export to JMeter option. After exporting a test case I then learned that the badboy export has not yet been updated to support JMeter 2.4. However, it does support JMeter 2.3.4

So the steps for setting up an environment for creating JMeter 2.4 test cases for an application running under an SSL are:

  1. Download JMeter 2.4 (http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi)
  2. Download JMeter 2.3 (http://archive.apache.org/dist/jakarta/jmeter/binaries/)
  3. Download BadBoy (http://www.badboy.com.au/download/index)

Note that both versions of JMeter are downloaded on the assumption that you will want to execute your JMeter tests in 2.4, but you will need 2.3 to make the test cases compatible with 2.4. If you are happy just using 2.3 then you will not need to download 2.4.

Once you have the necessary software do the following:

(more…)

Using Selenium 2.0 with Python 3.2 doesn’t work well yet

Wednesday, May 4th, 2011

So I recently set up a testing environment using the Selenium webdriver and Python 3.2. I had some initial issues with getting it to just generally run which I resolved and blogged here. Nonetheless, I’ve since had a chance to dig a little deeper and it turns out that there are still things in the code that did not convert well from Python version 2 to 3 using the 2to3.py utility.

As such, I’ve uninstalled Python 3.2 and reinstalled version 2.7. I’ve run some of the tests that were failing while I had 3.2 installed and everything seems to be passing. So that’s good news. I’ll keep an eye out on and updated Python binding for Selenium 2 and give it another shot once there is an update.

Using Selenium 2.0 with Python 3.2

Wednesday, May 4th, 2011

Currently the Python Bindings for Selenium are not completely compatible with Python 3.2. I’ll show here how to make the python files compatible with version 3.2 using the python 2to3 utility. I am assuming here that you have Python installed and running, you have downloaded and installed Selenium 2.0, and that you have downloaded the Python Bindings and dropped the ‘selenium’ directory into your python ‘Lib’ directory to be used as a module.

So if you have all of this installed and you run the following line in the Python IDLE

from selenium import webdriver

you will most likely (considering that the Binding code has not been updated between now and then) get an error indicating a syntax error on line 193 or thereabouts. This syntax error is occurring because the Binding code is written for python version 2.7.

Good news though. Python 3.2 comes with a utility in the ‘Tools’ directory that will convert any .py file or files from version 2 to version 3.

If you want to find the actual file you can find it in the Python32/Tools/Scripts directory. It is named 2to3.py.

So we’ll execute this utility from the command line. So if on windows do Start/Run – type cmd to open the prompt. On mac use Applications/Utilities/Terminal.

(more…)