solitontech / SLL-Drona

An open-source LabVIEW UI Testing Framework to automate manual UI testing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SLL Drona

Vision

To provide an open-source Labview UI Testing Framework to automate manual UI testing.

UI testing plays an important part in the overall testing process of each application/product. Drona allows Engineers to automate the UI test by writing test cases that involve the concept of setting values to UI controls and asserting it to check the test case. It increases the overall software quality, which is predominantly needed in today's existing or developing products. It also reduces the time taken by engineers to test the UI.

SLL Drona in GLA Summit

SLL Drona as an Open Source LabVIEW UI testing framework was presented at GLA Summit 2022. For more details please watch the video

Minimum Compatible LabVIEW Version

The source code is saved with LabVIEW 2016.

Installation

Please find the latest SLL Drona package available here and install it using VI Package Manager.

Usage

Drona provides a library of VIs that are used to automate and test the UI without any flaws. It can be used to test any LabVIEW application and supports creating test cases from SLL Drona APIs.

Palette

To test the UI of the application you need to create the test cases using corresponding SLL Drona APIs. It can be accessed under the following location.

In Block diagram:

Functions Palette -> Addons -> SLL Drona

Workflow

Drona provides a library of APIs that helps to create test cases for UI testing. There are certain steps in creating a test case to make the workflow of the UI testing smooth and possible. The 4 steps that need to be followed for creating test cases are:

  1. Setup
  2. Stimulus
  3. Assert
  4. Cleanup

You can find the related APIs to these steps in the SLL Drona palette

1. Setup:

  • The first step in creating the test case is setting up the project and creating a Drona configuration file parallel to the project.
  • The configuration file includes the Launcher VI (startup VI that launches the UI to be tested) path, which is relative to the INI file, and options for opening and running the VI while executing the test.
  • Test cases can be created after configuring the file.
  • The Application reference and VI reference obtained from Setup VI are used to create test cases.

If you are using Drona for a LabVIEW application, then the INI file has to be created parallel to it.

Sample folder structure for the Drona INI file
Folder structure
Sample format required for creating a Drona configuration file Drona ini file

2. Stimulus:

    Stimulus is used to assign values to the controls and to give instructions, for executing UI actions. A collection of stimulus VIs are provided by this poly API, which can be found in the SLL Drona palette.

Stimulus Control Stimulus Keyboard Stimulus VI

    Set values for a control that is inside a tab control, cluster or any other object by giving a proper valid control path and value for that control. The control path is used to specify the UI control hierarchy to access a specific control.

For example, To access the numeric control as in the below depicted UI, the control path has to be given as:
Stimulus control
Tab Control>>Cluster>>Numeric

The label name has to be given as mentioned below.
Stimulus workflow
Make sure it is the same as the label name and is case-sensitive.

3. Assert:

    Assert is used to verify the controls' values, contents, properties, etc. and return the test report. A collection of assert VIs are provided by this poly API, which can be found in the SLL Drona palette.

Assert Control Value Assert Control Disable Assert Subpanel Inserted VI Assert VI Assert Control Visibility

    Similar to the stimulus step, a valid control path has to be given.

For example, To assert the value for the string in the below sample UI, the input has to be given as
Assert control
Tab Control>>Tab Control 2>>Cluster>>String
Assert workflow

4. Cleanup:

    This VI closes all the references that are opened while setting up the test case. Provide this VI with the Launcher VI reference and application reference that need to be closed.

Examples

Find the examples for different use cases in the following path:
<LabVIEW>\vi.lib\SLL Drona\Examples
A set of 5 examples are available based on the use case To learn more about the use cases please visit the test cases under the following path:
<LabVIEW>\vi.lib\SLL Drona\Test\Tests\SubTests

Package Build

For further information on how to build the SLL Drona package, please refer to this document.

Contributing

Steps for contributing to SLL Drona:

  • Fork the main repository
  • Create a new branch and make the changes with it
  • Commit your changes
  • Push to the new branch
  • Submit a pull request

To contribute to SLL Drona, you need to have a LabVIEW 2016 32-bit development environment.

License

SLL Drona is distributed under MIT license.

Credits

SLL Drona uses open-source components. You can find the source code of their open-source projects along with license information below. We acknowledge and are grateful to these developers for their contributions to open source.

Inviting users and contributors

Please fill out the below form if you are interested in trying out and/or contributing to SLL Drona. https://forms.office.com/r/jQkLb2WeL6

About

An open-source LabVIEW UI Testing Framework to automate manual UI testing.

License:MIT License


Languages

Language:LabVIEW 100.0%