Overview
Shipstar’s content generation runs asynchronously — you trigger a request, and the content is generated in the background. This guide covers strategies for testing your integration during development without waiting for real AI generation.Development Workflow
Understanding the Content Lifecycle
Every piece of content follows this lifecycle:content_id and status: "pending". You then poll for the result.
Testing Content Generation
Trigger Generation
Call any content generation endpoint. The request body is optional — defaults work for testing:Response:
Testing Strategies
Use a Custom Date Range
Test with a specific date range that you know has commits:Test All Content Types
Run through each content type to verify your integration handles all formats:| Content Type | Endpoint | Response Format |
|---|---|---|
| Product Update | POST /sources/github/product-update | Markdown text |
| Feature Blog | POST /sources/github/feature-blog | Markdown text |
| Blog Post | POST /sources/github/blog-post | Markdown text |
| LinkedIn Post | POST /sources/github/linkedin-post | Plain text |
| Twitter Thread | POST /sources/github/twitter-thread | Plain text |
| Feature Page | POST /sources/github/feature-page | JSON |
| KB Articles | POST /sources/github/kb-articles | JSON |
| Changelog | POST /sources/github/changelog | JSON |
| Release Notes Email | POST /sources/github/release-notes-email | JSON |
Test Publishing
After content is generated, test the publish flow:Test Error Scenarios
Verify your application handles these cases:No tracked repositories
No tracked repositories
If no GitHub repos are connected, generation will fail. Test that your app handles the error gracefully.
No commits in date range
No commits in date range
Use a date range with no activity to test how your app handles empty content.
Content generation failure
Content generation failure
Check for
status: "failed" responses with an error_message field. Your polling logic should handle this state.Expired or invalid API key
Expired or invalid API key
Test with a bad key to ensure your app handles 401 responses properly.
Polling Implementation
Since content generation is asynchronous, you’ll need to poll for results. Here’s a robust implementation:CI/CD Integration
Automated Testing with GitHub Actions
Integration Test Example
Best Practices
Use a dedicated test project
Use a dedicated test project
Create a separate Shipstar project for testing with its own tracked repositories. This keeps test-generated content separate from production.
Clean up after testing
Clean up after testing
Unpublish and delete test content to avoid cluttering your project:
Handle all status transitions
Handle all status transitions
Your polling logic should handle all possible statuses:
pending, processing, completed, and failed. Don’t assume content will always succeed.Test with realistic date ranges
Test with realistic date ranges
Use date ranges that include actual commits in your tracked repos. Empty date ranges will produce less useful test results.