Testing
Test metadata validity, action results, process behavior, and the running application.
Build and validate
Run mvn clean verify for your application. For the framework itself, run the complete root reactor and the separate sample build described in the Quickstart. Integration tests may need Docker and disposable database fixtures. The 4.0 sample uses an explicit acceptance profile; follow the tagged README for its requirements.
Validate the complete QInstance with QInstanceValidator. Set up an application-owned instance and session, initialize QContext before actions, and clear it after each test so thread-local state does not leak.
import com.kingsrook.qqq.backend.core.context.QContext;
import com.kingsrook.qqq.backend.core.instances.QInstanceValidator;
new QInstanceValidator().validate(qInstance);
QContext.init(qInstance, session);
try
{
// Execute the action or process and assert its records and output values.
}
finally
{
QContext.clear();
}qInstance and session above are your configured fixtures. Framework TestUtils classes under src/test are examples, not a promised application dependency.
Useful checks
Keep mock or anonymous authentication confined to synthetic test data. Test the real authentication path before production deployment.