Skip to content
master
Switch branches/tags
Code

Latest commit

feat: add ci to push to nuget
fix: test that fails on windows if you dont have git bash installed
fix: upgrade test proj to .NET 5
93709a2

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Docker Compose Fixture

A XUnit fixture that allows you to spin up docker compose files and then run tests against them.

Example Integration Test

public class IntegrationTests : IClassFixture<DockerFixture>
{
    public IntegrationTests(DockerFixture dockerFixture)
    {
        dockerFixture.InitOnce(() => new DockerFixtureOptions
        {
            DockerComposeFiles = new[] { "docker-compose.yml" },
            CustomUpTest = output => output.Any(l => l.Contains("App is ready"))
        });
    }

    // Tests go here
}

Logging

To enable XUnit logging you will have to add a xunit.runner.json file to your test project. The file should be copied to the output directory and should look like this:

{ "diagnosticMessages":  true }

About

A XUnit fixture that allows you to spin up docker compose files and then run tests against them.

Resources

License

Packages

No packages published

Languages