Using Live Http Headers with JMeter

Recently we were having difficulty creating an Apache JMeter test for an application that relied on multiple domains for single sign on. I often use the Live Http Headers Firefox add-on to monitor the exact request and response values when troubleshooting issues. Although JMeter has the ability to proxy traffic in order to create scripts, it seemed like it wasn’t capturing everything I needed. I ended up writing a quick Groovy script that let me convert the log from a Live Http Headers session into a JMeter script that I could then tweak to get a working JMeter test. The script does the transformation in two parts, first it converts the Live Http Headers log into xml and the transforms that into the .jmx xml format. You could easily modify the script to just output Live Http Header informatin in an XML format. You can find the script on GitHub here. Any feedback welcome.

Tagged with:
 

Combining Node.js & Apache

I decided to create a small project in order to learn node.js and wanted to document some of the configuration steps I used in case anyone attempts a similar setup. My goal is to use Node for what it excels at – lightweight, psuedo real time web requests while leaving Apache in place to serve up static content.

After installing node, I installed npm (node package manager)

curl http://npmjs.org/install.sh | sh

Next I installed node-http-proxy which will let node selectively proxy certain requests

npm install http-proxy

Based on some preliminary research, using Apache to proxy for node would defeat some of the performance & scalability advantages of Node. So I decided to make Node the first layer for http requests. To get this to work (under Ubuntu) I first moved Apache over to port 9000 by editing /etc/apache/ports.conf


NameVirtualHost *:9000
Listen 9000

I also edited /etc/apache2/sites-enabled/000-default and updated the VirtualHost

Restart Apache
sudo /etc/init.d/apache restart

And you should now see Apache running on port 9000

Since I don’t want to run Node as root, I added an iptables rule to forward requests for port 80 to port 8000
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8000

To view the new rule use
iptables -t nat -L -n -v

And should you need to delete a rule, use the index of the rule from the previous command with this command
iptables -t nat -D PREROUTING RULE_INDEX_HERE

And the last step is to create a node server that runs on port 8000 and does conditional forwarding to Apache which is now listening on port 9000. For this I created a configuration based off one provided by indexzero. You can find mine here.

Due to this bug that has been fixed but not released yet, I had to use latest code from github of node-http-proxy for this to work.

Tagged with:
 

About a year ago, while the Flex 4 ground was still moving, Andy Mcintosh blogged a well done prompting text input done with spark components and skinning. As a few people have noted in the comments to that blog, enough changed by the time Flex 4 was complete that his code no longer compiles (mainly because of the demise of the SimpleText component). I went ahead and modified his code enough to compile with Flex 4.1. I’m including the working sample in case anyone else has the same need. (view source enabled).

Tagged with:
 

I spent a little time tonight trying to figure out the included conflicting dependency message I was getting when attempting to install the Groovy Eclipse plugin. Despite the dependency message, the way to resolve this for me was to start Eclipse as Administrator and then install the plugin. Once I did this, the Groovy plugin installed just fine.


