Instructions for running remote JMeter
aws_instance_hostname = "TODO"
test do
threads count: 10 do
visit name: 'Google Search', url: 'http://google.com'
end
end.run(
:gui => true,
:file => "jmeter.jmx",
:log => "jmeter.log",
:jtl => "jmeter.jtl",
:properties => File.join("jmeter.properties") + " -R " + aws_instance_hostname # script injection to to run remote tests!
)
aws ec2 run-instances --image-id ami-xxxxxxxx --count 1 --instance-type m1.medium --key-name MyKeyPair --security-groups MySecurityGroup
ssh <aws_instance_hostname>
yum install java-1.7.0-openjdk.x86_64
cd /tmp
wget http://mirror.mel.bkb.net.au/pub/apache//jmeter/binaries/apache-jmeter-2.10.tgz
cd /opt
tar -xvzf /tmp/apache-jmeter-2.10.tgz
echo "export JMETER_HOME=/opt/apache-jmeter-2.10" >> $HOME/.bash_profile
source $HOME/.bash_profile
cd $HOME
echo "server.rmi.localport=1099" >> jmeter.properties
$JMETER_HOME/bin/jmeter-server -Djava.rmi.server.hostname=`GET http://169.254.169.254/latest/meta-data/local-ipv4` -p jmeter.properties &
tail -f jmeter-server.log
brew install jmeter
echo "client.rmi.localport=60000" > jmeter.properties
ssh -R 60000:localhost:60000 root@<aws_instance_hostname>
export JVM_ARGS="-Djava.rmi.server.hostname=localhost"
bundle exec test.rb
source 'https://rubygems.org'
gem 'ruby-jmeter', github: 'lukeck/ruby-jmeter'