This guide provides comprehensive testing instructions for SprintIQ's integration system, covering GitHub, Slack, and Linear integrations.
# Start the development server
npm run dev
# Verify both servers are running:
# - Frontend: http://localhost:3000
# - Backend: http://localhost:4000- Go to GitHub → Settings → Developer Settings → Personal Access Tokens → Fine-grained tokens
- Create token with these scopes:
repo(Repository access)read:user(Read user profile)user:email(Access user email)
- Copy token (format:
ghp_xxxxxxxxxxxxxxxxxxxx)
- Create Slack App at https://api.slack.com/apps
- Go to OAuth & Permissions
- Add Bot Token Scopes:
channels:readchat:writeusers:readteam:read
- Install app to workspace
- Copy Bot User OAuth Token (format:
xoxb-xxxxxxxxxxxxx)
- Go to Linear → Settings → API → Personal API Keys
- Create new API key with read/write permissions
- Copy API key (format:
lin_api_xxxxxxxxxxxxx)
- Integration page loads without errors
- Only GitHub, Slack, and Linear integrations are displayed
- Each integration shows proper status (Available/Installed)
- Search and filtering work correctly
- Navigate to
/integrations - Verify page loads within 2-3 seconds
- Check only 3 integrations are shown (not all 7)
- Verify integration cards show:
- Name and description
- Install/Configure button
- Status indicator
- ✅ Page loads quickly
- ✅ Only GitHub, Slack, Linear shown
- ✅ No console errors
- ✅ UI is responsive
- Click "Configure" on GitHub integration
- Configuration modal opens
- Enter GitHub Personal Access Token
- Click "Test Connection"
- Verify connection result
- Click "Save & Connect" if test successful
// Configuration save
POST /api/integrations/github/configure
{
"apiKeys": {
"token": "ghp_your_token_here"
},
"testConnection": false
}
// Connection test
POST /api/integrations/github/test
// Status update
GET /api/integrations/status- ✅ Modal opens correctly
- ✅ Form validation works
- ✅ Test connection validates token
- ✅ Success message appears
- ✅ Status updates to "Connected"
- Click "Configure" on Slack integration
- Enter Slack Bot Token
- Test connection
- Save configuration
- Bot User OAuth Token (required)
- ✅ Token validation works
- ✅ Connection test succeeds
- ✅ Integration status updates
- Click "Configure" on Linear integration
- Enter Linear API Key
- Test connection
- Save configuration
- API Key (required)
- ✅ API key validation works
- ✅ Connection test succeeds
- ✅ Integration status updates
- Enter invalid GitHub token (e.g., "invalid_token")
- Click "Test Connection"
- Verify error message shows
- Ensure token is not saved
- Leave API key field empty
- Click "Save & Connect"
- Verify validation error appears
- Stop development server
- Try to configure integration
- Verify appropriate error message
- Configure all three integrations
- Refresh page
- Verify statuses persist
- Check database records
-- Check saved integrations
SELECT provider, testStatus, isActive, createdAt
FROM integration_api_keys
WHERE userId = 'your-user-id';- Configure an integration
- Click "Disconnect" or similar action
- Verify integration status resets
- Confirm API keys are removed from database
curl -X GET http://localhost:3000/api/integrations/status \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_SESSION_TOKEN"curl -X POST http://localhost:3000/api/integrations/github/configure \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_SESSION_TOKEN" \
-d '{
"apiKeys": {
"token": "ghp_your_github_token"
},
"testConnection": true
}'curl -X POST http://localhost:3000/api/integrations/github/test \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_SESSION_TOKEN"- Development server running
- Database migrations applied
- Test API keys ready
- Browser dev tools open
- Configuration modal opens
- Field validation works
- Invalid token shows error
- Valid token shows success
- Status updates correctly
- Database record created
- Configuration modal opens
- Bot token field validates
- Connection test works
- Status updates correctly
- Database record created
- Configuration modal opens
- API key field validates
- Connection test works
- Status updates correctly
- Database record created
- Network errors handled gracefully
- Invalid credentials rejected
- Missing fields validated
- User feedback clear and helpful
- Page loads under 3 seconds
- API calls complete quickly
- No memory leaks in browser
- Responsive on mobile devices
- Issue: "Authentication failed" on API calls
- Solution: Ensure user is logged in with Supabase
- Debug: Check browser dev tools for session token
- Issue: "Database connection failed"
- Solution: Verify DATABASE_URL in .env
- Debug: Check server logs for Prisma errors
- Issue: Valid API keys fail connection test
- Solution: Check environment variables and API key scopes
- Debug: Review integration service logs
- Issue: Integration shows as disconnected after setup
- Solution: Check testStatus in database
- Debug: Verify status endpoint returns correct data
# Run with test tokens
node qa-integration-test.js
# Run with production tokens (set environment variables first)
GITHUB_TEST_TOKEN=ghp_xxx SLACK_TEST_TOKEN=xoxb_xxx LINEAR_TEST_TOKEN=lin_xxx \
node qa-integration-test.js --production- Status endpoint accessible
- Configuration endpoints working
- Validation properly rejecting invalid input
- Test connections working with valid tokens
When reporting integration issues, include:
- Step-by-step reproduction instructions
- Browser console errors
- Network tab showing API calls
- Server logs (if accessible)
- Database state (integration_api_keys table)
- Environment information (OS, browser, Node version)
Before deploying to production:
- All manual tests pass
- Automated tests pass
- Error handling comprehensive
- Security review completed
- Performance acceptable
- Mobile responsiveness verified
- Documentation updated