tvarchive / optimusTemplate

This is a cucumber jvm implementation template using the optimus mobile automation framework. If you like it, star it, help spread the word.
http://docs.testvagrant.com
66 stars 23 forks source link

Queries: appium driver, server, parallel execution #2

Closed vikramvi closed 6 years ago

vikramvi commented 7 years ago

Hi,

Please clarify below

I tried searching the repo but didn't find answers

Thanks & Regards, Vikram

sukesh15 commented 7 years ago

Hi Vikram,

The answer to majority of your questions is optimus jar that the template project is dependent on. You would have seen that in the gradle dependencies. Currently the source code for optimus is in a private repo as we are in the process of cleaning it up a little before making it public on github. Should be out in a week or so. Not only optimus, there are a bunch of other related projects that will be made public:

Meanwhile, here is a brief architecture diagram that you can refer to understand what's going behind the scene.

image

vikramvi commented 7 years ago

Thanks @sukesh15 for detailed info. I will wait for other repos to be public in few days.

As I'm also investing time in doing similar things, would like to put joint efforts instead of working on similar problems separately.

Regards, Vikram

vikramvi commented 7 years ago

@sukesh15

  1. Please let me know by when you are planning to open source source code for optimus ?

  2. wrt your post https://discuss.appium.io/t/alternative-to-selenium-grid-for-running-appium-tests-in-parallel/18025 2.1 what does you mean by "...these devices, distributed or fragmented"

  3. Does optimus framework takes care of below 3.1 assigning test cases to available nodes at run time ? 3.2 OR it creates test runner for each of the test classes / feature file and assign to each of the nodes ?

I'm as well trying to solve same problems at my end, but it will good to put minds together on single framework, instead of working separately :)

Thanks, Vikram

sukesh15 commented 7 years ago

@vikramvi

We are almost there, all the code should get published latest by mid next week. Will keep the group posted.

With respect to running tests in parallel, we have seen teams asking for either or both of the following ways:

Having said this, optimus allows doing both of the above as a pre-configured task. You just need to connect devices and choose to run the task that you need.

Optimus assignment of tests:

  1. Firstly, using optimus every tests runs in its own container. So every test has its own appium server instance and driver instance that is created dynamically at run time. The number of test run threads are created based on number of connected and configured devices.

  2. Now about assignment of test:

    • [ ] In case of distributed, a test just picks up the first available device in the pool (maintained in MongoDb) and creates the driver instance at run time with corresponding device details.
    • [ ] In case of fragmented, optimus binds devices to separate threads and every thread would then run all tests.
vikramvi commented 6 years ago

@sukesh15 thanks again for detailed info. Once source code repo is live, I will submit PR for documentation ( Q&A ) with above clarifications from you. As it'll be very useful to others as well.

sukesh15 commented 6 years ago

@vikramvi and everyone else following up on this, thanks a lot for all your patience. We have published all the repos on our testvagrant github page here, a total of 8 repositories. We have consciously tried to follow a decentralised approach in terms of the whole structuring of the code.

Also, attaching a diagram to briefly explain how the projects are grouped and their responsibility. Feel free to reach out in case of any questions/clarifications/feedback/suggestions.

optimus template

vikramvi commented 6 years ago

@sukesh15 Thanks a ton for sharing this info, I will go through it and get back in case of any doubts.