🔭 New: Modules Continuous Integration Testing

We're excited to announce our Beta release of continuous integration testing for modules. Built using OpenTofu testing feature, you will now be able to set up testing and integrate it seamlessly into your private module registry. /

Streamline your module CI with OpenTofu tests

Start by creating your tftest files and storing them within your module directory. You'll be able to run common tests on a real infrastructure that is created, tested and destroyed in a single flow.

run "test" {
  assert {
    condition     = file(local_file.test.filename) == "Hello world!"
    error_message = "Incorrect content in ${local_file.test.filename}."

You can write multiple runs in each file, and create multiple test files. env0 will execute all of the tests in all of the files.

Trigger and manage module tests in your module registry

With your test files in place, enable Testing in your module settings and env0 will trigger test runs on every merge to your default branch (and optionally on every PR targeting the main branch). env0 will then present the test results and a full history of all test runs.

Status checks will be presented in your VCS to give you all the information directly in your flow.

Learn more about module testing in our docs, and read more about OpenTofu GA on our blog.