Skip to the content.

End-to-End Testing Guide

This guide provides detailed instructions for running end-to-end tests using the OpenShift Agent Install Helper testing framework.

Overview

The end-to-end testing framework validates complete OpenShift installations from start to finish, including:

Prerequisites

  1. System Requirements
    • RHEL/CentOS system
    • Minimum 32GB RAM
    • 500GB available storage
    • Internet connectivity (for connected tests)
  2. Required Packages ```bash

    Core packages

    • libvirt
    • qemu-kvm
    • virt-manager
    • ansible-core
    • nmstate
    • bind-utils ```

Test Structure

1. Test Scripts

e2e-tests/
├── bootstrap_env.sh    # Environment setup
├── validate_env.sh     # Validation
├── run_e2e.sh         # Test execution
└── delete_e2e.sh      # Cleanup

2. Support Scripts

hack/
├── create-iso.sh              # ISO creation
├── deploy-on-kvm.sh           # VM deployment
├── watch-and-reboot-kvm-vms.sh # VM monitoring
└── configure_dns_entries.sh    # DNS setup

Running Tests

1. Environment Setup

# Bootstrap the environment
./e2e-tests/bootstrap_env.sh

# Validate setup
./e2e-tests/validate_env.sh

2. Test Execution

# Run tests with a specific configuration
./e2e-tests/run_e2e.sh examples/sno-bond0-signal-vlan

# Monitor progress
tail -f /var/log/messages

3. Cleanup

# Clean up after tests
./e2e-tests/delete_e2e.sh

Test Scenarios

1. Single-Node OpenShift (SNO)

# Run SNO test
./e2e-tests/run_e2e.sh examples/sno-bond0-signal-vlan

2. Three-Node Compact Cluster

# Run compact cluster test
./e2e-tests/run_e2e.sh examples/compact-cluster

3. Standard HA Cluster

# Run HA cluster test
./e2e-tests/run_e2e.sh examples/baremetal-example

Test Flow Details

1. Environment Preparation

2. ISO Creation

3. Infrastructure Setup

4. Installation Process

5. Validation

Monitoring and Debugging

1. Installation Progress

# Monitor VM status
./hack/watch-and-reboot-kvm-vms.sh examples/cluster/nodes.yml

# Check DNS entries
./hack/configure_dns_entries.sh examples/cluster

2. Log Collection

# Collect VM logs
virsh console vm_name

# Monitor system logs
journalctl -f

Common Issues and Solutions

1. VM Deployment Issues

2. Network Problems

3. Installation Failures

Best Practices

  1. Test Environment
    • Use clean environment for each test
    • Validate prerequisites
    • Monitor resource usage
  2. Test Execution
    • Follow standard procedures
    • Document deviations
    • Save test artifacts
  3. Problem Resolution
    • Collect relevant logs
    • Document issues
    • Track resolutions