Generated testing
RAIQL 0.11 turns GENERATE TESTS from delivery intent into executable verification for generated applications.
Declare tests
GENERATE TESTS;This emits a Vitest suite alongside the generated application. Tests are derived from the compiled IR and generated runtime.
Run from RAIQL
raiql testThe CLI regenerates the application, prepares the environment and runs the generated suite. PostgreSQL projects receive Docker preflight, database startup and schema synchronization first.
Contract tests
The suite verifies language version, application identity, generated entities and test-generation intent captured in raiql.ir.json.
Security tests
JWT projects receive generated policy-matrix tests for declared roles, CRUD actions and ANY/OWN scope. Email/password projects also verify scrypt hashing and password validation.
Database tests
PostgreSQL targets receive integration checks for database connectivity and generated application tables.
Direct Vitest workflow
npm test
npm run test:contracts
npm run test:security
npm run test:db
npm run test:watchRAIQL 0.11 generates Vitest 5 suites.