Squadron

Squadron

  • Docs
  • Blog
  • GitHub

›Introduction

Introduction

  • Introduction
  • Quickstart
  • Basic Concept
  • Container Options
  • Configuration
  • Multiple resources

Container Providers

  • MongoDB
  • MongoDB Replica Set
  • SQL Server
  • Elasticsearch
  • PostgreSQL
  • Redis
  • RabbitMQ
  • Azure Storage
  • Generic
  • Compose

Azure Cloud Providers

  • Setup
  • ServiceBus
Edit

Basic Concept

Each service provides a Resource class which can be use to interact with it. Using xUnit you can access the Resource by implementing IClassFixture<> or ICollectionFixture<> and inject in into test class constructor.

public class AccountRepositoryTests
    : IClassFixture<MongoResource>
{
    private readonly MongoResource _mongoResource;

    public AccountRepositoryTests(
        MongoResource mongoResource)
    {
        _mongoResource = mongoResource;
    }
}

Behind a Resource can be a container or a cloud service. Those are the two concept on which Squadron is based:

1. Container Providers

For a single Resource it will be created only one container per test Fixture.

On the first test run the corresponding container image will be downloaded. Squadron is fully managing the life cycle of the container by creating and removing it.

A liveness probe is also implemented to be sure that the service started correctly.

2. Cloud Providers

A Resource can also manage a cloud service if there is no container possibility.

Always use dedicated test resource.

Last updated on 9/17/2021 by Tim Holzherr
← QuickstartContainer Options →
  • 1. Container Providers
  • 2. Cloud Providers

Community

Contributor License AgreementsCode of Conduct
Swiss Life OSSSwiss Life | OSS
Copyright © 2021 Swiss Life Developers