# Test Cases Prompts

Generate comprehensive manual test cases from **any requirement source** — BRDs, extraction JSON/Markdown, legacy application artifacts, or design documents. Test cases are organized by FlexBase modules and features, with concrete sample data, assumptions, and expected results that a manual QA tester can execute.

## Prerequisites

Your AI agent must have the **FlexBase MCP server** configured. The MCP server provides guides, conventions, and prompt templates that the agent loads automatically when processing your requests.

## Guides & Conventions (Loaded Automatically by MCP)

| Guide                    | MCP Call                                      | Purpose                                                                                            |
| ------------------------ | --------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| Manual Test Case Guide   | `getGuideSection("manual-test-cases", ...)`   | Core test case structure, categories per operation type, organization modes                        |
| Postman Collection Guide | `getGuideSection("postman-collection", ...)`  | Generate Postman v2.1 collections with test scripts, pre-request scripts, Newman CI/CD integration |
| Excel Workbook Guide     | `getGuideSection("excel-test-workbook", ...)` | Generate Excel workbooks with priority colors, status dropdowns, per-module sheets                 |
| Conventions              | `getCodeConventions("manual-test-case")`      | Naming rules, field validation derivation, styling rules                                           |

## What Gets Generated

* **Test Case ID convention:** `TC-[MODULE]-[FEATURE]-[NNN]` (module-based) or `TC-PAGE-[GROUP]-[NNN]` (page-based)
* **Priority levels:** P0 (Critical), P1 (High), P2 (Medium), P3 (Low)
* Every test includes: preconditions, assumptions, sample data table, steps, expected results
* **Minimum test counts:** CREATE (14), UPDATE (10), DELETE (7), GETBYID (6), GETPAGEDLIST (9)
* Validation tests always in pass/fail pairs
* Event and subscriber verification tests
* Workflow state transition tests (valid + invalid)
* Files split per module when output is large
* **Output formats:** Markdown files (default) or Excel workbook (.xlsx) with priority colors, status dropdowns, and per-module sheets

***

## Prompts — Module-Based Test Cases

Copy any prompt below, replace placeholders with your values, and paste into your AI agent.

### From a BRD or Requirement Document

```
Analyze this BRD and generate manual test cases organized by module with concrete sample data, assumptions, and expected results for each feature

@[BRD_FILE].md
```

```
Generate manual test cases for the [ModuleName] module from this requirements document. Include positive, negative, boundary, and validation test cases for every feature

@[REQUIREMENTS_FILE].md
```

### From FlexBase Extraction JSON

```
Parse this FlexBase extraction JSON and generate manual test cases for every feature. Derive field validations from domainServices attributes (required, maxLength, type). Include sample test data for every field

@[PROJECT]_Import.json
```

```
Generate manual test cases for the [ModuleName] module from this extraction JSON. Cover all features including events, subscribers, and workflow state transitions

@[PROJECT]_[ModuleName]_Features.json
```

### From FlexBase Extraction Markdown

```
Parse this FlexBase extraction Markdown and generate manual test cases for all modules. Use entity attribute tables to derive field validation tests and sample data

@[PROJECT]_Summary.md
```

```
Generate manual test cases from this per-module extraction Markdown. Include cross-module integration tests for any subscriber chains

@[PROJECT]_[ModuleName].md
```

### From Legacy Application Analysis

```
Analyze this legacy application output and generate manual test cases including data migration verification, trigger-to-subscriber mapping tests, and screen equivalence tests

@[LEGACY_ANALYSIS_FILE].md
```

```
Generate manual test cases from this legacy database schema. Map each table to a module, each CRUD operation to a feature, and each trigger to a subscriber test case

@[DATABASE_SCHEMA].sql
```

### Single Feature — Quick

```
Generate all manual test cases for the [FeatureName] feature in the [ModuleName] module.
Operation type: [CREATE/UPDATE/DELETE/GETBYID/GETPAGEDLIST]
Entity fields: [Field1] (string, max 100, required), [Field2] (int, required), [Field3] (datetime, optional)
Validations: [Validation1 description], [Validation2 description]
Events: [EventName] → Subscribers: [Subscriber1], [Subscriber2]
```

### Gap Analysis — Review Existing Test Cases

```
Review these test cases against the source requirements and identify gaps — missing test categories, uncovered validations, missing event/subscriber tests, and placeholder data that needs concrete values

Requirements: @[REQUIREMENTS_FILE].md
Test Cases: @[TESTCASES_FILE].md
```

