# Post Deployment Tests

SVRUnit can also be used to **test** different files and requirements on your server **after a deployment**.

Just imagine that you need to test that your .env file exists, or that your cache folder has the correct permission.

There's plenty of things you can do here.

Because SVRUnit allows you to install it with Composer, it is recommended to install it directly as dependency. You can of course also use the PHAR file for this.

```bash
composer require svrunit/svrunit
```

Now create a **XML configuration** file that specifies a single YML test file (or more...)

```xml
<svrunit>  
  <testsuites>   
      
      <testsuite name="Post Deployment Tests">         
         <file>./post_deployment_tests.yml</file>      
      </testsuite>   
        
  </testsuites>
</svrunit>
```

Last but not least, we need the specification of our tests in the YAML file.

```yaml
file_exists:

  - name: ".env file is deployed"
    file: "/var/www/html/.env"
    expected: true
        
  ....
  ....
```

That's it!

You can now **manually** run your tests, or even use your **CI/CD pipeline** for this.

<pre class="language-bash"><code class="lang-bash"><strong>php vendor/bin/svrunit --configuration=deployment_tests.xml  
</strong></code></pre>

&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.svrunit.com/use-cases/post-deployment-tests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
