PBM Claims QA Automation Framework
Applying 6+ years of pharmacy benefit management domain expertise to automated test design.
What & Why
After six years of manually testing PBM claims systems, running hundreds of claim adjudications, validating eligibility flows, checking reject codes against NCPDP standards, I know exactly what breaks and why. This project takes that domain knowledge and encodes it into automated tests.
This isn't a generic testing framework. It's built by someone who has lived inside PBM workflows and knows the edge cases that no requirements document fully captures.
Architecture
The framework is built with Python and Pytest, structured for maintainability and clarity:
pbm-qa-automation/ ├── src/ │ └── pbm_qa/ │ ├── api/ # API client layer │ ├── models/ # Pydantic data models (claims, members, plans) │ └── utils/ # NCPDP lookups, validators, helpers ├── tests/ │ ├── unit/ # Fast, isolated unit tests │ ├── integration/ # API and cross-module tests │ ├── e2e/ # Full end-to-end workflow tests │ └── conftest.py # Shared fixtures and test config ├── config/ # Environment and test configuration ├── data/ # Test data sets ├── .github/ │ └── workflows/ │ └── ci.yml # GitHub Actions CI pipeline └── pyproject.toml # Project config, deps, pytest markers
Coverage
Test Coverage Areas
Eligibility Validation
Verifies member eligibility across active, terminated, and future-effective dates. Tests coverage gaps, dependent age-outs, and coordination of benefits scenarios that are common failure points in PBM claims processing.
NCPDP Reject Code Handling
Validates correct reject codes are returned for specific claim failure scenarios: wrong BIN/PCN, invalid NDC, refill too soon, quantity limits exceeded. Maps real-world rejection patterns I encountered across thousands of test claims.
Formulary & Copay Logic
Tests tier assignment, step therapy requirements, prior authorization triggers, and copay calculation across different benefit plan structures. Covers the accumulator logic that tracks deductibles and out-of-pocket maximums.
CI/CD Pipeline
The test suite runs automatically on every push via GitHub Actions:
- ■Automated test execution on push and pull request via GitHub Actions
- ■Pytest markers for test categorization: unit, integration, e2e, smoke, regression, ncpdp
- ■Coverage tracking with 80% minimum threshold enforced
- ■Allure test reporting for detailed pass/fail analysis
View the source code
View RepositoryWhy This Matters
Anyone can learn Pytest. The difference is knowing what to test.
When I write a test for NCPDP reject code 75 ("Prior Authorization Required"), I'm not copying a spec. I'm recalling the dozens of times I debugged that exact scenario in production claims. When I build fixtures for coordination of benefits, I'm encoding the edge cases I discovered running thousands of claim adjudications through a raw claim generator.
This framework is proof that domain expertise and automation aren't competing skills. They're complementary. The best automated tests come from people who understand the system deeply enough to know where it will fail.