Testing Guide
Testing your Scully site before deployment ensures everything works correctly. This guide covers local testing, debugging, and common workflows.Local Development Workflow
Basic Testing Workflow
Build Angular Application
First, build your Angular app:This compiles your Angular application into the
dist folder.You only need to rebuild Angular when you change Angular code, components, or services. Changes to markdown files, Scully config, or plugins don’t require rebuilding Angular.
Run Scully
Generate static pages:Scully will:
- Discover routes from Angular router
- Process configured routes
- Render pages using Puppeteer
- Generate static HTML files in
dist/static
Serve Static Site
Test the generated static site:This starts two servers:
- Angular dev build:
http://localhost:1864/ - Scully static build:
http://localhost:1668/
Watch Mode
Enable Live Reload
Watch for changes and rebuild automatically:- Monitor markdown files for changes
- Monitor Angular build output
- Automatically re-run Scully when changes detected
- Live reload the static site
Complete Watch Setup
Run both Angular and Scully in watch mode:package.json
Understanding the Servers
Angular Dev Server (Port 1864)
The Angular application running with:- Full Angular runtime
- Client-side routing
- Development mode
- All JavaScript active
- Debug Angular components
- Test Angular functionality
- Develop new features
Scully Static Server (Port 1668)
The pre-rendered static HTML:- Pure HTML/CSS
- Minimal JavaScript
- Production-like behavior
- What users actually see after deployment
- Test static site generation
- Verify SEO metadata
- Check page load performance
- Test in production-like environment
Debugging Scully
Verbose Output
Enable detailed logging:--showBrowser: Opens Puppeteer browser (see what Scully sees)--scanRoutes: Force route discovery--logLevel: Set logging level (verbose,debug,normal,warning,error)
Scan Routes
Force complete route discovery:- Adding new routes to Angular router
- Route parameters change
- Routes not being generated
Show Browser
See what Puppeteer renders:- Debugging rendering issues
- Checking if page fully loads
- Finding JavaScript errors
- Verifying content appears
Common Testing Scenarios
Testing Blog Posts
Test Unpublished Preview
If Visit:
published: false, find the unpublished slug:http://localhost:1668/blog/___UNPUBLISHED___abc123xyzTesting Route Configuration
Test a new route configuration:scully.config.ts
Testing Plugins
Test a custom plugin:scully.config.ts
Testing Tips
When to Rebuild Angular
Runng build when you change:
- Angular components (
.ts,.html,.css) - Services or modules
- Routing configuration
- Angular assets
- Dependencies (
package.json)
- Markdown content changes
- Scully config changes
- Plugin modifications
- Frontmatter updates
When to Run Scully
Runnpx scully when you change:
- Markdown files
- Scully configuration
- Plugins
- Route configuration
- After rebuilding Angular
Static File Verification
Manually inspect generated files:Verify Content Rendering
-
Check Source Code:
- Right-click → View Page Source (not Inspect)
- Verify content is in HTML (not just rendered by JavaScript)
- Check meta tags for SEO
-
Disable JavaScript:
- Disable JavaScript in browser dev tools
- Refresh page
- Content should still be visible
-
Test Search Engine View:
- Use Google’s Mobile-Friendly Test
- Enter your local or deployed URL
- See how Google renders your page
Troubleshooting
Routes not generating
Routes not generating
Problem: Expected routes not in outputSolutions:Check config:Verify markdown files exist in
./blog/Page appears blank or incomplete
Page appears blank or incomplete
Problem: Generated page missing contentSolutions:
-
Test Angular app first (port 1864):
If broken here, fix Angular app first
-
Check if Angular is idle:
Watch for JavaScript errors or pending requests
-
Add manual idle detection:
- Check for async operations in component
Markdown not rendering
Markdown not rendering
Problem: Raw markdown visible instead of HTMLSolutions:
- Check
<scully-content></scully-content>in template - Import
ScullyLibModulein component module - Verify markdown files in configured folder
- Check frontmatter syntax (valid YAML)
- Rebuild:
npx scully
Scully build is slow
Scully build is slow
Problem: Scully takes too long to buildSolutions:Other tips:
- Use
--scanRoutesonly when routes change - Check for slow API calls in route config
- Profile with
--logLevel verbose
Port already in use
Port already in use
Problem: Scully serve fails with port errorSolutions:Or configure in Scully config:
Testing Checklist
Before deploying, verify:- All routes generate successfully
- Content renders correctly on static server (port 1668)
- Navigation works between pages
- Images and assets load
- No console errors in browser
- Meta tags present in page source
- Content visible with JavaScript disabled
- Mobile responsive (test different screen sizes)
- 404 page configured and working
- Blog posts display (published and unpublished)
- Custom routes generate correctly
- Plugins execute without errors
- Syntax highlighting works (if enabled)
- External links work
- Forms function (if any)
- Performance acceptable (check Lighthouse)
Performance Testing
Lighthouse
Test with Lighthouse:- Performance: 90+
- Accessibility: 90+
- Best Practices: 90+
- SEO: 90+
Bundle Analysis
Analyze Angular bundle size:Next Steps
Deployment
Deploy your tested site to production
Configuration
Optimize Scully configuration
Troubleshooting
Common issues and solutions
Plugins
Add functionality with plugins

