Skip to main content
Glama

Magni Test Automation Framework

Magni is Carta's comprehensive test automation framework built on Python, Selenium, and pytest. It provides UI and API testing capabilities for all Carta products.

šŸš€ Quick Start

Prerequisites

IMPORTANT

Before setting up Magni, ensure you have all required system access and tools installed.

System Access:

  • Cluster under Test access (Test, Demo, and Sandbox environments)

  • Kubernetes namespace access for your deployed application (typically <your_namespace>)

Required Tools:

  • macOS with Homebrew package manager

  • Python 3.11

  • Poetry for dependency management

  • Kubernetes CLI tools (for running testing on Selenium Grid)

1. Install System Dependencies

Install Homebrew (if not already installed)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Python Version Management

# Install pyenv and pyenv-virtualenv
brew install pyenv pyenv-virtualenv

# Configure shell environment
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc

# Reload shell configuration
source ~/.zshrc
TIP

If the configuration doesn't take effect, restart your terminal.

Install Kubernetes Tools

# Required: Kubernetes CLI
brew install kubernetes-cli

# Optional: Context and namespace switching tools
brew install kubectx  # Installs both kubectx and kubens
brew install k9s      # Kubernetes management interface
NOTE

For Kubernetes context configuration, followthese instructions.

2. Setup Python Environment

Install and Configure Python

# Install Python 3.11
pyenv install 3.11

# Create Magni virtual environment
pyenv virtualenv 3.11 magni

# Navigate to project directory and set local environment
cd <path_to_magni_folder>
pyenv local magni
pyenv activate magni

# Verify setup
pyenv version    # Should show: magni (set by <PATH>/magni/.python-version)
python --version # Should show: Python 3.11.x
TIP

Verify thatpyenv version shows the magni virtual environment is active before proceeding.

Install Poetry

# Install Poetry package manager
pip install poetry==2.2.0

# Verify installation
poetry --version # Should show: Poetry (version 2.2.0)
WARNING

If your Poetry version is not 2.2.0, check the troubleshooting steps in theVerify Installation section below.

3. Configure Authentication

Set up Cloudsmith credentials for accessing Carta private packages:

# Configure Poetry with Cloudsmith tokens from 1Password
poetry config http-basic.carta token $(echo $CLOUDSMITH_PIP)
poetry config http-basic.cloudsmith_test $(echo $CLOUDSMITH_PIP_TEST)
CAUTION

Keychain Errors: If you encounter keychain errors during configuration:

  1. Open Keychain Access on your Mac

  2. Open the "login" keychain

  3. Delete any existing entries for "poetry-repository-carta"

  4. Retry the configuration command

4. Install Dependencies

# Install all project dependencies
poetry install

5. Setup Code Quality Tools

# Install pre-commit hooks system
brew install pre-commit

# Configure pre-commit for this repository
pre-commit install

# Test pre-commit setup
pre-commit run --all-files

šŸ¤– MCP (Model Context Protocol) Setup

NOTE

Magni includes an MCP server for AI-powered browser automation and test development.

Installation:

  • uvx - Run directly from Cloudsmith without Poetry setup:

    # Install uv
    brew install uv
    
    # Configure Cloudsmith token
    export CLOUDSMITH_PIP_TEST=your-cloudsmith-token
    
    # Add to Claude MCP
    claude mcp add magni-mcp --scope user --transport stdio -- uvx --index-url=https://dl.cloudsmith.io/${CLOUDSMITH_PIP_TEST}/carta/pip-test/python/simple/ magni-mcp

Full Documentation:

🧠 LLM Analyzer - Automated Test Failure Analysis

NOTE

Magni includes an LLM Analyzer that uses Claude Sonnet 4.5 via AWS Bedrock to automatically analyze test failures and generate human-readable summaries.

What It Does:

  • Parses Allure test reports to extract failure data

  • Sends failure context to Claude via AWS Bedrock

  • Generates human-readable summaries (page, element, action)

  • Enriches with team ownership based on pytest markers

  • Sends Slack notifications with analysis results

Quick Start:

# 1. Install LLM Analyzer dependencies
poetry install --with llm-analyzer

# 2. Request AWS Bedrock access via #help-production-eng Slack channel

# 3. Configure AWS credentials from AWS SSO
export AWS_ACCESS_KEY_ID='your-access-key'
export AWS_SECRET_ACCESS_KEY='your-secret-key'
export AWS_SESSION_TOKEN='your-session-token'

# 4. Run tests with analysis (automated script)
./llm_analyzer/analyze_tests.sh tests/path/to/test_file.py

Documentation:

Key Features:

  • 1M token context window for handling large test failures

  • Multimodal analysis (screenshots + text)

  • Systematic failure safety valve (cost optimization)

  • Token tracking for cost monitoring

āœ… Verify Installation

IMPORTANT

Run these commands to confirm your setup is complete:

# Check Python environment
python --version
poetry --version

# Check dependencies
poetry show

# Run a simple test to verify framework
pytest --version

# Check pre-commit configuration
pre-commit --version

Poetry version is not matching 2.2.0

WARNING

You likely have a global Poetry version conflicting with the virtual environment. We recommend removing the global version to prevent conflicts.

# You can confirm if there is a global version in the .local folder by running:
which poetry

# If that version was installed with Brew, run the following command to uninstall it
brew uninstall poetry

# If that version was installed using Curl, run the following command to uninstall it
curl -sSL https://install.python-poetry.org | python3 - --uninstall

Additional resources


Ownership

Carta Automation Team šŸ¤–

-
security - not tested
F
license - not found
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wecantdoit/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server