2

I am wanting to maintain a global dataset in Visual Studio 2012 Ultimate when performing a distributed load test.

My query is as follows. My understanding is that when distributing load tests to test agents via a controller, all data sources and associated plugins are passed onto the agent and executed in the context of that machine.

If I wanted to maintain a global variable or dataset at the controller level, could that be achieved by setting up some static (thread-safe) classes in the solution itself?

Example:

enter image description here

DawnFreeze
  • 164
  • 1
  • 3
  • 13

1 Answers1

1

The agents and the controller are separate computers. As far as I know the controller does not run any of your test code, the controller only runs code to manage the test. The agent computers each have a separate almost identical copies of your test application. The only differences I know between the code plus data on the different agents is the agent number and the data source values when Unique access is specified.

Static values in the test application will be static on each agent separately. There is no sharing of the static values between agents. To achieve some kind of shared data across the agents will require some code to be written.

AdrianHHH
  • 13,492
  • 16
  • 50
  • 87
  • Thanks for your reply... so essentially I can imagine that the entire solution (.sln) is dropped on each agent? not just the test or test project? – DawnFreeze Feb 22 '15 at 20:21
  • @DawnFreeze that is correct, each agent essentially acts independently. The only coordination is in the virtual user load and the splitting of data rows as AdrianHHH mentioned. Two strategies for sharing state or data from a single source (both of which require programming) would be using the SQL Server database or some kind of lightweight web service. For example using SQL Server to generate unique virtual user ids that are unique across the entire test rig. – agentnega Mar 10 '16 at 23:18