Siemens.AspNet.MsTest.Sdk 0.1.0-alpha.309

Prefix Reserved
This is a prerelease version of Siemens.AspNet.MsTest.Sdk.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Siemens.AspNet.MsTest.Sdk --version 0.1.0-alpha.309
                    
NuGet\Install-Package Siemens.AspNet.MsTest.Sdk -Version 0.1.0-alpha.309
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Siemens.AspNet.MsTest.Sdk" Version="0.1.0-alpha.309" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Siemens.AspNet.MsTest.Sdk" Version="0.1.0-alpha.309" />
                    
Directory.Packages.props
<PackageReference Include="Siemens.AspNet.MsTest.Sdk" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Siemens.AspNet.MsTest.Sdk --version 0.1.0-alpha.309
                    
#r "nuget: Siemens.AspNet.MsTest.Sdk, 0.1.0-alpha.309"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Siemens.AspNet.MsTest.Sdk@0.1.0-alpha.309
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Siemens.AspNet.MsTest.Sdk&version=0.1.0-alpha.309&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Siemens.AspNet.MsTest.Sdk&version=0.1.0-alpha.309&prerelease
                    
Install as a Cake Tool

Siemens.AspNet.MsTest.Sdk

This NuGet package provides utilities for API testing with a focus on AWS DynamoDB and Docker. It helps set up DynamoDB services within a Docker container for testing purposes and includes additional features to manage environment variables and API interactions.

Features

  • DynamoDB Helper: Set up and interact with AWS DynamoDB in a Docker container.
  • Docker Helper: Spin up Docker containers for AWS DynamoDB.
  • API Test Utilities: Provides utilities for setting up API testing environments, including the configuration of environment variables.
  • Support for Multiple Environments: Easily configure testing environments, such as Development, Staging, or Production, with environment variables.

Installation

You can install this package using the following NuGet command:

dotnet add package Siemens.AspNet.MsTest.Sdk

Setup Example

API Test Base Setup

The following example demonstrates how to initialize the testing environment, configure DynamoDB, and set up environment variables.

/// <summary>
///     The base class for API testing, providing utilities for setting up and interacting with the API.
/// </summary>
private static ApiTestBase<Program> _apiTestBase = null!;

protected static HttpClient Client { get; private set; } = null!;

private static readonly IDynamoDbService DynamoDbService = DynamoDbServiceFactory.Create();

[AssemblyInitialize]
public static async Task AssemblyInitializeAsync(TestContext _)
{
    // 0. Ensure that previous tests were not interrupted
    await AssemblyCleanupAsync().ConfigureAwait(false);

    // 1. Setup DynamoDB service
    await DynamoDbService.SetupAsync<Program>().ConfigureAwait(false);

    // 2. Load environment variables
    var environmentVariables = EmbeddedFile.GetFileContentFrom("Properties.EnvironmentVariables.json")
                                           .FromJsonStringAs<Dictionary<string, string>>()
                                           .Select(keyValue => (keyValue.Key, keyValue.Value)).ToArray();

    // 3. Setup API test base environment
    _apiTestBase = new ApiTestBase<Program>("Development", // The environment name
                                            (_, _) =>
                                            {
                                            }, // Register services action
                                            environmentVariables); // Configure environment variables  

    // Additional setup logic can be added here
}

DynamoDB Docker Setup

The package includes utilities to set up a Docker container with AWS DynamoDB to simulate a real database environment for testing.

// Factory creation
// Sample code for running DynamoDB in a Docker container
var DynamoDbService = DynamoDbServiceFactory.Create();
// Via service collection
serviceCollection.AddDynamoDbService();

Contributing