Cannot complete the install because of a conflicting dependency.
Software being installed: Groovy-Eclipse Feature 2.0.2.xx-20100630-0900-e36 (org.codehaus.groovy.eclipse.feature.feature.group 2.0.2.xx-20100630-0900-e36)
Software currently installed: Shared profile 1.0.0.1280108762289 (SharedProfile_epp.package.java 1.0.0.1280108762289)
Only one of the following can be installed at once:
Java Development Tools Core 3.6.0.xx-20100630-0900-e36 (org.eclipse.jdt.core 3.6.0.xx-20100630-0900-e36)
Java Development Tools Core 3.6.0.v_A58 (org.eclipse.jdt.core 3.6.0.v_A58)
Cannot satisfy dependency:
From: Shared profile 1.0.0.1280108762289 (SharedProfile_epp.package.java 1.0.0.1280108762289)
To: org.eclipse.jdt.core [3.6.0.v_A58]
Cannot satisfy dependency:
From: Shared profile 1.0.0.1280108762289 (SharedProfile_epp.package.java 1.0.0.1280108762289)
To: org.eclipse.jdt.feature.group [3.6.0.v20100526-0800-7z8XFUJFMTfCWGoVuHImpms9H155]
Cannot satisfy dependency:
From: Groovy-Eclipse Feature 2.0.2.xx-20100630-0900-e36 (org.codehaus.groovy.eclipse.feature.feature.group 2.0.2.xx-20100630-0900-e36)
To: org.codehaus.groovy.jdt.patch.feature.group [2.0.2.xx-20100630-0900-e36]
Cannot satisfy dependency:
From Patch: org.codehaus.groovy.jdt.patch.feature.group 2.0.2.xx-20100630-0900-e36 Eclipse Java Development Tools 3.6.0.v20100526-0800-7z8XFUJFMTfCWGoVuHImpms9H155 (org.eclipse.jdt.feature.group 3.6.0.v20100526-0800-7z8XFUJFMTfCWGoVuHImpms9H155)
To: org.eclipse.jdt.core [3.6.0.xx-20100630-0900-e36]
Cannot complete the install because of a conflicting dependency.  Software being installed: Groovy-Eclipse Feature 2.0.2.xx-20100630-0900-e36 (org.codehaus.groovy.eclipse.feature.feature.group 2.0.2.xx-20100630-0900-e36)  Software currently installed: Shared profile 1.0.0.1280108762289 (SharedProfile_epp.package.java 1.0.0.1280108762289)  Only one of the following can be installed at once:     Java Development Tools Core 3.6.0.xx-20100630-0900-e36 (org.eclipse.jdt.core 3.6.0.xx-20100630-0900-e36)    Java Development Tools Core 3.6.0.v_A58 (org.eclipse.jdt.core 3.6.0.v_A58)  Cannot satisfy dependency:    From: Shared profile 1.0.0.1280108762289 (SharedProfile_epp.package.java 1.0.0.1280108762289)    To: org.eclipse.jdt.core [3.6.0.v_A58]  Cannot satisfy dependency:    From: Shared profile 1.0.0.1280108762289 (SharedProfile_epp.package.java 1.0.0.1280108762289)    To: org.eclipse.jdt.feature.group [3.6.0.v20100526-0800-7z8XFUJFMTfCWGoVuHImpms9H155]  Cannot satisfy dependency:    From: Groovy-Eclipse Feature 2.0.2.xx-20100630-0900-e36 (org.codehaus.groovy.eclipse.feature.feature.group 2.0.2.xx-20100630-0900-e36)    To: org.codehaus.groovy.jdt.patch.feature.group [2.0.2.xx-20100630-0900-e36]  Cannot satisfy dependency:    From Patch: org.codehaus.groovy.jdt.patch.feature.group 2.0.2.xx-20100630-0900-e36 Eclipse Java Development Tools 3.6.0.v20100526-0800-7z8XFUJFMTfCWGoVuHImpms9H155 (org.eclipse.jdt.feature.group 3.6.0.v20100526-0800-7z8XFUJFMTfCWGoVuHImpms9H155)    To: org.eclipse.jdt.core [3.6.0.xx-20100630-0900-e36]

Tagged with:
 

TabIndex problems using PopUpManager

I recently spent some time trying to figure out why the controls on a Flex popup window didn’t seem to have any tab index. While debugging the problem I found that the focusManager was null for the popup window. I finally discovered that the PopUpManager will only automatically create a FocusManager if the popup window implements IFocusManagerContainer. It turns out that the spark VGroup component does NOT implement that interface. After switching to a BorderContainer (with a VerticalLayout) tabbing worked as expected. Here’s an example demonstrating the problem and solution (view source enabled).

Update: As JabbyPanda points out in the comments, you can take advantage of this behavior to disable the focus behavior in a popup by using a Group container. This appears to be the strategy employed by the ComboBox component.

Tagged with:
 

Categories