test-material-batch

Automate end-to-end material batch management tests for the Cretas food traceability system.

Updated Mar 30, 2025
One-click install
npx skills add https://github.com/j4xie/my-prototype-logistics --skill test-material-batch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-material-batch
Source: https://github.com/j4xie/my-prototype-logistics/tree/main/.claude/skills/test-material-batch
Command: npx skills add https://github.com/j4xie/my-prototype-logistics --skill test-material-batch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates testing for the material batch management module, covering batch creation, reservation, consumption, FIFO distribution, and inventory alerts.

Core Features & Use Cases

  • Batch Lifecycle Testing: Validate batch creation, availability, reservation, and consumption flows.
  • FIFO & Alerts: Ensure FIFO allocation and inventory alert conditions work as expected.
  • Use Case: Verify a new supplier batch flows from entry to reservation and consumption with correct FIFO handling.

Quick Start

Run the material batch test suite: bash tests/api/test-material-batch.sh

Frequently Asked Questions about test-material-batch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate testing for material batch management with FIFO validation?

Automate material batch testing by running the test suite that validates batch lifecycle operations—creation, reservation, consumption, and FIFO allocation—against REST APIs with token authentication, generating PASS/FAIL reports for each step.

Can I test batch inventory alerts and traceability across the material lifecycle?

Yes. The test suite covers inventory alert conditions and traceability by validating batch status filtering, consumption flows, and alert triggers throughout the complete batch lifecycle from entry to consumption.

What does FIFO batch allocation testing verify?

FIFO testing verifies that material batches are allocated and consumed in correct first-in-first-out order, ensuring older batches are reserved and consumed before newer ones, critical for food traceability compliance.

How do I validate batch creation, reservation, and consumption flows end-to-end?

Run the integrated test suite against localhost:10010 with token-based authentication. It validates batch creation, retrieves batch details, tests reservation and consumption operations, and confirms correct state transitions and inventory updates.

Can I test material batch management without manual integration testing?

Yes. The automated test suite eliminates manual testing by covering all batch operations—listing, filtering, creating, reserving, consuming, and releasing—with automated PASS/FAIL reporting for rapid validation.