Registry / testing / pyats-reporter

pyats-reporter

JSON →
library26.5pypypiunverified

pyATS Reporter is a sub-component of the broader pyATS (Python Automated Test System) ecosystem, specializing in result collection and reporting for network automation tests. The pyATS framework itself is an end-to-end testing solution developed by Cisco Systems Inc., designed for data-driven, reusable, and scalable testing, suitable for Agile development iterations. The library is actively maintained with frequent updates, with the current version being 26.3, and requires Python 3.8 or higher.

pip install pyats-reporter
INSTALL
IMPORT
SIG · PYATS-REPORTER
P
pyats-reporter
testingpythonv26.5
Install
24.8s avg
Import
—
Disk
396MB
Pass rate
7/ 10
Env Coverage7 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v26.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ 0.05s
✓ 33.68s
py 3.11
✕ build_error
✓ 32.44s
py 3.12
✕ build_error
✓ 33.53s
py 3.13
✕ build_error
✓ 32.64s
py 3.9
✓ 0.05s
✓ 40.96s
396MB installed
● package 396MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Reporter
✓ from pyats.reporter import Reporter
✗ from pyats.reporter import Reporter

The pyATS Reporter primarily functions as part of a larger pyATS test execution. This quickstart demonstrates how to set up and run a minimal pyATS job, which will automatically generate a report using `pyats-reporter` capabilities. The output can then be viewed through the `pyats logs view` command-line tool. A placeholder IP is used; replace with a reachable device or use pyATS mocking for actual execution without a physical device. Make sure to set `PYATS_TESTBED_PASSWORD` environment variable for the testbed credentials if running against a real device.

import os import time from pyats import aetest from pyats.topology import loader # Create a dummy testbed.yaml file for demonstration with open('testbed.yaml', 'w') as f: f.write(''' # Sample Testbed for pyATS Reporter Quickstart testbed: name: my_testbed credentials: default: username: admin password: ${PYATS_TESTBED_PASSWORD} devices: R1: type: router os: iosxe connections: cli: protocol: ssh ip: 10.1.1.1 # Placeholder IP, replace with a reachable device or mock ''') # Create a simple AEtest job file with open('my_test_job.py', 'w') as f: f.write(''' from pyats import aetest from pyats.topology import loader class CommonSetup(aetest.CommonSetup): @aetest.subsection def connect_to_devices(self, testbed): aetest.loop.mark(self.parent.testcases.test_basic_connectivity, device=testbed.devices.values()) for device in testbed.devices.values(): self.parent.parameters.update(device=device) print(f"Attempting to connect to {device.name}") # In a real scenario, this would attempt a connection. # For quickstart, we'll simulate success. # device.connect() print(f"Simulated connection to {device.name} successful.") class TestBasicConnectivity(aetest.Testcase): @aetest.test def test_ping_loopback(self, device): print(f"Testing connectivity for {device.name}") # In a real scenario, this would execute a command like `device.ping('1.1.1.1')` # For quickstart, we'll simulate a passing test. if device.name == 'R1': self.passed(f"Simulated ping successful on {device.name}") else: self.failed(f"Simulated ping failed on {device.name}") class CommonCleanup(aetest.CommonCleanup): @aetest.subsection def disconnect_from_devices(self, testbed): for device in testbed.devices.values(): print(f"Simulated disconnection from {device.name}") # In a real scenario: device.disconnect() ''') # Set a dummy password for the quickstart's testbed if not already set os.environ['PYATS_TESTBED_PASSWORD'] = os.environ.get('PYATS_TESTBED_PASSWORD', 'your_password_here') print("Running pyATS job... This will generate a report.") # To run the job and generate a report, use the pyats CLI command # In a real environment, you'd run this from your terminal: # pyats run job my_test_job.py --testbed-file testbed.yaml # For this quickstart, we'll just demonstrate the files are set up. print("A testbed.yaml and my_test_job.py have been created.") print("To run the test and generate a report, execute in your terminal:") print(" pyats run job my_test_job.py --testbed-file testbed.yaml") print("After running, view the report with:") print(" pyats logs view") print("Cleanup: Remove 'testbed.yaml' and 'my_test_job.py' if desired.")
Debug
Known issues
breakingPython 3.6 reached End-of-Life. pyATS and pyats-reporter no longer support Python 3.6 after April 2022. Users must upgrade to Python 3.8 or newer.
fix
Upgrade your Python environment to version 3.8, 3.9, 3.10, 3.11, 3.12, or 3.13. pyATS officially supports these versions.
affects: <=22.3
gotchapyATS, including pyats-reporter, does not officially support Windows operating systems. It is designed for Linux and macOS environments.
fix
Use pyATS on a Linux or macOS environment, or within a Linux-based virtual machine or Docker container on Windows.
affects: All versions
gotchaTestbed YAML files are strict. Common mistakes include incorrect indentation, mismatching device names in the YAML with the actual device hostnames, or improper credential handling.
fix
Ensure strict YAML formatting. The 'name' or 'alias' for a device in the testbed file must exactly match the device's configured hostname. For credentials, use environment variables (`%ENV{VAR_NAME}`) instead of hardcoding.
affects: All versions
deprecatedAs of pyATS 22.3, ReporterServer was modified to only generate `reporter.log` when running in verbose mode with the `-v` option.
fix
If you relied on `reporter.log` always being generated, ensure you run your `pyats run job` commands with the `-v` flag for verbose output.
affects: Introduced in 22.3
Upgrade
Version history
26.5latest on PyPI · released May 28, 2026
Audit
Dependencies
pyatsrequiredpyats-reporter is a sub-component of the pyATS framework and is typically used within a pyATS test automation setup.
Agent activity
19 hits · last 30 days
node
16
Resources
pyats-reporter — pip install pyats-reporter · libregistry