Skip to main content

Quick Start

LabScale is a scheduling and testing service designed to be simple and flexible in an effort to remove the burden of developing a costly, custom automation solution for testing embedded devices. It is composed of a centralized web application where tests, or jobs, are scheduled, a middleware that handles communication, and a remote that executes these tests. This document will guide you through signing up with LabScale, installing an agent, and executing a test.

Prerequisites

Many of the example tests are written in Python and for these to work correctly it is best to have Python v3.8 (or better) and the latest version of pip installed.

Mac OS

If you installed Xcode on an M1 Mac, a recent update to Xcode may cause Python scripts to exit with the error invalid active developer path, missing xcrun. To fix this, execute xcode-select --install in a terminal window.

Create a Team

The web application is where the customer schedules jobs against devices for testing. The tests are farmed out to agents which execute them and report results back to the web application. These results can then be aggregated into reports covering the entire project. These resources are grouped into Teams which allow for collaboration with others.

In order to use LabScale, you will first need to create a Team account, you can do this by following these instructions:

  1. Visit LabScale.com application page.

  2. When prompted, provide your email address and click on the "Sign in with Email" button.

    Sign In

  3. Once finished, you will have to wait for an email to be sent to your email address.

  4. After a few minutes, an email should arrive in your inbox. Within the email, click on the button labeled "Sign in" and you will be redirected back to the LabScale app.

    Sign In Email

  5. Enter a "Team Name". The Team Name can be shared with other individuals for collaboration. Create Team

  6. After a few seconds you will be taken to the LabScale application home page.

    Home Page

Now that you have a team, you can setup a host and install the agent!

Add a Lab

Agents and devices are grouped into Labs, which are an organizational tool but also a way to collect together devices that may require shared resources, such as Wifi access points or specific test fixtures required by tests that are pysically located in proximity of the hardware under test.

  1. You will first need to setup a Lab. In the web application, click on the Labs & Devices menu item in the side bar.

  2. Then click on the button labeled ADD NEW LAB.

    Add Lab

  3. Enter the name of your lab and click CREATE LAB.

    Create Lab

  4. Once you have created a lab, you will see it appear in the Labs page.

    Labs Page

Install the Agent

The agent is a software package that is intended to run on your desktop or local workstation. The agent tracks the state of devices under test, executes jobs and tests, and is reponsible for reporting results back to the LabScale service. Agents are grouped into Labs for ease of management. To set up an agent on your local host, do the following:

  1. Click on your new lab in the Labs page to manage the lab.

  2. Once in the lab screen, click on the Agents menu in the side bar.

    Agents Page

  3. Click on the ADD HOST button.

  4. Enter the name of your host name.

    Enter Agent Props

  5. Click on the SUBMIT button.

  6. Once back at the Agents page, click on the INSTALL button to the left of your newly created agent.

    Install Agent

  7. In the dialog, click on the copy button in the dialog box. Then open a terminal window on your desktop (or whatever host you intend to run the agent on) and paste into a terminal window. Press Enter.

    Copy and Paste Terminal

  8. Once the agent has been installed, start it by typing ./labscale-agent/agentctl start

    Start Agent

  9. After a few seconds, the agent you just installed will show an online status.

    Host Online

Add a Device

The agent manages associated devices used for testing and executes tests against them. You will need to create a device and associate it with an Agent.

  1. If you just finished installing the agent, click on the Devices menu in the menubar on the left, this will take you to the Devices Page.

    Devices Page

  2. Then click on the ADD DEVICE button in the agent setup dialog.

    Add Devices to Agent

  3. Enter the desired name of your new Device and assign it to your Host (created in the previous section above).

  4. For purposes of this demo, select Virtual Device as the Device Type.

    Device Details

  5. Click the SUBMIT button.

    Device Submit

  6. If your agent is online, your new device should appear as online within a few moments.

    Device Online

Run a Test

Once you have created a host and device, you can now schedule tests to the device. To do this, follow these instructions:

  1. Select the Projects menu option in the navbar on the left side of the screen.

    Projects

  2. Select the Demo project.

    Select project

  3. In the navbar on the left, select Run Tests.

    Run tests

  4. Click on checkbox on the left of the the helloworld test suite.

    Select testsuite

  5. Click on the NEXT STEP button.

  6. Click on Select a release and select v1.0.

    Select a release

  7. Click on Select a build and select 0001.

    Select build

  8. Click on NEXT STEP.

  9. Click on Select a Device Type and select Virtual Device.

    Select virtual device

  10. Click on Devices and select your Device created in the previous steps.

    Select device Device selected

  11. Click on NEXT STEP.

  12. Click Submit.

    Submit Submitted

Viewing Test Results

The job to run the test is now queued and waiting in a pending state. It will be assigned to your device as soon as it calls in with a status update.

  1. Select the Jobs menu in the navbar on the left side of the page. The test will be in one of three states, pending, running, or completed. The job will be in pending state for a short time before being accepted by the agent, therefore check the pending state tab at thte top of the table.

    Job running

  2. The job will eventually be picked up by the agent and executed. The job will transition to a running state, and finally the completed state.

    Job finished