Agenix.Api 0.1.0-alpha0104

This is a prerelease version of Agenix.Api.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Agenix.Api --version 0.1.0-alpha0104
                    
NuGet\Install-Package Agenix.Api -Version 0.1.0-alpha0104
                    
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="Agenix.Api" Version="0.1.0-alpha0104" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Agenix.Api" Version="0.1.0-alpha0104" />
                    
Directory.Packages.props
<PackageReference Include="Agenix.Api" />
                    
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 Agenix.Api --version 0.1.0-alpha0104
                    
#r "nuget: Agenix.Api, 0.1.0-alpha0104"
                    
#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.
#addin nuget:?package=Agenix.Api&version=0.1.0-alpha0104&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Agenix.Api&version=0.1.0-alpha0104&prerelease
                    
Install as a Cake Tool

<div align="center">

<img src=".assets/logos/agenix-logo-social.png" alt="Agenix Framework Logo" width="1280"/>

<h1>🧪 Agenix Test Automation Framework</h1>

<p><strong>Test the Pieces.Verify the Whole.</strong></p> <p><em>Intelligent integration testing framework for modern applications</em></p>

<p> <a href="https://github.com/agenixframework/Agenix/actions"> <img src="https://github.com/agenixframework/Agenix/actions/workflows/dotnet-pr-check.yml/badge.svg" alt="CI Status"/> </a> <a href="https://www.nuget.org/packages/Agenix.Core/"> <img src="https://img.shields.io/nuget/v/Agenix.Core.svg" alt="NuGet Version"/> </a> <a href="https://github.com/agenixframework/agenix/blob/master/LICENSE"> <img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="License"/> </a> </p>

</div>

Agenix is a comprehensive test automation framework built with C# .NET 8.0 that enables the creation of fully automated end-to-end use case tests for enterprise SOA applications. Designed with modern testing patterns and practices, Agenix provides a robust foundation for testing complex distributed systems, APIs, databases, and user workflows.

Key Features

  • 🎭 Screenplay Pattern: Actor-based testing with fluent, readable test scenarios using Tasks, Questions, and Abilities
  • 🌐 Multi-Protocol Support: Built-in support for HTTP/REST APIs, SQL databases, and web services
  • 🔧 Framework Integration: Seamless integration with NUnit and Reqnroll (SpecFlow successor) for BDD testing
  • ✅ Rich Validation: Comprehensive validation capabilities for JSON, text, binary data, and custom formats
  • 🏗️ Modular Architecture: Clean separation of concerns with extensible, plugin-based design
  • 📊 Advanced Reporting: Detailed test execution reports with contextual information
  • 🔄 Enterprise Ready: Built for complex SOA environments with session management and context handling

What Makes Agenix Different

Unlike traditional testing frameworks, Agenix focuses on business-readable test automation that bridges the gap between technical implementation and business requirements. The framework's Screenplay pattern allows you to write tests that read like natural language while maintaining the full power of programmatic test automation.

️ Framework Origins

This framework is based on the Citrus Framework, originally developed for Java-based integration testing. Key portions of this .NET implementation were derived from and inspired by the Citrus Framework codebase.

  • Original Citrus Framework: Copyright (C) 2006-2024 the original author or authors
  • License: Both projects are licensed under Apache License 2.0
  • Agenix Implementation: Copyright (C) 2025 Agenix

We extend our gratitude to the Citrus Framework maintainers and contributors for their excellent work that served as the foundation for this .NET adaptation.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

This project includes software derived from the Citrus Framework - see the NOTICE file for additional attribution details.

Table of Contents

Overview

Agenix.ATF is a comprehensive test framework built on .NET 8.0, designed to provide robust testing capabilities with modern testing patterns and practices.

Technologies Used

  • .NET 8.0 - Target framework
  • C# 12.0 - Programming language
  • NUnit 3.x-4.x - Testing framework
  • NSubstitute - Mocking library

Prerequisites

Before you begin, ensure you have the following installed:

Getting Started

1. Clone the Repository

git clone <repository-url>
cd Agenix.ATF

Module Overview

🏗️ Core Framework Modules

