This document outlines the comprehensive testing plan for validating mem shadow git installation across different platforms and scenarios.
| Platform | Version | Package Manager | Status | Notes |
|---|---|---|---|---|
| Ubuntu | 20.04 LTS | apt | ✅ Tested | Primary development platform |
| Ubuntu | 22.04 LTS | apt | ✅ Tested | Current LTS |
| Ubuntu | 24.04 LTS | apt | 🔄 Planned | Latest LTS |
| Debian | 11 (Bullseye) | apt | 🔄 Planned | Stable |
| Debian | 12 (Bookworm) | apt | 🔄 Planned | Current stable |
| Arch Linux | Rolling | pacman | ✅ Tested | Development environment |
| Fedora | 39 | dnf | 🔄 Planned | Current release |
| RHEL | 9 | yum/dnf | 🔄 Planned | Enterprise |
| CentOS | Stream 9 | yum/dnf | 🔄 Planned | Enterprise |
| openSUSE | Tumbleweed | zypper | 🔄 Planned | Rolling release |
| Alpine | Latest | apk | 🔄 Planned | Container environments |
| macOS | 12+ | brew | 🔄 Planned | Intel/ARM64 |
-
Fresh OS Installation
- Minimal OS installation
- No development tools pre-installed
- Default package repositories only
-
Container Testing
- Docker containers with base OS images
- Podman compatibility
- Multi-stage builds
-
CI/CD Environments
- GitHub Actions
- GitLab CI
- Jenkins
- Azure DevOps
-
Existing Development Environment
- System with build tools already installed
- Conflicting package versions
- Custom library paths
-
Minimal Development Environment
- Basic compiler only
- Missing optional dependencies
- Limited disk space
# Test all platforms
for platform in ubuntu debian arch fedora; do
echo "Testing on $platform..."
docker run --rm -v $(pwd):/mem $platform:latest /mem/scripts/check-deps.sh
done
# Test dependency auto-installation
./scripts/check-deps.sh --auto-install --dry-run
# Test missing dependencies
# (temporarily rename dependency to simulate missing)
mv /usr/bin/cmake /usr/bin/cmake.bak
./scripts/check-deps.sh
mv /usr/bin/cmake.bak /usr/bin/cmakeExpected Results:
- ✅ Correct platform detection on all systems
- ✅ Accurate dependency status reporting
- ✅ Proper package installation commands for each platform
- ✅ Graceful handling of missing dependencies
# Test installation modes
./scripts/install.sh --dry-run
./scripts/install.sh --skip-deps --dry-run
./scripts/install.sh --prefix=/tmp/test-install
# Test error handling
./scripts/install.sh --prefix=/invalid/path
# Test force installation
./scripts/install.sh --force --prefix=/tmp/test-installExpected Results:
- ✅ Successful build and installation on all platforms
- ✅ Proper PREFIX handling
- ✅ Correct dependency installation for each platform
- ✅ Graceful error handling for invalid paths
- ✅ Force reinstallation works correctly
# Test detection
./scripts/detect-rapala.sh detect
# Test with no rapala
mv ~/.rapala ~/.rapala.bak 2>/dev/null || true
./scripts/detect-rapala.sh detect
mv ~/.rapala.bak ~/.rapala 2>/dev/null || true
# Test installation
./scripts/detect-rapala.sh install --dry-run
# Test verification
./scripts/detect-rapala.sh verifyExpected Results:
- ✅ Accurate detection of rapala installations
- ✅ Proper handling when no rapala found
- ✅ Successful hook installation
- ✅ Verification works correctly
# Full verification
./scripts/verify-install.sh --verbose
# Test with missing components
rm /usr/local/bin/mem
./scripts/verify-install.sh
# Test auto-fix
./scripts/verify-install.sh --fix-issuesExpected Results:
- ✅ Comprehensive system validation
- ✅ Accurate problem detection
- ✅ Useful troubleshooting information
- ✅ Auto-fix functionality works
# Test in clean directory
mkdir /tmp/test-project && cd /tmp/test-project
git init
/path/to/mem/templates/apply-templates.sh --dry-run
# Test overwrite protection
echo "existing" > .gitignore
/path/to/mem/templates/apply-templates.sh
# Test force overwrite
/path/to/mem/templates/apply-templates.sh --forceExpected Results:
- ✅ Templates applied correctly
- ✅ Existing files protected
- ✅ Force mode works
- ✅ Git repository detection works
# Test dry run
./scripts/uninstall.sh --dry-run
# Test selective removal
./scripts/uninstall.sh --keep-hooks
# Test complete removal
./scripts/uninstall.sh --remove-data --forceExpected Results:
- ✅ Accurate removal detection
- ✅ Selective removal options work
- ✅ Complete removal works
- ✅ No broken systems after uninstall
# Ubuntu test
FROM ubuntu:22.04
RUN apt update && apt install -y git
COPY . /mem
WORKDIR /mem
RUN ./scripts/install.sh
RUN ./scripts/verify-install.sh
# Arch test
FROM archlinux:latest
RUN pacman -Sy --noconfirm git
COPY . /mem
WORKDIR /mem
RUN ./scripts/install.sh
RUN ./scripts/verify-install.sh
# Alpine test
FROM alpine:latest
RUN apk add --no-cache git bash
COPY . /mem
WORKDIR /mem
RUN ./scripts/install.sh
RUN ./scripts/verify-install.sh# Test script for VM environments
#!/bin/bash
set -e
# Create VM snapshots for each platform
for platform in ubuntu-22.04 debian-12 fedora-39; do
echo "Testing on $platform..."
# Restore clean snapshot
vm restore $platform-clean
vm start $platform
# Copy mem source
scp -r . vm-$platform:/tmp/mem
# Run installation
vm ssh $platform "cd /tmp/mem && ./scripts/install.sh"
# Run verification
vm ssh $platform "cd /tmp/mem && ./scripts/verify-install.sh"
# Test functionality
vm ssh $platform "mem init test && cd test && echo hello | mem hash-object --stdin --write"
vm stop $platform
done# Measure installation time
time ./scripts/install.sh
# Measure build time
time make build
# Measure dependency checking time
time ./scripts/check-deps.shPerformance Targets:
- Installation: < 5 minutes on modern hardware
- Build: < 2 minutes with parallel compilation
- Dependency check: < 30 seconds
# Initialize repository
time mem init large-test
cd large-test
# Object creation performance
time for i in {1..1000}; do
echo "test $i" | mem hash-object --stdin --write
done
# Log performance
time mem log --max-count 100Performance Targets:
- Repository initialization: < 1 second
- Object creation: < 1ms per object
- Log display: < 100ms for 100 entries
# Test hook installation
./scripts/detect-rapala.sh install
# Test hook execution
echo '{"event":"PostToolUse","tool":"Write","timestamp":"2025-01-01T00:00:00Z"}' | \
node /path/to/rapala/hooks/mem-intelligent-committer/index.js
# Test shadow git creation
# (Use actual Claude Code tool to trigger)
# Verify audit trail
mem log --max-count 5# Test git workflow
git init test-git && cd test-git
mem init .
# Apply templates
../templates/apply-templates.sh git-hooks
# Test git hook
echo "test file" > test.txt
git add test.txt
git commit -m "Test commit"
# Verify integration
mem log --max-count 1# Test VS Code integration
../templates/apply-templates.sh vscode
# Verify settings
cat .vscode/settings.json
cat .vscode/tasks.json
# Test tasks (if VS Code available)
code . # Open in VS Code
# Run "Mem: Build" task
# Run "Mem: Test" task-
Documentation Clarity
- Installation instructions are clear
- Prerequisites are well documented
- Examples work as described
-
Error Handling
- Clear error messages
- Helpful troubleshooting guidance
- Recovery procedures work
-
Getting Started
- Quick start guide works
- Basic functionality is intuitive
- Advanced features are discoverable
-
Build System
- Standard build tools work
- Custom configurations supported
- Development workflow is smooth
-
Customization
- Installation paths configurable
- Templates can be modified
- Integration is flexible
name: Installation Tests
on: [push, pull_request]
jobs:
test-installation:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Test dependency checking
run: ./scripts/check-deps.sh --verbose
- name: Test installation
run: ./scripts/install.sh --prefix=$HOME/.local
- name: Test verification
run: ./scripts/verify-install.sh
- name: Test basic functionality
run: |
export PATH="$HOME/.local/bin:$PATH"
mem init test
cd test
echo "test" | mem hash-object --stdin --write
- name: Test uninstallation
run: ./scripts/uninstall.sh --prefix=$HOME/.local --forcename: Cross-Platform Tests
on: [push, pull_request]
jobs:
docker-tests:
strategy:
matrix:
image:
- ubuntu:20.04
- ubuntu:22.04
- debian:11
- debian:12
- archlinux:latest
- fedora:39
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test on ${{ matrix.image }}
run: |
docker run --rm -v $PWD:/mem -w /mem ${{ matrix.image }} bash -c "
# Install git and bash
if command -v apt >/dev/null; then
apt update && apt install -y git bash
elif command -v yum >/dev/null; then
yum install -y git bash
elif command -v pacman >/dev/null; then
pacman -Sy --noconfirm git bash
elif command -v dnf >/dev/null; then
dnf install -y git bash
fi
# Run tests
./scripts/check-deps.sh
./scripts/install.sh --prefix=/tmp/mem
PATH=/tmp/mem/bin:\$PATH ./scripts/verify-install.sh
"- System meets minimum requirements
- No conflicting software installed
- Sufficient disk space available
- Network connectivity for dependencies
- Dependency checker runs successfully
- All required dependencies installed
- Build completes without errors
- Binaries installed to correct location
- Installation verification passes
- Documentation accessible
-
mem --versionworks - Basic repository operations work
- Rapala hooks install successfully
- Templates apply correctly
- Git integration functions
- Performance meets expectations
- Installation with existing conflicting software
- Installation on systems with limited resources
- Installation with custom library paths
- Installation behind corporate firewalls
- Installation with restricted permissions
# Mem Installation Test Report
**Date:** YYYY-MM-DD
**Tester:** Name
**Platform:** OS Version
**Environment:** Description
## Test Results
### Dependency Checking
- [ ] PASS - Platform detection
- [ ] PASS - Dependency verification
- [ ] PASS - Installation commands
### Installation
- [ ] PASS - Automated installation
- [ ] PASS - Custom prefix installation
- [ ] PASS - Dependency installation
- [ ] PASS - Build process
- [ ] PASS - Binary installation
### Verification
- [ ] PASS - Binary availability
- [ ] PASS - Basic functionality
- [ ] PASS - Rapala integration
- [ ] PASS - Git integration
- [ ] PASS - Performance tests
### Issues Found
1. Issue description
- Impact: High/Medium/Low
- Workaround: Description
- Status: Open/Resolved
### Recommendations
1. Recommendation 1
2. Recommendation 2Based on development environment testing:
-
Script Functionality
- Dependency checker works correctly
- Rapala detection functions properly
- Template application works
- Build system integration complete
-
Platform Compatibility
- Arch Linux (development environment)
- Scripts handle different package managers
- Cross-platform path handling implemented
-
Integration
- CMake build system works
- Makefile wrapper functions
- Git integration implemented
- VS Code templates created
-
Full Installation Testing
- Complete installation on clean systems
- Cross-platform validation
- Container-based testing
-
Performance Validation
- Installation time measurement
- Runtime performance testing
- Resource usage analysis
-
User Acceptance Testing
- Documentation review
- New user workflow validation
- Error handling verification
This testing plan ensures comprehensive validation of the mem shadow git installation system across all supported platforms and use cases.