divekit passcheck

Check test results for secure pipeline repositories.

Check test results for secure pipeline repositories and generate reports.

Usage

divekit passcheck [flags]

Flags

  • --distribution <name>: Specific distribution to check (auto-detect if not provided)
  • --detail: Show detailed test results per student
  • --report: Generate Excel report
  • --output-path <path>: Output path for generated reports (default: “./reports/”)
  • --token <token>: GitLab token
  • --remote <url>: Remote repository URL (GitLab Instance)

Credentials

  • Tokens are stored in your operating system’s credential manager (macOS Keychain, Windows Credential Manager, Linux Secret Service).
  • Prefer configuring hosts via:
    divekit config set @hosts git-nrw https://gitlab.git.nrw/  # prompts for token and stores it in OS keychain
    
  • The flags --token and --remote are optional overrides. If omitted, credentials and base URL are resolved from your configured hosts.

Description

The passcheck command automatically detects the current distribution, validates that secure pipeline is enabled, and checks test results from test repositories. It provides an overview of passed/failed tests and can generate detailed reports.

Features

  • Automatic Detection: Finds the current distribution and secure pipeline setup
  • Test Result Analysis: Checks test results from secure pipeline repositories
  • Detailed Reporting: Shows per-student test results when using --detail
  • Excel Reports: Generates comprehensive Excel reports with --report
  • Flexible Output: Customizable output paths for reports

Examples

Basic Usage

# Check test results for current distribution
divekit passcheck

# Check specific distribution
divekit passcheck --distribution my-assignment

Detailed Analysis

# Show detailed results per student
divekit passcheck --detail

# Generate Excel report
divekit passcheck --report

# Both detailed and report
divekit passcheck --detail --report

Custom Output

# Save reports to custom directory
divekit passcheck --report --output-path ./my-reports/

# Use specific GitLab instance
divekit passcheck --remote https://gitlab.example.com --token glpat-xxxxx

Output Format

Summary View (Default)

Distribution: my-assignment
Test Results Summary:
β”œβ”€β”€ Total Students: 25
β”œβ”€β”€ Passed: 20 (80%)
β”œβ”€β”€ Failed: 3 (12%)
└── Not Submitted: 2 (8%)

Recent Activity:
β”œβ”€β”€ alice.jones: PASSED (2 hours ago)
β”œβ”€β”€ bob.smith: FAILED (4 hours ago)
└── charlie.brown: PASSED (1 day ago)

Detailed View (--detail)

Distribution: my-assignment
Detailed Test Results:

Student: alice.jones
β”œβ”€β”€ Status: PASSED
β”œβ”€β”€ Test Suites: 5/5
β”œβ”€β”€ Last Run: 2024-01-15 14:30:00
└── Test Details:
    β”œβ”€β”€ Unit Tests: 25/25 passed
    β”œβ”€β”€ Integration Tests: 8/8 passed
    └── Code Quality: 95% score

Student: bob.smith
β”œβ”€β”€ Status: FAILED
β”œβ”€β”€ Test Suites: 3/5
β”œβ”€β”€ Last Run: 2024-01-15 10:15:00
└── Test Details:
    β”œβ”€β”€ Unit Tests: 20/25 passed
    β”œβ”€β”€ Integration Tests: 2/8 passed
    └── Code Quality: 78% score

Report Generation

When using --report, the command generates an Excel file with:

  • Student overview with pass/fail status
  • Detailed test results per student
  • Historical trends and statistics
  • Charts and visualizations
  • Timestamp and metadata

Prerequisites

  • Secure pipeline must be enabled in the distribution configuration
  • Test repositories must exist and be accessible
  • Valid GitLab token with API access
  • Network connectivity to GitLab instance

Integration

The passcheck command integrates with:

  • Secure Pipeline: Works with test repositories created by divekit distribute
  • CI/CD Systems: Reads results from automated test pipelines
  • GitLab API: Fetches test results and repository information
  • Excel Generation: Creates formatted reports for instructors