Feel free to open issues or submit pull requests. If you are interested in contributing, please ensure to follow the coding standards and best practices used in this repository.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-alpha.354 8 12/8/2025
0.1.0-alpha.353 613 12/2/2025
0.1.0-alpha.349 508 11/28/2025
0.1.0-alpha.337 123 11/27/2025
0.1.0-alpha.336 679 11/24/2025
0.1.0-alpha.335 103 11/23/2025
0.1.0-alpha.334 307 11/23/2025
0.1.0-alpha.333 113 11/23/2025
0.1.0-alpha.332 1,654 11/11/2025
0.1.0-alpha.331 200 11/10/2025
0.1.0-alpha.330 336 11/7/2025
0.1.0-alpha.329 129 11/7/2025
0.1.0-alpha.328 108 11/7/2025
0.1.0-alpha.327 155 11/6/2025
0.1.0-alpha.326 145 11/6/2025
0.1.0-alpha.314 138 11/4/2025
0.1.0-alpha.313 140 11/4/2025
0.1.0-alpha.311 145 11/3/2025
0.1.0-alpha.309 757 10/31/2025
0.1.0-alpha.307 171 10/31/2025
0.1.0-alpha.306 125 10/31/2025
0.1.0-alpha.305 154 10/27/2025
0.1.0-alpha.303 497 10/22/2025
0.1.0-alpha.302 131 10/21/2025
0.1.0-alpha.301 123 10/21/2025
0.1.0-alpha.300 190 10/20/2025
0.1.0-alpha.299 93 10/18/2025
0.1.0-alpha.298 77 10/18/2025
0.1.0-alpha.297 71 10/18/2025
0.1.0-alpha.296 77 10/18/2025
0.1.0-alpha.294 98 10/17/2025
0.1.0-alpha.293 221 10/8/2025
0.1.0-alpha.292 129 10/8/2025
0.1.0-alpha.290 145 10/8/2025
0.1.0-alpha.289 134 10/7/2025
0.1.0-alpha.284 139 10/7/2025
0.1.0-alpha.283 271 9/19/2025
0.1.0-alpha.282 622 9/19/2025
0.1.0-alpha.281 312 9/16/2025
0.1.0-alpha.280 266 9/16/2025
0.1.0-alpha.279 264 9/16/2025
0.1.0-alpha.278 265 9/16/2025
0.1.0-alpha.275 55,094 9/3/2025
0.1.0-alpha.274 349 9/2/2025
0.1.0-alpha.273 364 9/1/2025
0.1.0-alpha.272 126 9/1/2025
0.1.0-alpha.271 186 8/29/2025
0.1.0-alpha.270 166 8/29/2025
0.1.0-alpha.269 163 8/29/2025
0.1.0-alpha.268 174 8/29/2025
0.1.0-alpha.267 176 8/27/2025
0.1.0-alpha.266 191 8/27/2025
0.1.0-alpha.264 261 8/22/2025
0.1.0-alpha.263 86 8/22/2025
0.1.0-alpha.262 91 8/22/2025
0.1.0-alpha.261 105 8/22/2025
0.1.0-alpha.260 114 8/22/2025
0.1.0-alpha.259 106 8/22/2025
0.1.0-alpha.258 203 8/19/2025
0.1.0-alpha.257 201 8/18/2025
0.1.0-alpha.246 163 8/14/2025
0.1.0-alpha.245 135 8/14/2025
0.1.0-alpha.244 168 8/14/2025
0.1.0-alpha.243 134 8/14/2025
0.1.0-alpha.238 132 8/12/2025
0.1.0-alpha.237 453 8/6/2025
0.1.0-alpha.236 242 8/5/2025
0.1.0-alpha.235 211 8/5/2025
0.1.0-alpha.234 211 8/5/2025
0.1.0-alpha.233 175 8/4/2025
0.1.0-alpha.232 189 8/4/2025
0.1.0-alpha.231 84 8/1/2025
0.1.0-alpha.230 83 8/1/2025
0.1.0-alpha.229 104 7/31/2025
0.1.0-alpha.228 104 7/31/2025
0.1.0-alpha.227 109 7/31/2025
0.1.0-alpha.225 102 7/31/2025
0.1.0-alpha.224 108 7/30/2025
0.1.0-alpha.222 299 7/16/2025
0.1.0-alpha.219 171 7/14/2025
0.1.0-alpha.217 103 7/11/2025
0.1.0-alpha.212 168 7/8/2025
0.1.0-alpha.211 181 7/3/2025
0.1.0-alpha.207 132 7/3/2025
0.1.0-alpha.206 292 6/30/2025
0.1.0-alpha.205 116 6/27/2025
0.1.0-alpha.202 109 6/27/2025
0.1.0-alpha.200 114 6/27/2025
0.1.0-alpha.198 113 6/27/2025
0.1.0-alpha.196 119 6/27/2025
0.1.0-alpha.195 117 6/27/2025
0.1.0-alpha.194 114 6/27/2025
0.1.0-alpha.193 108 6/27/2025
0.1.0-alpha.192 119 6/27/2025
0.1.0-alpha.191 109 6/27/2025
0.1.0-alpha.189 128 6/26/2025
0.1.0-alpha.188 214 6/26/2025
0.1.0-alpha.187 131 6/26/2025
0.1.0-alpha.186 148 6/26/2025
0.1.0-alpha.185 131 6/26/2025
0.1.0-alpha.184 130 6/26/2025
0.1.0-alpha.183 132 6/26/2025
0.1.0-alpha.182 128 6/26/2025
0.1.0-alpha.181 143 6/25/2025
0.1.0-alpha.180 134 6/24/2025
0.1.0-alpha.179 135 6/23/2025
0.1.0-alpha.178 209 6/23/2025
0.1.0-alpha.176 136 6/23/2025
0.1.0-alpha.174 137 6/19/2025
0.1.0-alpha.173 169 6/19/2025
0.1.0-alpha.172 132 6/17/2025
0.1.0-alpha.171 210 6/16/2025
0.1.0-alpha.169 136 6/16/2025
0.1.0-alpha.165 424 6/13/2025
0.1.0-alpha.164 243 6/13/2025
0.1.0-alpha.163 245 6/13/2025
0.1.0-alpha.160 282 6/12/2025
0.1.0-alpha.159 374 6/11/2025
0.1.0-alpha.158 276 6/11/2025
0.1.0-alpha.143 271 6/11/2025
0.1.0-alpha.142 276 6/11/2025
0.1.0-alpha.140 280 6/11/2025
0.1.0-alpha.139 333 6/10/2025
0.1.0-alpha.138 275 6/9/2025
0.1.0-alpha.137 70 6/7/2025
0.1.0-alpha.136 62 6/7/2025
0.1.0-alpha.135 93 6/6/2025
0.1.0-alpha.134 92 6/6/2025
0.1.0-alpha.130 130 6/5/2025
0.1.0-alpha.129 138 6/4/2025
0.1.0-alpha.128 121 6/4/2025
0.1.0-alpha.122 198 6/3/2025
0.1.0-alpha.121 137 6/1/2025
0.1.0-alpha.120 100 6/1/2025
0.1.0-alpha.118 138 5/28/2025
0.1.0-alpha.117 133 5/28/2025
0.1.0-alpha.116 135 5/28/2025
0.1.0-alpha.115 142 5/26/2025
0.1.0-alpha.114 170 5/22/2025
0.1.0-alpha.112 140 5/21/2025
0.1.0-alpha.111 138 5/20/2025
0.1.0-alpha.108 196 5/19/2025
0.1.0-alpha.104 204 5/18/2025
0.1.0-alpha.102 300 5/14/2025
0.1.0-alpha.101 216 5/14/2025
0.1.0-alpha.100 222 5/12/2025
0.1.0-alpha.99 253 5/12/2025
0.1.0-alpha.98 61 5/10/2025
0.1.0-alpha.97 68 5/10/2025
0.1.0-alpha.86 151 5/8/2025
0.1.0-alpha.85 142 5/8/2025
0.1.0-alpha.84 131 5/8/2025
0.1.0-alpha.82 146 5/7/2025
0.1.0-alpha.81 141 5/6/2025
0.1.0-alpha.76 71 5/3/2025
0.1.0-alpha.75 100 5/2/2025
0.1.0-alpha.74 93 5/2/2025
0.1.0-alpha.56 145 4/28/2025
0.1.0-alpha.55 150 4/28/2025
0.1.0-alpha.54 218 4/14/2025
0.1.0-alpha.53 198 4/14/2025
0.1.0-alpha.48 232 4/14/2025
0.1.0-alpha.47 181 4/9/2025
0.1.0-alpha.46 149 4/9/2025
0.1.0-alpha.44 162 4/7/2025
0.1.0-alpha.41 152 4/7/2025
0.1.0-alpha.40 152 4/7/2025
0.1.0-alpha.39 94 4/4/2025
0.1.0-alpha.38 109 4/4/2025
0.1.0-alpha.37 151 4/4/2025