Rendered Project Smoke Tests
Rendered App smoke tests validate that GoForj templates and generators produce a working App.
This is primarily a framework maintainer workflow. Application teams usually start with go test ./... in their App.
Maintainer Command
From the goforj repository, render a temporary App, build it, and run its tests.
go run ./cmd/forj test:render -sTo run the framework integration suite, use go run ./cmd/forj test:integration. You can also test one target, such as the rendered SQLite App.
go run ./cmd/forj test:integration rendered --target database --variant sqliteSome integration targets require Docker or an external backend. See Integration Tests for environment setup.
What It Catches
Rendered smoke tests catch:
- broken templates
- missing imports
- invalid generated accessors
- Wire generation failures
- rendered output compile failures
- generated test failures
- dependency replacement issues
- multi-app wiring or binary-entrypoint regressions when the smoke target includes additional apps
- per-app API artifact isolation
- stale API artifact cleanup for CLI-only Apps
If package-level tests pass but rendered smoke fails, inspect the rendered output.
Source of Truth
The rendered App is not the source of truth.
If a fix should survive rerender, change:
templates/...- generator code
- framework runtime code
- sibling library code
Direct rendered App edits are useful for quick hypothesis checks, but they are not the durable fix.
Local Replaces
Use render.module_replaces when smoke testing against local sibling repositories.
Use paths that are stable from the generated project root. For local sibling repositories, prefer a relative path and avoid container-specific absolute paths.
render:
module_replaces:
github.com/goforj/web: ../webNext Steps
- Integration Tests covers backend and rendered integration.
- Build the App explains generated file ownership.
- Practical maintainer workflows are tracked internally in GoForj context files.