Skip to main content

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:
When you call a generation endpoint, you get back a content_id and status: "pending". You then poll for the result.

Testing Content Generation

1

Trigger Generation

Call any content generation endpoint. The request body is optional — defaults work for testing:
Response:
2

Poll for Status

Check the content status until it’s completed or failed:
3

Inspect the Result

Once completed, the response includes the full generated content:

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:

Test Publishing

After content is generated, test the publish flow:

Test Error Scenarios

Verify your application handles these cases:
If no GitHub repos are connected, generation will fail. Test that your app handles the error gracefully.
Use a date range with no activity to test how your app handles empty content.
Check for status: "failed" responses with an error_message field. Your polling logic should handle this state.
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

Create a separate Shipstar project for testing with its own tracked repositories. This keeps test-generated content separate from production.
Unpublish and delete test content to avoid cluttering your project:
Your polling logic should handle all possible statuses: pending, processing, completed, and failed. Don’t assume content will always succeed.
Use date ranges that include actual commits in your tracked repos. Empty date ranges will produce less useful test results.