docs/current_docs/partials/cookbook/services/_create-service-for-test.mdx
The following Dagger Function creates a service and binds it to an application container for unit testing. In this example, the application being tested is Drupal. Drupal includes a large number of unit tests, including tests which depend on an active database service. This database service is created on-the-fly by the Dagger Function.
<Tabs groupId="language" queryString="sdk"> <TabItem value="go" label="Go">Run Drupal's unit tests, instantiating a database service during the process:
<Tabs groupId="shell"> <TabItem value="System shell"> ```shell dagger -c test ``` </TabItem> <TabItem value="Dagger Shell"> ```shell title="First type 'dagger' for interactive mode." test ``` </TabItem> <TabItem value="Dagger CLI"> ```shell dagger call test ``` </TabItem> </Tabs>