Skip to content

Consolidate Solara Visualization test coverage #2993

@EwoutH

Description

@EwoutH

Problem

Currently, we have two test files for Solara visualization:

  1. test_solara_viz.py - Old file kept for backwards compatibility with legacy backends
  2. test_solara_viz_updated.py - New file with updated architecture

The recent PR #2985 revealed a gap in test coverage: Altair's AgentPortrayalStyle support was only tested in the legacy file, not in the updated one. This means the new test file doesn't have comprehensive coverage of all behaviors.

Proposed Solution

We should have:

  1. One primary test file (test_solara_viz.py) that:

    • Tests all current best practices using the new architecture
    • Has full coverage of all visualization components and their features
    • Uses AgentPortrayalStyle, SpaceRenderer, and other modern APIs
    • Includes comprehensive tests for both Matplotlib and Altair backends
  2. One backwards compatibility test file (e.g., test_solara_viz_legacy.py or test_solara_viz_backwards_compat.py) that:

    • Tests deprecated dict-based portrayals still work
    • Tests legacy component APIs that are maintained for compatibility
    • Can be clearly identified as testing legacy behavior
    • May eventually be removed when backwards compatibility is dropped

Current Issues

  • The "updated" file is actually missing Altair-specific tests that exist in the "old" file
  • Having two files with overlapping but incomplete coverage is confusing
  • It's unclear which file should be considered the source of truth
  • New contributors won't know which file to update when adding features

Follow-up from #2985. @Sahil-Chhoker, does this cover it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingRelease notes label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions