Lampo — The Mobile Device Lab

Nishant Kashyap
PharmEasy Tech
Published in
3 min readJan 13, 2021

In today’s digital age, mobile automation has become one of the most critical requirements for companies and businesses across the globe. As the world is increasingly moving towards smartphones, it is vital that every customer gets the ideal experience when they use an application, irrespective of their device model or operating system. Engineering teams have to ensure that their applications work across various platforms and devices seamlessly, and mobile automation testing plays a huge role here.

Challenges of running automated mobile tests

  • It is difficult to scale when tests are run locally on a daily basis.
  • It causes a hindrance when multiple product teams want to run their automated tests at the same time.
  • Commercial software like Saucelabs and Browserstacks could be a little expensive for running a large number of tests on various platforms and devices.
  • Commercial software doesn’t always have specific mobile/OS versions available to replicate or test the issues.

What is an ideal solution?

  • Testing should be less expensive or free.
  • It should offer access to unlimited accounts so test engineers, developers, product managers, etc, can all utilize it.
  • It should offer unlimited testing and automation hours, which will allow our testing every day without worrying about the hours consumed.
  • Option to attach a specific mobile device version/OS combination.
  • Supports real devices and emulators.

After exploring all the available options, paid and open source, we concluded that it would be best to design and develop our solution keeping requirements in mind. That’s how Lampo — The Mobile Device lab was developed.

The Design

Lampo is developed to run the Appium mobile automation scripts on mobile devices that are connected to remote machines. It also aims at allowing the user to interact with the remotely connected devices for manual testing.

We have connected mobile devices of our actual users, based on the analytics data. This has helped us to ensure that we run our automated tests against the devices used by our actual users and identify any potential issues before the build goes live.

It has a master-slave architecture, where anyone can attach their machines — as slaves to master — and share their devices with anyone within the organization to use remotely. All the devices are managed centrally by the master application. These attached devices can be used for both automation and manual testing.

We can also attach multiple slaves to the master.

Main components of the Master:

  • The repository that manages the information about mobile devices is connected to all the slaves connected to the master.
  • A Queue that receives timely updates, which each of the slaves sends to the master about the connected mobile devices.
  • A controller that receives and responds to the request to allocate, or unallocated Appium session, blacklist, or whitelist devices.
  • A dashboard application that displays all the connected and active devices on each of the slaves. It redirects to the STF service page of the android device upon clicking the device image.

Main components of the Slave:

  • A scheduled task executor to send timely updates about the connected Android and iOS devices to the master to which it is connected.
  • A controller that receives and responds to the allocated and unallocated Appium session requests.
  • Runs the STF service for manual interaction with the android device.

Lampo helps PharmEasy and its products to run their mobile automated tests quickly with the help of Jenkins jobs, which schedules the automated tests to run periodically. This has proven immensely helpful in 2020, especially during the lockdown. The teams could effortlessly work from home and share their testing mobile devices easily with each other for running automated or manual testing of the use cases.

Since most of the app-based companies face similar challenges, more so during recent times, we decided to make this an open-source for the community to use and contribute. It’s open-sourced under the MIT/Pharmeasy license. You can learn more about it here.

--

--