Architecture RFWk multi PC windows

Hello… I need help from the community because I have to create an automation solution with Robotframework in a multi system context.
The architecture is a Central Windows PC in LAN network with other Windows PCs on which the application is installed developed in Java/ Windows (no Web because full windows). The central PC runs the tests suites (via jenkins) on the other hand the tests cases are executed on the PC windows according to the objective of the test case. A simple example is: a Test suite is run on the central PC with two Tests cases, one of which must run on PC 1 and the other on PC 2.
I thought I would use the functionality of Remote server but I would like someone to explain the architectural possibilities with my example.
Thank you very much

Hi Fabrice,

I’m not sure I clearly understand what your asking and it seems there are some missing details, I’ll repeat here as I understood with some questions, correct me if I misunderstood.

  • Your application is a windows application written in Java, or is it just a Java application that’s running on Windows? Either way you’re not using a web browser, that’s ok, which library are you using? as there are quite a few too choose from, It’s not so important now buy as we get deeper into this it may be.
  • You have a “Central PC” (PC-C) with the application installed, but I’m not clear about this PC
    • Is this the application server for a client server application?
    • Is this the Jenkins Server?
    • you want to run some test cases on this pc in addition to PC-1 and PC-2, or you want this PC to control the test cases being run on PC-1 and PC-2?
  • You have Test cases that must run only on PC-1
    • Are these test cases related to a specific user role? or specific hardware?
  • You have Test cases that must run only on PC-2
    • Are these test cases related to a specific user role? or specific hardware?

So based on my understanding of your question I’d suggest setting up your test suite as a folder with the application name

  • in that folder you have robot files with test cases, perhaps each file might have test cases relating to a specific module or screen within your application to make it easier to organise your test cases
  • on each test case you use a tag for the role (or pc name if you prefer), see Tagging test cases e.g.
    • Test cases that need to run on PC-C might have the tag “server” or “PC-C”
    • Test cases that need to run on PC-1 might have the tag “role a”, “device name a” or “PC-1”
    • Test cases that need to run on PC-2 might have the tag “role b”, “device name b” or “PC-2”
    • test cases that need to run on PC-1 and PC-2 with have multiple tags
    • In Jenkins when you configure your test runners, you configure the command line for the test runner that runs on PC-C use the By tag names selection criteria to select the test cases that should be run, this might be as simple as -i server
    • In Jenkins when you configure your test runners, you configure the command line for the test runner that runs on PC-1 use the By tag names selection criteria to select the test cases that should be run, this might be as simple as -i "role a"
    • In Jenkins when you configure your test runners, you configure the command line for the test runner that runs on PC-2 use the By tag names selection criteria to select the test cases that should be run, this might be as simple as -i "device name b"

I will suggest against using PC names for tagging tests because

  • The PC’s are likely to be replaced at some point down the track and then you’ll need to update the test cases
  • Using a role or hardware type will make it clearer down the track when you need to revisit the test cases why this specific test is running on this specific machine

Hopefully this is helpful,

Dave.

Hi …thanks a lot for your response.
In order to better understand my need attached a diagram on the system architecture:

From the Master PC on which Robotframework is installed, the TestSuite Robot command is executed and each Testcase must be executed on the corresponding SUT platform on remote mode. On each SUT is installed a version of the application with a different user configuration for each SUT. The application is developed in Java/Windows (no web). Jenkins pipeline is used to deploy the automation environment on the Master PC and start running TestSuites.

Thanks
Fabrice

Hi Fabrice,

It seems you are misunderstanding how robot framework works.

You generally run the robot framework executable on the PC you want the test run on, there are exceptions (like when you use Selenium Grid) but they are exceptions. The vast majority of Libraries will only execute on the local machine.

  1. The best approach for this setup is the one I mentioned perviously, configure your Jenkins pipeline to deploy the automation environment on all the SUT PC’s, and execute the robot command with the necessary tags, in this case you don’t even need the master PC

  2. Another approach might be to deploy everything to the master PC, but rather than running robot framework on the master PC, you instead run a batch file or python script that tells each of the SUT PC’s to run robot framework, then the master PC could collect all the robot results and afterwards run rebot to combine all the test logs into a single test result set. This is something that you would probably need to build as a custom solution.

  3. Remote Library might be an option for you, I’m not familiar with it myself, but you might be able to use it to control the application running on your SUT PC’s from the robot running on Master PC.

  • You would first need to figure out how to get Remote Library to control the app on 1 SUT PC, this may require installing some other software on the SUT PC to receive the commands from Remote Library?
  • Next you will need to run 1 robot for each SUT PC on the Master PC, this will limit the number of SUT PC’s you can have or might require you to have multiple Master PC’s. pabot might help here
  1. You could use a combination of SikuliLibrary or ImageHorizonLibrary with RDP, VNC, or similar remote desktop software to have robot framework control the remote desktop session. As you are using Windows you would need 1 “Master PC” for each SUT PC with this approach as you’ll only be able to have 1 robot controlling 1 remote desktop on each Master PC. If your Master PC was Linux you’d be able to run multiple X11 Sessions and run 1 robot in each X11 session.

3 & 4 add significant complexity, the only reason you would consider them is if you have a requirement that prevents you from installing the test automation software on the SUT machines, I would advise against them in general as you should avoid adding complexity without a good reason.

Hope this helps,

Dave.

1 Like