### Complete Module Test Suite

```
Generate a complete manual test suite for the [ModuleName] module from this extraction. Output:
1. Summary file with test distribution and global assumptions
2. Test cases for every feature (CREATE, UPDATE, DELETE, GET, GETPAGEDLIST)
3. Cross-module integration tests for events/subscribers
4. Reference data setup needed before testing

@[PROJECT]_Import.json
```

***

## Prompts — Page-Based Test Cases (UI / UX Perspective)

```
Analyze this page inventory and generate page-based test cases organized by page group (PublicCMS, BookingFlow, GuestAccount, AdminCalendar, etc.) with responsive and accessibility checks

@[PAGE_INVENTORY_OR_ESTIMATION_DOC].md
```

```
Generate page-based test cases for the [GroupName] page group. Include page load, user interaction, responsive layout (375px / 768px / 1200px+), and accessibility (tab order, ARIA labels, contrast) checks

@[UI_DESIGNS_OR_WIREFRAMES].md
```

```
Generate both module-based test cases (by API feature) AND page-based test cases (by UI page) from this BRD. Output separate file sets for each perspective

@[BRD_FILE].md
```

***

## Prompts — Excel Workbook Output

```
Analyze this BRD and generate an Excel workbook (.xlsx) with all manual test cases organized by module — include priority colors (P0=red, P1=yellow, P2=green, P3=grey), frozen headers, auto-filters, and status dropdown columns

@[BRD_FILE].md
```

```
Generate a Node.js ExcelJS script that parses all Markdown test case files in TestCases/ and produces a multi-sheet Excel workbook with per-module sheets, priority colors, status dropdowns, and a summary sheet

@TestCases/
```

```
Convert these existing Markdown test case files to an Excel workbook with frozen headers, color-coded priorities, status tracking dropdowns, and per-module sheets

@[PROJECT]_TestCases_*.md
```

### Markdown → Excel Conversion (Existing Test Cases)

```
Parse all page-based test case files in PageTestCases/ and produce an Excel workbook with per-page-group sheets, responsive/accessibility columns, and a summary sheet

@PageTestCases/
```

```
Generate a combined Excel workbook with both module-based tests (from TestCases/) and page-based tests (from PageTestCases/) on separate sheet groups, plus a unified summary sheet

@TestCases/ @PageTestCases/
```

***

## Prompts — Postman Collection Output (API Tests)

```
Generate a Postman Collection v2.1 JSON from these module test case Markdown files — map each test case to an HTTP request with test scripts asserting expected status codes and response bodies. Include environment file with baseUrl and auth token

@TestCases/
```

```
Analyze this BRD and generate a Postman collection with API test requests for every feature — include happy path, validation, boundary, and negative test cases with concrete sample data and test script assertions

@[BRD_FILE].md
```

```
Parse this FlexBase extraction JSON and generate a Postman collection with requests for every feature. Derive request bodies from domainServices attributes and test scripts from expected validation messages

@[PROJECT]_Import.json
```

```
Generate a Postman collection for the [ModuleName] module with requests for all features (CREATE, UPDATE, DELETE, GET, GETPAGEDLIST) including positive, negative, and boundary test cases. Include pre-request scripts for dynamic data and test scripts for assertions

@[PROJECT]_TestCases_[ModuleName].md
```

***

## Examples

| Project                 | Type                                  | Location                                              |
| ----------------------- | ------------------------------------- | ----------------------------------------------------- |
| SSW (Sri Sri Wellbeing) | Module tests (24 modules, 620+ tests) | `Samples/Welbeing/TestCases/`                         |
| SSW                     | Page tests (79 pages, 12 groups)      | `Samples/Welbeing/PageTestCases/`                     |
| SSW                     | Excel generator (markdown → xlsx)     | `Samples/Welbeing/generate-all-module-tests-excel.js` |
| SSW                     | Sample Excel generator                | `Samples/Welbeing/generate-test-excel.js`             |
| KG (KaalGyan Calendar)  | Module tests (13 modules, 114 tests)  | `Samples/KG/TestCases/`                               |
| KG                      | Excel generator (embedded test data)  | `Samples/KG/TestCases/generate-kg-test-excel.js`      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flexbase.in/flexbase-mcp-ai-prompts/test-cases-prompts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
