https://github.com/swisslife-oss/squadron
A testing framework for containerized and cloud services
https://github.com/swisslife-oss/squadron
cloud containers database-testing integration-testing messaging-testing net squadron system-testing testing
Last synced: 18 days ago
JSON representation
A testing framework for containerized and cloud services
- Host: GitHub
- URL: https://github.com/swisslife-oss/squadron
- Owner: SwissLife-OSS
- License: mit
- Created: 2019-08-05T21:08:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-22T16:16:29.000Z (about 1 year ago)
- Last Synced: 2024-05-16T08:44:43.980Z (11 months ago)
- Topics: cloud, containers, database-testing, integration-testing, messaging-testing, net, squadron, system-testing, testing
- Language: C#
- Homepage: https://swisslife-oss.github.io/squadron/
- Size: 1.61 MB
- Stars: 99
- Watchers: 7
- Forks: 16
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

## [](https://www.nuget.org/packages/Squadron.Core) [](https://github.com/SwissLife-OSS/Squadron/releases/latest) [](https://dev.azure.com/swisslife-oss/swisslife-oss/_build/latest?definitionId=31) [](https://sonarcloud.io/dashboard?id=SwissLife-OSS_Squadron) [](https://sonarcloud.io/dashboard?id=SwissLife-OSS_Squadron)
**Squadron is a testing framework for containerized and cloud services.**
Squadron is a helpful framework which enables you to write tests against dependent services without any overhead. Squadron can provide you isolation in tests through Container Providers or support for all other services through Cloud Providers.
To get more detailed information about Squadron, go to the [Squadron Docs](https://swisslife-oss.github.io/squadron/)
## Features
### Container Providers
- [x] [MongoDB](https://swisslife-oss.github.io/squadron/docs/mongodb)
- [x] [MongoDB ReplicaSet](https://swisslife-oss.github.io/squadron/docs/mongodb-rs)
- [x] [SQL Server](https://swisslife-oss.github.io/squadron/docs/sqlserver)
- [x] [Elasticsearch](https://swisslife-oss.github.io/squadron/docs/elasticsearch)
- [x] [Azure Blob and Queues](https://swisslife-oss.github.io/squadron/docs/azure-storage)
- [x] [RabittMQ](https://swisslife-oss.github.io/squadron/docs/rabbitmq)
- [x] [Redis](https://swisslife-oss.github.io/squadron/docs/redis)
- [x] [PostgresSQL](https://swisslife-oss.github.io/squadron/docs/postgresql)
- [ ] Kafka
- [x] RavenDB
- [x] MySQL
- [x] MariaDB
- [x] Neo4j
- [x] S3 with [Minio](https://github.com/minio/minio)
- [x] FtpServer with [fauria/vsftpd](https://github.com/fauria/docker-vsftpd)### Cloud Providers
- [x] [Azure Service Bus](https://swisslife-oss.github.io/squadron/docs/azure-cloud-servicebus)
- [x] Azure Event Hub
- [x] Azure Storage## Getting Started
As getting started we've prepared a simple example how to use Squadron with _MongoDB_.
You can find samples with quick starts [here](https://github.com/SwissLife-OSS/squadron/tree/master/samples).
### Install
Install the Squadron nuget package for MongoDB within your test project:
```bash
dotnet add package Squadron.Mongo
```### Access
Inject the MongoResource into your test class constructor:
```csharp
public class AccountRepositoryTests
: IClassFixture
{
private readonly MongoResource _mongoResource;public AccountRepositoryTests(
MongoResource mongoResource)
{
_mongoResource = mongoResource;
}
}
```### Use
Use MongoResources to create a database and initialize your repository:
```csharp
[Fact]
public void CreateAccount_AccountExists()
{
// arrange
var database = _mongoResource.CreateDatabase();
var accountRepository = new AccountRepository(database);
var account = new Account();// act
var addedAccount = accountRepository.Add(account);// assert
Snapshot.Match(addedAccount);
}
```## Community
This project has adopted the code of conduct defined by the [Contributor Covenant](https://contributor-covenant.org/)
to clarify expected behavior in our community. For more information, see the [Swiss Life OSS Code of Conduct](https://swisslife-oss.github.io/coc).