0

My team and I are automating a windows based app using LeanFT C# as our framework. Currently, we have several tests that we can run locally however do not have a grid like solution in place. I know that with selenium, we can make use of the selenium grid - however since we are not automating a browser based app, this is out of the question.

What we need is a grid solution that would work for a windows app. My idea is to have multiple VMs store the app, and then have a grid that would poll each VM to see if it was free to run a test on, and then pass a test to it. This is pretty much how the selenium grid works for browsers.

So my question is, does leanFT have any support for something like this, or are we strictly locked in to running tests on a single local or remote machine. Also, is there a way to check for a test instance running? Maybe if atleast that is possible we can come up with an in house solution. Thanks!

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Tree55Topz
  • 1,102
  • 4
  • 20
  • 51
  • Have you looked at [**`Jenkins`**](https://leanft-help.saas.hpe.com/en/14.01/HelpCenter/Content/HowTo/CI_Tools.htm) route to execute your tests...? – ManishChristian Oct 04 '17 at 14:28
  • @ManishChristian, Jenkins is a CI/CD tool. It would solve the problem of running our tests on a remote machine somewhere, but this question is about hooking up a test grid which is different. The problem is, we are limited to running tests one at a time on one machine, whether that be local or remote. A grid is essentially a bank of locations to run tests where you can run multiple tests at a time in parallel. – Tree55Topz Oct 04 '17 at 16:07
  • The problem is that you are not able to run multiple tests simultaneously if they require UI interaction. (which I'm presuming is the case). If you are running selenium tests in parallel, then likely you are using htmlunit driver, which has no UI interaction. – not-bob Oct 04 '17 at 21:18
  • 2
    the idea from @ManishChristian seems to be what you are looking for. You can set up your VMs as 'slaves' in a pool. There are several ways to configure Jenkins. The way I've used in multiple places is to set up individual jobs for individual tests and set up a parent job that contains all the child jobs you defined earlier. Starting the parent job and using the pool of VMs would allow you to run the tests as fast as possible based on whatever VM is not currently running tests. I believe that Jenkins has the ability to run multiple jobs simultaneously as well (though I have not used that) – not-bob Oct 04 '17 at 21:22
  • @not-bob you guys are absolutely right.. I could set up different VMs to run a set of tests rather than rely on a grid.. duh! I have done this before in the past.. ugghh so stupid. not-bob, do you want to post another answer to this explaining your strategy. I will gladly accept it. Thanks guys.. – Tree55Topz Oct 05 '17 at 15:25

2 Answers2

0

The answer is actually simple, even though it does not solve the issue of grid support for windows app automation using LeanFT. For this we can use Jenkins.

What we do is we fake a parallel run system by setting parent and child jobs in Jenkins. The parent job will serve as the base job, holding the parameters and passing them to the child jobs. The child jobs will target a specific set of tests and have a designated VM to run the tests on. In Jenkins, specifying a job as a multiphase job will run these in parallel.

By doing this, we are able to run a portion of tests on one VM, another portion of a different VM, etc, etc. This is not truly parallel, as we have to fake it in a sense, but it will accomplish the task.

Tree55Topz
  • 1,102
  • 4
  • 20
  • 51
-1

I have the benefit of using code from a colleague that uses both the UltraWinGrid and C1FlexGrid classes to do this.

https://leanft-help.saas.hpe.com/en/12.53/JavaSDKReference/com/hp/lft/sdk/winforms/UltraWinGrid.html

https://leanft-help.saas.hpe.com/en/14.01/JavaSDKReference/com/hp/lft/sdk/winforms/C1FlexGrid.html

We end up needing both because these two classes have their benefits over the other. We've wrapped up our interaction with grids in a separate utility class and use whichever grid is useful for a particular task.

Our project is Java-based, but I expect that C# would be roughly the same experience.

Good Luck!

not-bob
  • 815
  • 1
  • 8
  • 23
  • the question is based around a test grid - a solution to pass tests to a grid of VMs so that the tests can run parallel on remote machines. – Tree55Topz Oct 04 '17 at 13:50