Module Description Key Features
Agenix.Api Core interfaces and contracts for the testing framework • API definitions<br>• Interface contracts<br>• Common types<br>• Exception definitions
Agenix.Core Main implementation of the framework logic • Test execution engine<br>• Context management<br>• Action builders<br>• Session handling

🌐 Protocol & Communication Modules

Module Description Key Features
Agenix.Http HTTP client testing capabilities and utilities • HTTP request/response handling<br>• REST API testing<br>• Web service integration<br>• HTTP validation
Agenix.Sql Database testing and SQL execution utilities • Database connectivity<br>• SQL query execution<br>• Data validation<br>• Transaction management

🎭 Testing Pattern Implementations

Module Description Key Features
Agenix.Screenplay Screenplay pattern implementation for readable tests • Actor-based testing<br>• Task and Question abstractions<br>• Ability pattern<br>• Fluent test scenarios

🔌 Framework Integration Modules

Module Description Key Features
Agenix.NUnit.Runtime NUnit test framework integration • NUnit test execution<br>• Custom attributes<br>• Test lifecycle management<br>• Result reporting
Agenix.ReqnrollPlugin Reqnroll (SpecFlow successor) BDD integration • Gherkin syntax support<br>• Step definitions<br>• Feature file parsing<br>• BDD test execution

✅ Validation & Assertion Modules

Module Description Key Features
Agenix.Validation.Binary Binary file and data validation • Binary file comparison<br>• Byte array validation<br>• File format verification<br>• Checksum validation
Agenix.Validation.Json JSON schema and content validation • JSON schema validation<br>• Content comparison<br>• Path-based assertions<br>• Structure verification
Agenix.Validation.NHamcrest Hamcrest-style matcher library • Fluent assertion syntax<br>• Custom matchers<br>• Readable error messages<br>• Composable assertions
Agenix.Validation.Text Text content and format validation • String comparison<br>• Pattern matching<br>• Format validation<br>• Text transformation

🧪 Test Project Modules

Test Project Purpose Test Types
Agenix.Core.NUnitTestProject Core framework functionality testing • Unit tests<br>• Integration tests<br>• Framework behavior validation
Agenix.Screenplay.Tests Screenplay pattern feature validation • Actor behavior tests<br>• Task execution tests<br>• Question answering tests
Agenix.ReqnrollPlugin.Tests BDD plugin functionality testing • Step definition tests<br>• Feature parsing tests<br>• Plugin integration tests
Agenix.Validation.Binary.Tests Binary validation module testing • Binary comparison tests<br>• File validation tests
Agenix.Validation.Json.Tests JSON validation module testing • Schema validation tests<br>• JSON comparison tests
Agenix.Validation.NHamcrest.Tests Hamcrest matcher testing • Matcher behavior tests<br>• Assertion tests
Agenix.Validation.Text.Tests Text validation module testing • Text comparison tests<br>• Pattern matching tests

📋 Configuration & Support Files

Component Purpose Features
Solution Configuration Project organization and build settings • Multi-project solution<br>• Shared build configuration<br>• Dependency management
IDE Settings Development environment standardization • Code style enforcement<br>• License header automation<br>• Shared formatting rules
Templates Code generation and standardization • License header templates<br>• File templates<br>• Coding standards

🎯 Framework Capabilities

Capability Supported Modules Use Cases
API Testing Http, Core, Validation.Json REST API validation, HTTP workflows
Database Testing Sql, Core, Validation.Text Data validation, SQL execution
BDD Testing ReqnrollPlugin, Screenplay Behavior-driven development
Unit Testing NUnit.Runtime, Core Component testing, mocking
Integration Testing All modules End-to-end workflows
Data Validation All Validation.* modules Content verification, format checking

Development Guidelines

🛠️ Prerequisites

  • .NET 8.0 SDK or later
  • JetBrains Rider or Visual Studio 2022 (recommended IDEs)
  • Git for version control
  • NuGet package manager

📝 Coding Standards

