Setting up a Test Rig in the cloud can be cumbersome task if not done right. The steps below will guide you through setting up loadtest Rig successfully in the AWS.
Setup Instances in AWS Account:
In order to setup a Visual Studio loadtest rig in AWS, firstly a user must create an AWS account which is quite straightforward. Once you have successfully logged in to the application, follow the below mentioned steps to setup the load test rig:
Steps to be followed:
1. Launch Instance:
2. Configure Security Groups to enable Ping as below:
Setting Up Agent Machine:
Installing the Load Test Agent is the easiest part of the rig installation. Make sure that the controller service is running and then all you must do is run the installer, provide the service credentials and the name of the controller. The same process follows for each of the load test agent machine.
1.Launch the Instance
- Make sure the Agent and Controller have the same username and password with Admin Privileges
2. Disable Firewall:
Check for Windows Firewall properties:
- File and printer Sharing
3. Edit hosts file of the Machines:
Enter the following:
- <private IP of Controller machine > <public DNS of Controller machine >
- <public IP of Controller machine > <public DNS of Controller machine >
- <private IP of Controller machine > <host Computer Name of Controller machine >
4. Edit QTAgent.exe.config file:
- Always stop Visual Studio Test Agent (services.msc) before editing this file and then start.
- Stop cmd Command: net stop vsttagent
- Start cmd Command: net start vsttagent
- Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE
<add key=”BindTo” value=”<Host private IP address>”/>
5. Install Agent as Administrator User.
6. Configure the Test Agent as below:
7. Message of successful configuration:
Setting Up Controller Machine:
1.Launch the Instance
- Make sure the Agent and Controller have the same username and password with Admin Privileges.
2. Disable Firewall:
3. Edit hosts file of the Controller Machines:
Enter the following:
- <private IP of Agent machine> <public DNS of Agent machine >
- <public IP of Agent machine > <public DNS of Agent machine >
- <private IP of Agent machine > <host Computer Name of Agent machine >
4. Edit QTController.exe.config file:
- Always stop Visual Studio Test Controller (services.msc) before editing this file and then start.
- Stop cmd Command: net stop vsttcontroller
- Start cmd Command: net start vsttcontroller
- Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\TestController\Common7\IDE
<add key=”BindTo” value=”<host IP Address>”/>
5. Install Controller as Administrator User.
6. Configure the Test Controller as below:
7. Message of successful configuration:
References:
- AWS Instance Specs: https://aws.amazon.com/ec2/pricing/on-demand/
- Visual Studio IP Binding :https://docs.microsoft.com/en-us/visualstudio/test/how-to-bind-a-test-controller-or-test-agent-to-a-network-adapter
- https://docs.microsoft.com/en-us/visualstudio/test/troubleshoot-test-controllers-and-test-agents
- https://stackoverflow.com/questions/47022824/disabling-the-firewall-in-ubuntu-on-an-amazon-ec2-instance
- https://chanmingman.wordpress.com/2013/07/10/test-agent-could-not-connect-to-the-test-controller/