HILSTER Testing Framework¶
Welcome to the HILSTER Testing Framework documentation. It is a part of QABench.
HILSTER Testing Framework is a professional Python Testing Framework with a strong focus on reporting, industrial applications and functional safety.
It allows you to build HWIL-teststands (Hardware in the Loop teststands) with Python-based tests.
Tests can be created using Python scripts as well as Behavior Driven Development tests.
If you’d like to see videos look at the demo.
HILSTER Testing Framework seamlessly works with the Dashboard.
It can be used for free with the community license or you can get a commercial license.
You might be interested in the community add-ons, too.
Installation¶
htf is installed via pip:
pip install -i https://pypi.hilster.io htf-community
You might also be interested in the community license.
Getting Started¶
To get started, take a look at the installation instructions, the introduction and how to write tests, fixtures and available test reports.
Learn how to run tests from the command line and Python scripts.
If you prefer a more guided introduction take a look at the HILSTER Testing Framework Demonstrator.
Example¶
import htf
def test_example(step, assertions, attachments, threads):
with step("Tests can be structured with steps"):
assertions.assert_true(True, "This step succeeds")
with step("Attach a file if the outer step succeeds"):
attachments.attach_file("graph.png", "Important graph")
with step("Run something in the background"):
def tick():
while True:
print('tick')
threads.run_background(tick)
if __name__ == "__main__":
htf.main()
Contact¶
If you have any questions or ideas, please don’t hesitate and e-mail us via
support@hilster.io
.
Documentation¶
- Introduction
- Licensing
- Installation, Activation and Upgrading
- Requirements
- Installation on Windows
- Installation on Linux
- Installation on Raspberry Pi OS
- Installation in a virtual environment
- Installation using Anaconda
- Installation of htf via pip
- Installation options
- Node Activation
- Check installation
- Upgrading
- Installing a specific version
- Installing the community version
- Support
- Writing Tests
- Fixtures
- Assertions
- Behavior Driven Development
- Features
- Scenarios
- Steps
- Writing Features
- Writing Scenarios
- Example Feature
- Implementing Steps
- Running Features
- Steps with Parameters
- Long Lines
- Multi-Language Support
- Context Fixture
- Attach Data to Steps
- Tagging
- Requirements
- Background Steps
- Rules
- Scenario Outlines
- Scenario Outline Data Sources
- Skipping Features, Scenarios or Scenario Outlines
- Setup and Tear Down Code
- Parsing Steps
- Getting Available Steps and Statements
- Examples
- htf — Command line utility
- Running tests
- Specifying tests
- Running multiple tests
- Test-title
- HTML-report
- JUnit-XML-report
- JSON-report
- YAML-report
- Report Server
- Draft Reports
- Minimized Report Size
- Shuffle Tests
- Filename-templates
- Fail fast
- File pattern
- Tagging
- Metadata
- Overwriting Settings
- Parameters
- Bash-completion
- Enable Bash-completion
- Open docs
- View licenses
- Show version
- htf.main() — Testscript utility
- Docker Integration
- Dry Run
- Tagging
- Data Driven Testing
- Interactive Testing
- Settings
- Decorators
- Test Reports
- Signed Reports
- Report Tool
- Community Add-ons
- Modbus — The Modbus Testing Framework
- HART — The HART Testing Framework
- Communication
- I/O — Input and Output
- Power Supplies
- Retry Functions
- Issue Tracking
- Thread — A traceable thread implementation
- Metadata
- Keywords
- Miscellaneous
- Filters — Building generic filter expressions
- Terminal Colors
- Mixins
- Checksums
- Changelog
- htf-3.0.2
- htf-3.0.1
- htf-3.0.0
- htf-2.0.18
- htf-2.0.17
- htf-2.0.16
- htf-2.0.15
- htf-2.0.14
- htf-2.0.13
- htf-2.0.12
- htf-2.0.11
- htf-2.0.10
- htf-2.0.9
- htf-2.0.8
- htf-2.0.7
- htf-2.0.6
- htf-2.0.5
- htf-2.0.4
- htf-2.0.3
- htf-2.0.2
- htf-2.0.1
- htf-2.0.0
- htf-1.3.14
- htf-1.3.13
- htf-1.3.12
- htf-1.3.11
- htf-1.3.10
- htf-1.3.9
- htf-1.3.8
- htf-1.3.7
- htf-1.3.6
- htf-1.3.5
- htf-1.3.4
- htf-1.3.3
- htf-1.3.2
- htf-1.3.1
- htf-1.3.0