Skip to main content

Robot Framework-based testing framework for Renesas RZ boards

Project description

RZ-CI Robot Framework

A comprehensive Robot Framework-based testing framework for Renesas RZ boards.

PyPI version Python versions License: MIT

Installation

From PyPI (Recommended)

pip install rz-ci-robot-framework

From Source

git clone https://github.com/renesas/rz-ci-robot-framework.git
cd rz-ci-robot-framework
pip install -e .

Quick Start

# Run tests for rzsbc board
rz-ci-test rzsbc

# Run with custom configuration
python main.py rzsbc --config my_config.yml

# List available features
python -c "from framework.test_handler import TestHandler; TestHandler('rzsbc').list_features()"

Features

  • Dynamic Configuration: YAML-based configuration for easy customization
  • Multiple Board Support: Support for various RZ board types (rzsbc, rzv2h, etc.)
  • Feature Libraries: Pre-built libraries for I2C, SPI, GPIO, CAN, etc.
  • Serial Communication: Automated board login and command execution
  • Comprehensive Reporting: HTML and XML reports with detailed logs
  • Template-based Testing: Parameterized tests for multiple configurations

Supported Features

  • I2C: Device detection and communication testing
  • SPI: Interface testing and data transfer validation
  • GPIO: Pin control and state verification
  • CAN: Bus communication testing
  • Ethernet: Network connectivity validation
  • USB: Device detection and enumeration
  • Overlay: Device tree overlay testing

Configuration

Create a config.yml file to define your board configurations:

board_configs:
    rzsbc:
        enabled: true
        serial_port: "/dev/ttyUSB0"
        baud_rate: 115200
        images:
            core-image-bsp:
                enabled: true
                features:
                    i2c:
                        enabled: true
                        instances:
                            i2c_0:
                                enabled: true
                                i2c_bus: 0
                                expected_addr: "12"

Usage Examples

Basic Testing

# Test specific board
python main.py rzsbc

# Test with dry run
python main.py rzsbc --dry-run

# Test with custom config
python main.py rzsbc --config custom_config.yml

Python API

from framework.test_handler import TestHandler

# Initialize test handler
handler = TestHandler(board_type='rzsbc')

# List available features
handler.list_features()

# Run tests
result = handler.run_board()

Robot Framework Integration

*** Settings ***
Library    libraries/I2CLibrary.py
Library    libraries/LoginLibrary.py

*** Test Cases ***
Test I2C Communication
    ${conn}=    Login To Board    rzsbc
    Init I2C Library    ${conn}
    ${result}=    Verify I2C Address Present    0    12
    Should Be True    ${result}

Development

Setup Development Environment

# Clone repository
git clone https://github.com/renesas/rz-ci-robot-framework.git
cd rz-ci-robot-framework

# Install in development mode
pip install -e .

# Run tests
python main.py rzsbc

Running Tests

# Run individual test
robot test.robot

# Run I2C tests
robot test/i2c/i2c.robot

# Run with specific board type
robot --variable BOARD_TYPE:rzsbc test/i2c/i2c.robot

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For issues and questions:

Changelog

1.0.0 (2024-01-XX)

  • Initial release
  • Support for I2C, SPI, GPIO, CAN, Ethernet, USB testing
  • Dynamic YAML configuration system
  • Multiple board support (rzsbc, rzv2h)
  • Comprehensive reporting and logging
  • Command-line interface
  • Robot Framework integration

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rz_ci_robot_framework-1.0.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rz_ci_robot_framework-1.0.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file rz_ci_robot_framework-1.0.0.tar.gz.

File metadata

  • Download URL: rz_ci_robot_framework-1.0.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for rz_ci_robot_framework-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f6b3ced27efc55a676e2ef2339da2060eafdb16c5540230bdff50aba2d4e53ea
MD5 6aa3025884a9928652729d413b2e5d2e
BLAKE2b-256 e270c0bf03d4189e5951eb639f41a90062c511026ac58f5f06944d0c43dcaae8

See more details on using hashes here.

File details

Details for the file rz_ci_robot_framework-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for rz_ci_robot_framework-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b17b4218255bd8b05f02f0186e083c92bb81d6dbb8665c339c9cdce0f5ccd707
MD5 613c2202cc5d57807c458c1b41f470c9
BLAKE2b-256 cdcf6d8c4b0dd021868cd31f2ac37493f84298cfb57cd07e5b2b28ee8556b90d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page