Testing in the cloud

PDF Print E-mail
User Rating: / 11  |  Rate this article: PoorBest 

1. Launching LoadUI agents in the Amazon cloud

You can launch any number of LoadUI agents, anywhere in the world, with a couple of clicks! We won't charge you a dime (Amazon might though). Simply go to the LoadUI agent in AWS Marketplace and click Continue:

awsMarketplace

If you're not logged in to an Amazon AWS account, you'll be asked to do so (or register a new account, but chances are that your company already has an account). Once you're logged in, click Launch with 1-click to launch a new agent:

awsMarketplace_step2

2. Connect LoadUI to your Amazon Agent

Upon launching an agent, you'll see the An instance of this software is now deploying on EC2 dialog (shown below). In order to connect to this agent from LoadUI, we need to know its public DNS. To do so, click AWS Management Console:

awsMarketplace_step3

The AWS Management Console will now open, with your LoadUI agent selected. The public DNS of the agent will be similar to ec2-54-211-200-0.compute-1.amazonaws.com and can be found at the bottom of the screen:

awsMarketplace_step4

Now open LoadUI Pro. In the workspace view and drag a new agent out from the toolbox. As the Agent URL enter the public DNS.

addAgent2

LoadUI Pro will now add the agent and you're ready to load test in the cloud!

3. Optional

3.1. Connecting using SSH

Sometimes you want to customize error-handling or you might want to install additional services on your Instance. This is done by right-clicking your instance and selecting Connect from here you can chose whether to Connect with a standalone SSH Client like putty in windows or ssh-command in mac or linux. But easiest is clicking Launch SSH Client-button in the Connect-view using username: ubuntu, you also need to provide the .pem-file.

connect_console

Using your favourite ssh-client you can now navigate the file structure of the instance.

3.2. Restarting your agent

Either use the AWS control panel and right-click the instance and choose reboot. Alternatively you can do it from command-line as follows.

If you want to stop the agent running on this instance simply type the following command:

/etc/init.d/loadui-agent stop

If you want to start it again:

/etc/init.d/loadui-agent start

3.3. Turn off logging

If you want to turn off logging or otherwise modify the startup procedures the you should open an SSH session and then firing your favourite text editor (for this example we use nano that is preinstalled)

sudo nano /etc/init.d/loadui-agent

turn_off_logging1

This takes you to the init script using the editor-of-choice:

turn_off_logging2

Simply change the line saying:

bash -c "$LOADUI_AGENT > $HOME/loadui-agent.log" ubuntu &

to instead say

bash -c "$LOADUI_AGENT" ubuntu &

turn_off_logging3

now press ctrl + O in nano to write to file followed by ctrl + X to exit the editor.

now you must restart the Loadui-agent process, using:

/etc/init.d/loadui-agent stop

followed by

/etc/init.d/loadui-agent start

in order to apply the new startup-settings