Skip to main content

NTFC

NuttX Test Framework for Community.

What is NTFC?

NTFC is a Python-based testing framework designed to automate the testing of NuttX RTOS on various platforms. It provides a structured way to develop, discover, and execute test cases against NuttX configurations.

Purpose

NTFC enables developers to:

  • Validate NuttX functionality across different configurations and hardware targets

  • Automate test execution on NuttX devices for real hardware and host-based target

  • Detect system failures including OS crashes and busy loop conditions

  • Dynamically discover applicable tests based on the NuttX image configuration

  • Standardize testing workflows using pytest, a widely-adopted Python testing framework

How It Works

NTFC acts as a bridge between pytest and NuttX devices/simulators:

  1. Loads a NuttX YAML configuration specifying the target device and build parameters

  2. Builds or prepares the NuttX image (optionally flashing to hardware)

  3. Discovers which test cases are applicable based on the NuttX configuration and ELF symbols

  4. Executes tests by sending NSH commands to the running NuttX instance

  5. Validates command output and monitors for system failures

This tool requires at least Python 3.10. Not tested with earlier versions of Python.

Features

  • NuttX simulator, QEMU and devices with serial port are supported

  • Run the command from NSH and compare with the expected output

  • OS crash detection and busy loop detection

  • Detection of supported test cases for a given NuttX image based on the configuration and image ELF file

Installation

NTFC can be installed from source using pip. PyPI package release is planned for future versions.

git clone <PATH_TO_NTFC_REPO>
cd ntfc
pip install -e .

NTFC requires Python 3.10 or later (not tested with older Python).

Optional dependencies

  • pytest-html - for HTML test reports
  • pytest-json - for JSON test reports

Documentation

Documentation is available in the Documentation/ directory. You can build the HTML documentation using Sphinx:

pip install -r Documentation/requirements.txt
cd Documentation
make html

The generated HTML will be available in Documentation/_build/html/index.html.

See Documentation/quickstart for a quick start guide and Documentation/usage for detailed usage information.

Preparing the Image for Testing

  • CONFIG_DEBUG_SYMBOLS is required for automatic command detection
  • CONFIG_DEBUG_FEATURES=y and CONFIG_DEBUG_ASSERTIONS=y are recommended for better error detection

Test Cases

Currently available test case repositories:

For guidance on writing your own test cases, see Documentation/writing-test-cases.

Contributing

To get started with developing NTFC, see CONTRIBUTING.md.

The roadmpa for the project can be found in ROADMAP.

Metadata

Release files for ntfc 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ntfc 0.0.3
File Size Uploaded
ntfc-0.0.3.tar.gz 139.9 kB Details

Release files / ntfc-0.0.3.tar.gz

Download URL ntfc-0.0.3.tar.gz
Size 139.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0d0d60fe4b9d6a4f72dae3c30ec8f97f71bc7d68e059641c889721f99dda5b0a
BLAKE2b-256 checksum
How to use checksums
f37bed8cb67b4f7f380653c32e4a9d423ce054d15a6e2fdab52c9b7b98a4ea1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page