Rfswarm for performance test : Someone has already use it?

Hello,

I found “rfswarm” which is a testing tool that allows you use Robot Framework test cases for performance.
I’m not a dev and I have many difficulties to configure it to run it on my machine.

Someone has aleready use it and can help me?

Thanks

1 Like

I am doing a PoC to maybe adopt it in my current project

Perhaps can you help me to configure it ?
I would like to run tests with GUI and Agent on the same machine and I don’t succeed to connect the 2 elements

Well you have to start the rfswarm server and then the agent. By default, the agent will point to localhost.

I have done this but the agent try to connect to localhost (I have run rfswarm-agent on debug mode to see this…) :

Try connecting to http://localhost:8138/.
I try to change “localhost” by its IP (127.0.0.1) but it doesn’t work anymore…

In the folder where rfswrm is installed there is a file called RFSwarmGUI.ini

There you’ll find the configurartion of ip and port for rfswarm.

Here is my actual configuration. Is there something wrong ?

On the RFSwarmGUI.ini

  • bindip = 127.0.0.1
  • bindport = 8138

On the RFSwarmAgent.ini

The configuration is matching. It should be working.

Unfortunatly, it doesn’t work…
On the GUI console, the message “Not enough Agents available to run Robots!” is appeared.
On the Agent console, the message “Try connecting to http://localhost:8138/
But I don’t know how to add agent.

If you can help me, it would be super !

Not that this solves anything, but curious why you use IP 127.0.0.1? That’s the same as localhost, unless that’s the intent. I would have thought that you would at least put in the host’s real network IP.

So you think that on the Agent console, i keep this config (with localhost address) and on the host, I put my real network IP?
This way is different than @Paulonsalarcon has said, but both works?

@Centaure13 Hi John,

Are you still having trouble connecting the GUI and Agent?

I see you had configured:
On the RFSwarmGUI.ini

  • bindip = 127.0.0.1
  • bindport = 8138

On the RFSwarmAgent.ini

  • swarmserver = http:/ /127.0.0.1:8138/

I suggest you start with changing the RFSwarmGUI.ini to:

  • bindip =
  • bindport = 8138

As the bindip setting is only needed when you have multiple ip addresses on the machine you are running the GUI on and you want to limit it to only 1 of them, not setting it to anything it will respond to connections that come in on port 8138 from any interface which will make things easier for you.

next for the RFSwarmAgent.ini, on most computers these 2 lines do exactly the same thing unless your localhost entry in your hosts file is misconfigured.

  • swarmserver = http:/ /127.0.0.1:8138/
  • swarmserver = http:/ /localhost:8138/

You said you were trying to run them both on the same machine so this should be fine.

Next launch both the agent and the GUI (it doesn’t matter which one you start first, any order is fine) and have the both running, in the GUI go to the agents tab and wait a few minutes, the agent should poll for the GUI/Server every 10 seconds, but the agents screen only refreshes every 5 seconds so it can take ~15 seconds for the agent to be visible.

If after 1-2 minutes the agent is not showing up there might be something like a firewall blocking it, so you might need to adjust your firewall settings, but without knowing which OS you are using I can’t tell you where that might be, try googling " firewall" to find your firewall settings. I would suggest you disable the firewall for a few minutes to determine if that is the issue, if the agent connects to the GUI then turn the firewall back on and start researching how to configure it for allowing a connection to port 8138.

I hope this helps, and I’ll check back here over the next few days to see if you have any questions.

Dave.

1 Like

@Centaure13 Hi John,

I have been checking back here every few days, but there have been no further questions so I hope my answer helped you, feel free to post again if you need further help.

Dave.

Hi Dave,

Sorry for my absence, but I just became a dad so I have been very busy :slight_smile:
I’ll look at your solution and get back to it in this post!
Thanks again !

1 Like

Congrats on the baby, hope mum and baby are healthy and well, Dave.

2 Likes

Hello,

I’m ashamed… As Dave has said it, I have deactivate my proxy and… the connection is up !
Now, I’m going to try to add my RF’s tests and see the results but… it should be fine !

Thanks !

No need to be ashamed, happens to the best of us :+1:t3:

Have a happy Easter if you celebrate it.

Dave.

Hi Dave, John;

I’m playing with rfswarm and have gotten just a little further than this thread. I can see the rfswarm agent in my agent manager,


Sometimes it shows warning, other times ready. I have confirmation via the terminal that the manager has connected.

I attempt to run a very simple robot test, in the manager.

Which then navigates me to the Run tab.

Which then doesn’t look like it does anything?
The terminal seems to suggest the run has been started.

Any ideas what I might be doing wrong?
The Agent seems connected, but robots just don’t seem to get assigned.

Thanks in advance!

PS: I had more screenshots, but as I haven’t posted before, I had to remove all but 1.

Hi Matthew,

I just realised it’s not in the documentation, I’ll fix that, the reason you are getting a warning is the load on your agent machine is over 80%, in this case from your screen shot it’s memory consumption is over 80%, FYI if it goes over 95% it’ll show critical.

This warning status won’t actually stop you running a test, neither will a critical status, it’s there to get your attention that the agent is not in a healthy state for running a performance test, depending on your setup and number of robots you want to run you might be fine or it might be an indicator of why you are having issues, without knowing your setup, I don’t know.

As for not getting results on the run screen, it can take a little while for those to show up, how long did you wait? more than 5 minutes?

Just for some perspective, the time to first result showing is a combination of a variable portion of the polling time + time to run the first keyword + time to transmit the result back to the manager + refresh interval of the run screen (5 sec), worst case if they all line up for the maximum values this could be 17 seconds + the time to run the first keyword, but best case might be only a 1 or 2 seconds.

One suggestion, start with a small number of robots (5-10) and a slow ramp-up (>120 sec) till you get a feel for how it works, then step it up gradually to understand and what your agent machines are capable of. it varies a lot depending on your hardware and which robot framework libraries you use.

For example, if you are trying to run 100 robots on that agent with a 10 sec ramp-up and using SeleniumLibrary, you could be in a situation where 20 or even 30+ browsers are all launching at the same time which could strain the cpu and memory of the agent machine and cause a lot of disk reads at the same time, then because you are already memory constrained on your agent machine it might start swapping (more disk usage, showing things down more) or even worse the browser fails to launch from out of memory.

Hope that helps,

Dave.

Thanks Dave,

I’m running this on my local machine, it is fairly high spec - i7 with 16GB RAM (not doing too many other things at the same time).

I’ve reduced the amount of Robots to 2, Ramp up to 2 minutes, Run set to 10 minutes.

The robot script is literally opening a browser, navigating to Google and then checking page title. I’m using the robot browser library.

I’ve waited more than 10 minutes - with more robots (I think the default was 10), I’d waited at least 30 minutes.

The run tab view, doesn’t look healthy - maybe it can point to what I’m doing wrong. The elapsed time is always at this value and I never see a “stop run” icon - only the abort.