Skip to content
blog-smoke-tests logo

Blog Smoke Tests Skill

blog-smoke-tests

Run Playwright smoke tests for Denser blog application. Executes 15 tests (SMOKE-01 to SMOKE-15) against configurable environment (production, dev, or localhost) with retry support (max 3 attempts per failing test). Supports headed (visible browser) and headless modes. Collects artifacts (screens...

SKILL.md

Full skill instructions

Blog Smoke Tests Skill

Run Playwright smoke tests against the Denser blog application.

Features

  • 15 smoke tests organized by priority (P0-P4)
  • Retry logic - max 3 attempts per failing test
  • Headed/​headless modes - choose visible or background execution
  • Artifact collection - screenshots and trace.zip on failures
  • HTML report - comprehensive test results report
  • Tracing - Playwright traces for debugging failures

Workflow

Step 1: Ask User Preferences

Before running tests, ask user:

  1. Target environment:

  2. Browser mode:

    • Headed (default) - visible browser, good for debugging
    • Headless - faster, for CI/​CD
  3. Test scope:

    • All - run all 15 tests
    • P0 - critical tests only (SMOKE-01, 04, 08)
    • P1 - important tests (SMOKE-05, 06, 07)
    • P2 - tooltip tests (SMOKE-02, 03, 09)
    • P3 - navigation tests (SMOKE-10, 11, 12)
    • P4 - additional tests (SMOKE-13, 14, 15)

Step 2: Prepare Directories

# Create temp and report directories
mkdir -p /​storage1/​denser/​apps/​blog/​playwright/​temp_ai_script_tests
mkdir -p /​storage1/​denser/​apps/​blog/​playwright/​temp_ai_report_tests

# Copy test scripts
cp /​storage1/​denser/​.claude/​skills/​blog-smoke-tests/​scripts/​smoke-*.mjs /​storage1/​denser/​apps/​blog/​playwright/​temp_ai_script_tests/

Step 3: Run Tests with Retry Logic

For each test:

  1. Run test script with REPORT_DIR set
  2. If FAIL, retry up to 2 more times (max 3 attempts total)
  3. Wait 2 seconds between retries
  4. Collect JSON result from output (line starting with __RESULT__)
  5. On failure: artifacts saved automatically (screenshot + trace.zip)

Command to run single test:

cd /​storage1/​denser/​apps/​blog
BASE_URL=https://blog.openhive.network HEADLESS=false REPORT_DIR=./​playwright/​temp_ai_report_tests pnpm exec node playwright/​temp_ai_script_tests/​smoke-XX-name.mjs

Replace:

  • BASE_URL=https://blog.openhive.network with chosen environment URL
  • HEADLESS=false with HEADLESS=true for headless mode

Parsing JSON result: Each test outputs a JSON line prefixed with __RESULT__:

__RESULT__{"id":"SMOKE-01","name":"Homepage Posts","priority":"P0","passed":true,"error":null,"artifacts":[]}

Step 4: Generate HTML Report

After running all tests, collect results and generate HTML report:

# Option 1: Using generate-report.mjs script
cd /​storage1/​denser/​apps/​blog
pnpm exec node /​storage1/​denser/​.claude/​skills/​blog-smoke-tests/​scripts/​generate-report.mjs '[results-json-array]'

Alternatively, create report manually based on collected results.

Report location: ./​playwright/​temp_ai_report_tests/​report.html

Step 5: Cleanup

After all tests complete:

rm -f /​storage1/​denser/​apps/​blog/​playwright/​temp_ai_script_tests/​smoke-*.mjs

Keep report directory with:

  • report.html - HTML test report
  • SMOKE-XX-failure.png - screenshots of failures
  • SMOKE-XX-trace.zip - Playwright traces for failures

Step 6: Summary

Present results:

========================================
SMOKE TEST SUMMARY: X/​Y PASSED
========================================
✓ [P0] SMOKE-01: Homepage Posts
✓ [P0] SMOKE-04: Post Navigation
✓ [P0] SMOKE-08: User Profile
✓ [P1] SMOKE-05: Votes API
...
✗ [P3] SMOKE-11: Categories (3 attempts)
...
========================================

HTML Report: ./​playwright/​temp_ai_report_tests/​report.html
Artifacts: ./​playwright/​temp_ai_report_tests/

To view traces: npx playwright show-trace ./​playwright/​temp_ai_report_tests/​SMOKE-XX-trace.zip

Artifacts on Failure

When a test fails, the following artifacts are saved:

ArtifactDescriptionLocation
ScreenshotFull page screenshot at failureSMOKE-XX-failure.png
TracePlaywright trace with snapshotsSMOKE-XX-trace.zip

Viewing Traces:

cd /​storage1/​denser/​apps/​blog
npx playwright show-trace ./​playwright/​temp_ai_report_tests/​SMOKE-04-trace.zip

Test Catalog

PriorityIDNameScript
P0SMOKE-01Homepage Postssmoke-01-homepage-posts.mjs
P0SMOKE-04Post Navigationsmoke-04-post-navigation.mjs
P0SMOKE-08User Profilesmoke-08-profile.mjs
P1SMOKE-05Votes APIsmoke-05-votes-api.mjs
P1SMOKE-06Commentssmoke-06-comments.mjs
P1SMOKE-07Payoutsmoke-07-payout.mjs
P2SMOKE-02Votes Tooltipsmoke-02-votes-tooltip.mjs
P2SMOKE-03Payout Tooltipsmoke-03-payout-tooltip.mjs
P2SMOKE-09Followerssmoke-09-followers.mjs
P3SMOKE-10Tagssmoke-10-tags.mjs
P3SMOKE-11Categoriessmoke-11-categories.mjs
P3SMOKE-12Communitiessmoke-12-communities.mjs
P4SMOKE-13Static Pagessmoke-13-static-pages.mjs
P4SMOKE-14Theme Togglesmoke-14-theme.mjs
P4SMOKE-15Login Buttonsmoke-15-login.mjs

Retry Logic Pattern

const MAX_RETRIES = 3;
const results = [];

for (const test of tests) {
  let passed = false;
  let attempts = 0;
  let lastError = null;
  let artifacts = [];

  for (let attempt = 1; attempt <= MAX_RETRIES; attempt++) {
    attempts = attempt;
    const output = await runTest(test);

    // Parse __RESULT__ from output
    const resultLine = output.match(/​__RESULT__(.+)/);
    if (resultLine) {
      const result = JSON.parse(resultLine[1]);
      passed = result.passed;
      lastError = result.error;
      artifacts = result.artifacts;
    }

    if (passed) break;

    if (attempt < MAX_RETRIES) {
      console.log(`Retry ${attempt + 1}/​${MAX_RETRIES} in 2 seconds...`);
      await sleep(2000);
    }
  }

  results.push({
    id: test.id,
    name: test.name,
    priority: test.priority,
    passed,
    attempts,
    error: lastError,
    artifacts
  });
}

Environment Variables

VariableDescriptionDefault
BASE_URLTarget environment URLhttps://blog.openhive.network
HEADLESSRun browser in headless modefalse (headed)
REPORT_DIRDirectory for artifacts and report./​playwright/​temp_ai_report_tests

Available Environments

EnvironmentURL
Productionhttps://blog.openhive.network
Devhttps://blog.dev.openhive.network
Localhosthttp://localhost:3000

Reference Documentation

  • Test patterns and selectors: See references/​test-selectors.md
  • Full documentation: /​storage1/​denser/​docs/​playwright-testing-notes.md
  • Blog architecture: /​storage1/​denser/​docs/​denser-blog-architecture.md

Directories

PathPurpose
Production URLhttps://blog.openhive.network
Dev URLhttps://blog.dev.openhive.network
Localhost URLhttp://localhost:3000
API URLhttps://api.hive.blog
Working directory/​storage1/​denser/​apps/​blog
Temp scriptsplaywright/​temp_ai_script_tests/
Reports & artifactsplaywright/​temp_ai_report_tests/
Skill scripts/​storage1/​denser/​.claude/​skills/​blog-smoke-tests/​scripts/

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View