Naming Conventions
  • Classes: PascalCase (CustomerService, HttpRequestBuilder)
  • Methods: PascalCase (PerformAs, AnsweredBy)
  • Properties: PascalCase (Name, RequestUrl)
  • Fields: camelCase with underscore prefix for private (_httpClient, _connectionString)
  • Constants: PascalCase (MaxRetryCount, DefaultTimeout)
  • Interfaces: PascalCase with 'I' prefix (IPerformable, IQuestion<T>)
Code Style
  • File scoped namespaces for new files
  • Primary constructors where appropriate (C# 12 feature)
  • Expression-bodied members for simple implementations
  • Nullable reference types enabled
  • XML documentation for public APIs

🧪 Testing Guidelines

Test Structure
  • Arrange-Act-Assert pattern for unit tests
  • Given-When-Then structure for BDD scenarios
  • Descriptive test names that explain the scenario
Test Categories
  • Unit Tests: Fast, isolated, test single components
  • Integration Tests: Test component interactions
  • Acceptance Tests: End-to-end business scenarios using Screenplay pattern

🔧 Development Workflow

Branch Strategy
  1. main: Production-ready code
  2. develop: Integration branch for features
  3. feature/: Individual feature development
  4. bugfix/: Bug fixes
  5. release/: Release preparation
Commit Guidelines
  • Use conventional commits format:
    type(scope): description
    
    feat(screenplay): add question chaining support
    fix(http): resolve timeout issue in HttpClient
    docs(readme): update installation instructions
    test(validation): add binary comparison tests
    

📦 Dependencies

Core Dependencies
  • NUnit 4.x: Primary testing framework
  • NSubstitute/Moq: Mocking library
  • Newtonsoft.Json: JSON processing
  • System.Net.Http: HTTP client operations
Adding New Dependencies
  1. Evaluate necessity and alternatives
  2. Check license compatibility
  3. Add to appropriate project only
  4. Update documentation

🚀 Building and Testing

Local Development
# Restore packages
dotnet restore

# Build solution
dotnet build

# Run all tests
dotnet test

# Run specific test project
dotnet test Agenix.Screenplay.Tests
IDE Configuration
  • EditorConfig settings are enforced
  • ReSharper/Rider settings in .sln.DotSettings
  • License headers automatically applied using templates

📋 Pull Request Guidelines

Before Submitting
  • All tests pass locally
  • Code follows established conventions
  • XML documentation added for public APIs
  • License headers present in new files
  • Breaking changes documented
PR Description Should Include
  • What: Brief description of changes
  • Why: Reason for the change
  • How: Technical approach used
  • Testing: How the change was tested
  • Breaking Changes: Any breaking changes

🐛 Issue Reporting

When reporting issues, please include:

  • Framework version
  • Target framework (.NET version)
  • Minimal reproduction case
  • Expected vs actual behavior
  • Environment details (OS, IDE, etc.)

🔒 Security Considerations

  • No hardcoded credentials in code or tests
  • Sensitive data should use configuration or environment variables
  • Dependencies regularly updated for security patches
  • Test data should not contain real customer information
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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 (3)

Showing the top 3 NuGet packages that depend on Agenix.Api:

Package Downloads
Agenix.Core

Core components and foundation for the Agenix testing framework

Agenix.Screenplay

Screenplay pattern implementation for the Agenix framework. Enables writing readable, maintainable, and scalable automated tests using the Actor-Task-Ability pattern for better test organization and reusability.

Agenix.Validation.Text

Text validation and assertion tools for the Agenix framework. Enables pattern matching, string comparison, and text-based validation in automated test scenarios with support for various text formats and encodings.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 97 6/25/2025
0.1.0-master0001 188 6/18/2025
0.1.0-alpha0120 81 6/26/2025
0.1.0-alpha0112 98 6/25/2025
0.1.0-alpha0110 110 6/25/2025
0.1.0-alpha0108 105 6/24/2025
0.1.0-alpha0106 110 6/24/2025
0.1.0-alpha0104 109 6/24/2025
0.1.0-alpha0102 105 6/24/2025
0.1.0-alpha0100 110 6/24/2025
0.1.0-alpha0098 133 6/23/2025
0.1.0-alpha0096 121 6/23/2025
0.1.0-alpha0094 113 6/18/2025
0.1.0-alpha0091 121 6/2/2025