Skip to main content
AI/MLCrestApps

orchardcore-tester

Tests Orchard Core CMS features through browser automation. Use when the user needs to build, run, setup, or test Orchard Core functionality including admin features, content management, media library, and module testing. Use this skill when requests mention Orchard Core Feature Testing, Prerequisites, Core Workflow, Step 1 Build, Step 2 Run Application (Background), Get or Create Session Port, or closely related Orchard Core implementation, setup, extension, or troubleshooting work. Strong matches include work with OrchardCore.Cms.Web, OrchardCore.Cms.Web.csproj, AGENTS.md. It also helps with admin navigation, common features, debugging, setup wizard, plus the code patterns, admin flows, recipe steps, and referenced examples captured in this skill.

Stars
13
Source
CrestApps/CrestApps.AgentSkills
Updated
2026-05-29
Slug
CrestApps--CrestApps.AgentSkills--orchardcore-tester
View on GitHubRaw SKILL.md

// install — copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/CrestApps/CrestApps.AgentSkills/HEAD/plugins/orchardcore/skills/orchardcore-tester/SKILL.md -o .claude/skills/orchardcore-tester.md

Drops the SKILL.md into .claude/skills/orchardcore-tester.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

Orchard Core Feature Testing

This skill guides you through testing Orchard Core CMS features using browser automation with playwright-cli.

Prerequisites

  • OrchardCore repository (working directory)
  • .NET SDK 10.0+ installed
  • playwright-cli skill available

Core Workflow

Testing an Orchard Core feature follows these steps:

  1. Build the application
  2. Run the application server (background)
  3. Setup a test site (if needed)
  4. Test the feature via browser
  5. Verify results and clean up

Step 1: Build

dotnet build src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj -c Debug -f net10.0

Step 2: Run Application (Background)

Since multiple agents may run Orchard Core from different worktrees simultaneously, use a random port and run in background.

Get or Create Session Port

# Check for existing port file, or generate random port (5000-5999)
$portFile = ".orchardcore-port"
if (Test-Path $portFile) {
    $port = Get-Content $portFile
} else {
    $port = Get-Random -Minimum 5000 -Maximum 6000
    $port | Out-File $portFile -NoNewline
}
Write-Host "Using port: $port"

Start Application in Background

# Start Orchard Core in background process
$proc = Start-Process dotnet `
    -ArgumentList "run","-f","net10.0","--no-build","--urls","http://localhost:$port" `
    -WorkingDirectory "src/OrchardCore.Cms.Web" `
    -PassThru -NoNewWindow

# Save PID for later cleanup
$proc.Id | Out-File ".orchardcore-pid" -NoNewline
Write-Host "Started Orchard Core (PID: $($proc.Id)) on http://localhost:$port"

Wait for Application Ready

# Poll until app responds (max 60 seconds)
$port = Get-Content ".orchardcore-port"
$timeout = 60; $elapsed = 0
while ($elapsed -lt $timeout) {
    try {
        $response = Invoke-WebRequest -Uri "http://localhost:$port" -UseBasicParsing -TimeoutSec 2
        Write-Host "Application ready at http://localhost:$port"
        break
    } catch {
        Start-Sleep -Seconds 2
        $elapsed += 2
    }
}

Stop Application

# Stop the background process
if (Test-Path ".orchardcore-pid") {
    $pid = Get-Content ".orchardcore-pid"
    Stop-Process -Id $pid -Force -ErrorAction SilentlyContinue
    Remove-Item ".orchardcore-pid" -Force
    Write-Host "Stopped Orchard Core (PID: $pid)"
}

Step 3: Setup Test Site

Check if setup is needed: Navigate to the app URL - if you see a setup wizard, the site needs setup.

Reset for fresh setup (optional):

Remove-Item -Recurse -Force src/OrchardCore.Cms.Web/App_Data

Setup workflow:

# Get the port
$port = Get-Content ".orchardcore-port"

playwright-cli open http://localhost:$port
playwright-cli snapshot
# Fill: Site Name = "Test Site", Recipe = "Blog", Username = "admin", 
# Email = "admin@test.com", Password = "Password1!"
# Click "Finish Setup"

See references/setup-wizard.md for detailed field mapping.

Step 4: Test Features

Important: Replace 5000 with the actual port from .orchardcore-port file.

Login to Admin

playwright-cli open http://localhost:$port/Login
playwright-cli snapshot
# Fill username: admin, password: Password1!
# Click login button
playwright-cli open http://localhost:$port/Admin
playwright-cli snapshot

Common Test Scenarios

Test Media Library:

playwright-cli open http://localhost:$port/Admin/Media
playwright-cli snapshot

Test Content Creation:

playwright-cli open http://localhost:$port/Admin/Contents/ContentItems
playwright-cli snapshot
# Click New, select content type, fill fields, publish

Enable a Feature:

playwright-cli open http://localhost:$port/Admin/Features
playwright-cli snapshot
# Search for feature, click Enable

See references/common-features.md for detailed workflows.

Step 5: Verify Results

After each action:

# Check page state
playwright-cli snapshot

# Check for JavaScript errors
playwright-cli console error

# Verify page title
playwright-cli eval "document.title"

Debugging with Log Files

Console output is not visible when running in background. Use log files instead:

# View last 50 lines of today's log
Get-Content "src/OrchardCore.Cms.Web/App_Data/logs/orchard-log-$(Get-Date -Format 'yyyy-MM-dd').log" -Tail 50

# Search for errors
Select-String -Path "src/OrchardCore.Cms.Web/App_Data/logs/orchard-log-$(Get-Date -Format 'yyyy-MM-dd').log" -Pattern "ERROR|Exception" -Context 2,5

See references/debugging.md for more debugging techniques.

Quick Reference

Task URL Path
Admin Dashboard /Admin
Features /Admin/Features
Content Items /Admin/Contents/ContentItems
Media Library /Admin/Media
Users /Admin/Users/Index
Themes /Admin/Themes

Session Files

File Purpose
.orchardcore-port Persisted port number for session
.orchardcore-pid Process ID for cleanup

Default Credentials

References

  • references/admin-navigation.md - Admin URLs and UI patterns
  • references/setup-wizard.md - Site setup details
  • references/common-features.md - Feature-specific testing guides
  • references/debugging.md - Log files and troubleshooting
  • AGENTS.md (repo root) - Build and development instructions