Testing
Template testing allows you to validate your templates with real documents. For premium users, testing is quota-free, while free users can test by consuming their monthly quota. This feature is essential for ensuring your templates work correctly before deploying them in production.
Overview
The template testing feature provides:
- Premium users: Quota-free testing without consuming API quota
- Free users: Testing available by consuming monthly quota (50 pages)
- Real-time validation: See exactly how your template performs on actual documents
- Available for all users: Both free and premium subscribers
- Instant feedback: Get immediate results with extracted data preview
Prerequisites
Subscription Requirements
Template testing is available for all users with different quota usage:
- ✅ Free Plan: Testing consumes monthly quota (50 pages)
- ✅ Starter Plan: Quota-free testing (unlimited)
- ✅ Pro Plan: Quota-free testing (unlimited)
Supported File Formats
The testing feature supports the same file formats as the main API:
- PDF documents (
.pdf
) - Image files: JPG, PNG, TIFF, WebP, and other common formats
How to Test Templates
Access Template Testing
-
Navigate to Template Editor
- Go to your Templates list
- Click "Edit" on the template you want to test
- Or create a new template
-
Locate the Testing Section
- In the template editor, find the "Live Testing" tab or section
- This is typically located alongside other template configuration options
Testing Process
Step 1: Upload Document
- Click the file upload area or "Click to browse" button
- Select a document from your computer
- Supported formats: PDF and image files
Step 2: Run Test
- Click the "Test template" button
- For Free users: This will consume pages from your monthly quota
- For Premium users: Testing is quota-free
- The system will process your document using the current template configuration
Step 3: Review Results
The test results include:
- Extracted data: JSON-formatted results showing all extracted fields
- Processing status: Shows quota consumption for free users, or quota-free for premium
- Copy functionality: Easy copying of results for integration testing
Results
When testing succeeds, you'll see:
{
"invoice_number": "INV-2024-001",
"total_amount": 1250.00,
"date": "2024-05-31",
"customer": {
"name": "Acme Corporation",
"email": "billing@acme.com"
}
}
Best Practices
Template Development Workflow
- Create template structure with fields and validation rules
- Test with sample documents to verify extraction accuracy
- Iterate and refine based on test results
- Save final template once testing confirms accuracy
- Deploy in production with confidence
Testing Strategy
- Use representative documents: Test with documents similar to production use
- Test edge cases: Try documents with varying layouts or quality
- Verify all fields: Ensure every template field extracts correctly
- Check data types: Confirm numbers, dates, and booleans parse correctly
Troubleshooting
If testing fails:
- Check file format: Ensure document is in supported format
- Verify template structure: Confirm all required fields are configured
- Review document quality: Poor quality scans may affect extraction
- Check quota availability: Free users need sufficient quota for testing
- Check subscription status: Ensure account access is active
Integration After Testing
Once your template testing is successful:
- Save the template using the "Create" or "Update" button
- Copy the Template ID for API integration
- Use the production endpoint
/documents/parse
for actual processing - Monitor quota usage as production calls will consume quota
Related Documentation
- Template Tutorial: Learn how to create and configure templates
- Template Overview: Understanding template structure and capabilities
- Document Processing API: Production API documentation
Template testing is now available for all users! Free users can test templates by consuming their monthly quota, while premium users enjoy unlimited quota-free testing. Consider upgrading to a premium plan for unlimited testing without quota consumption.