Generate Test Cases · AI · {{ $quarter }}

Paste a requirement or import the downloaded SRS, copy the ready-made prompt into your AI tool (Claude.ai / ChatGPT / cowork) — attach any SRS mockup screenshots in that same message — then paste its answer back to preview and save the test cases. No API cost.

{{-- Step 1: requirements → copy prompt --}}

Step 1 · Build the prompt

{{-- Prompt style: both variants emit the same JSON, so you can run a requirement through each and compare the resulting suites side by side. --}}
Prompt style
@foreach ($variants as $key => $v) @endforeach
{{-- Requirement source: type it, or import the downloaded SRS so its text rides along inside the copied prompt. --}}
@if ($inputMode === 'paste') @else
Specification file (PDF, XLSX, DOCX, CSV, TXT, MD — max 20 MB) @if ($specName === '')
Reading the file…
@unless ($pdfOk)

⚠ PDF reading isn’t available on this server — use the XLSX/DOCX version, or attach the PDF directly in Claude with the copied prompt.

@endunless @else
📄 {{ $specName }} {{ number_format($specChars) }} characters extracted
@endif @if ($specError)

{{ $specError }}

@endif @if ($specNote)

{{ $specNote }}

@endif @if ($specTruncated)

This document is longer than {{ number_format($maxChars) }} characters, so the prompt carries only the first {{ number_format($maxChars) }} — later sections won’t be covered. Split the SRS, or attach the original file in Claude instead.

@endif @if ($specText !== '')
Preview extracted text
{{ mb_substr($specText, 0, 4000) }}@if (mb_strlen($specText) > 4000)

… ({{ number_format(mb_strlen($specText) - 4000) }} more characters)@endif
@endif
@endif
@if ($aiReady) @endif

📎 Tip: after pasting the prompt into your AI, attach your SRS mockup screenshots in the same message — the AI reads them alongside the requirement for more accurate, complete steps. Then copy its whole reply into Step 2.

@if ($inputMode === 'file' && $specName !== '')

📄 The extracted text of {{ $specName }} is already inside the copied prompt. For a spec with heavy tables, diagrams or screenshots, also attach the original file in that same Claude message — it reads the layout better than extracted text.

@endif
{{-- Step 2: paste AI output → preview --}}

Step 2 · Paste the AI's answer

@if ($cases || $aiOutput !== '') @endif
@if ($error)
{{ $error }}
@endif
@if ($cases) @php $copy = ''; $copyCat = null; foreach ($cases as $c) { $cat = trim($c['category'] ?? ''); if ($cat !== '' && $cat !== $copyCat) { $copy .= "== ".$cat." ==\n"; $copyCat = $cat; } $copy .= $c['id'].' · '.$c['scenario'].' ['.$c['type'].' · '.$c['priority'].']'."\n"; $copy .= 'Preconditions: '.$c['preconditions']."\n"; $copy .= "Steps:\n".$c['steps']."\n"; $copy .= 'Test Data: '.$c['test_data']."\n"; $copy .= 'Expected Result: '.$c['expected_result']."\n\n"; } $copy = rtrim($copy)."\n"; @endphp

Generated Test Cases {{ count($cases) }}

@if ($isLead) @endif
@php $grouped = collect($cases)->groupBy(fn ($c) => trim($c['category'] ?? '')); $hasCat = $grouped->keys()->contains(fn ($k) => $k !== ''); $twoLevel = ($smpp ?? false) && collect($cases)->contains(fn ($c) => trim($c['title'] ?? '') !== ''); @endphp @foreach ($grouped as $cat => $group) @php $ck = 'c'.$loop->index; @endphp @if ($hasCat) @endif @php $rowGroups = $twoLevel ? collect($group)->groupBy(fn ($c) => trim($c['title'] ?? '')) : collect(['' => $group]); @endphp @foreach ($rowGroups as $title => $tRows) @php $tk = $ck.'t'.$loop->index; @endphp @if ($twoLevel) @endif @foreach ($tRows as $c) @endforeach @endforeach @endforeach
IDScenarioPreconditionsSteps Test DataExpected ResultPriorityType
{{ $cat !== '' ? $cat : 'Uncategorized' }} {{ count($group) }}
{{ $title !== '' ? $title : '(untitled)' }} {{ count($tRows) }}
{{ $c['id'] }} {{ $c['scenario'] }} {{ $c['preconditions'] }} {{ $c['steps'] }} {{ $c['test_data'] }} {{ $c['expected_result'] }} {{ $c['priority'] }} {{ $c['type'] }}
@if ($effort)
@include('partials.effort-card', ['effort' => $effort])
@endif @unless ($isLead)

Saving into the Test Cases module is limited to leads. You can Copy the results above.

@endunless
@endif