[[how-to-generate-stubs-at-runtime]]
= How Can I Generate Stubs at Runtime


include::partial$_attributes.adoc[]

If you want to generate stubs at runtime for contracts, switch the `generateStubs` property in the `@AutoConfigureStubRunner` annotation, or call the `withGenerateStubs(true)` method on the JUnit Rule or Extension. You can read more about this in xref:../project-features-stubrunner/stub-runner-generate-stubs-at-runtime.adoc[this section] of the documentation.

