![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
The aim of that package is to create LabVIEW User Interface testing through scripts through pyTest.
This package allows python to communicate with the LabVIEW package "ui-testing". You need to have that package installed within your LabVIEW IDE and have the main.vi put in your top VI.
Examples can be found on the wiki of the project.
The following example will set a value to control labelled "myNumber", the boolean indicator "greater" should be TRUE when myNumber is > 5.
NOTE: Even tough it's recommended to start the VI first, it should also work as the python script is waiting to connect to it.
# Start the VI "example 2 - value" first then run that script
from lv_ui_testing import ui_testing
import pytest
def test_front_most_vi():
# Ask the tester daemon what is the front most VI
front_most_vi = ui_testing.FMV_get_vi_name()
assert front_most_vi == "example 2 - value.vi"
@pytest.mark.parametrize("number, expected_bool", [ (x, x > 5) for x in range(1, 11)])
def test_set_value(number,expected_bool):
# Set value to 0
ui_testing.FMV_set_value_DBL("myNumber", number)
data_number = ui_testing.FMV_get_value_DBL("myNumber")
data_bool = ui_testing.FMV_get_value_bool("greater")
assert data_bool == expected_bool
assert data_number == number
Run the following command in your command line:
python -m pytest example2.py
You should see the following test happening:
Distributed under the MIT License. Copyrights Thomas Zilliox and others.
FAQs
A LabVIEW User Interface Testing framework.
We found that lv-ui-testing demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.