TestAny.Essentials.Api.Extensions
2.0.4
dotnet add package TestAny.Essentials.Api.Extensions --version 2.0.4
NuGet\Install-Package TestAny.Essentials.Api.Extensions -Version 2.0.4
<PackageReference Include="TestAny.Essentials.Api.Extensions" Version="2.0.4" />
<PackageVersion Include="TestAny.Essentials.Api.Extensions" Version="2.0.4" />
<PackageReference Include="TestAny.Essentials.Api.Extensions" />
paket add TestAny.Essentials.Api.Extensions --version 2.0.4
#r "nuget: TestAny.Essentials.Api.Extensions, 2.0.4"
#:package TestAny.Essentials.Api.Extensions@2.0.4
#addin nuget:?package=TestAny.Essentials.Api.Extensions&version=2.0.4
#tool nuget:?package=TestAny.Essentials.Api.Extensions&version=2.0.4
Build your Api test easily with few simple steps and this framework allows you to focus more on your Test. The wrapper allows to call the endpoints easily and provide different options on your request and response.
Overview
This framework is build as part of Selenium Essentials to provide a Api framework which allows to make calls to endpoint easily with enhanced data transformation capabilities.
- Api framework to write integration tests
-- Supports fluent way of endpoint definitions
-- Support most of the operations
-- Simple and easy to manage the tests
-- Excel data transformation and template processing
-- Data-driven testing with Excel integration
-- String template transformation with placeholders
Key Features:
- Excel Data Integration: Load and transform data from Excel files using attributes
- Template Processing: Transform string templates with {{placeholder}} syntax using Excel data
- Extension Methods: Convenient extension methods for string and data transformations
- Seamless Integration: Works with TestAny.Essentials.Api for enhanced testing capabilities
Excel Data Transformation:
- GetExcelDataSourceContent(): Retrieve Excel data from method attributes
- TransformWithExcelData(): Transform string templates using Excel data with {{key}} placeholders
- Support for column mapping and worksheet selection
- Automatic data type handling and conversion
Example,
return new TestApiHttp()
.SetEnvironment("http://api.openweathermap.org/")
.PrepareRequest("/data/2.5/forecase")
.Get()
.ResponseBody
.ContentJson;
// Excel data transformation example
var template = "Hello {{name}}, your age is {{age}}";
var transformedContent = template.TransformWithExcelData(excelData);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Aspose.Cells (>= 21.1.0)
- CsvHelper (>= 33.0.1)
- HtmlAgilityPack (>= 1.11.71)
- Pj.Library (>= 1.0.5.2)
- Pj.Library.ThirdParty (>= 1.0.5.2)
- System.Drawing.Common (>= 9.0.0)
- TestAny.Essentials.Api (>= 2.0.4)
- TestAny.Essentials.Core (>= 2.0.4)
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 |
|---|---|---|
| 2.0.4 | 243 | 11/30/2025 |
Release 2.0.2
- Major refactoring: Excel data transformation features moved from TestAny.Essentials.Api to Extensions project
- Added ExcelDataTransformExtensions class with enhanced Excel data processing capabilities
- New GetExcelDataSourceContent() method for retrieving Excel data from method attributes
- New TransformWithExcelData() extension method for string template transformation using Excel data
- Improved separation of concerns: Excel-specific functionality now centralized in Extensions project
- Enhanced template processing with {{placeholder}} syntax support
- Better column mapping support with original and mapped column names
- Maintains backward compatibility while providing cleaner architecture
Release 1.0.5.9
- Retry on every action [Get, Post, Delete, Put] has now additional parameter to control the timeout error from server. retryOnRequestTimeout, can be set to true/false to fail when the request timeout or to retry
- AddingCookies is renamed to AddCookies under TestApiRequest
- Option to control
-- Set Timeout
-- Auto Redirection on the server for a request
-- Extract Domain cookies
-- No Cache
Release 1.0.5.4
- Api Request can now accept SetQueryParameter and SetJsonBody with any object passed
Release 1.0.5.2
- Api Retry option now has ability to control on which httpstatuscode the retry should occur
Release 1.0.5.2
- Introduce Api framework with PUT PATCH commands
-- WithRetry option with time on interval
-- Response contains cookies extracted from domains
-- Cookie extension to merge and contact cookies
-- Introducing Proxy for API request based on the user data
-- Introducing Certificates to be passed on the request
-- Response has more request details from headers to cookies
- Tests are now upgraded to .NET 6
Release 1.0.5.1
- Bug fix when loading ApiResponse as HtmlContent
Release 1.0.5
- Introduce TestAny.Essentials.Core
- Introduce TestAny.Essentials.Api. All Api related functionality are moved into this new package
- There are some breaking changes
-- SeAppConfig is renamed to TestAnyAppConfig
-- TestAnyAppConfig is now moved into TestAny.Essentials.Core
-- TestContextHelper is renamed to TestAnyTestContextHelper
-- TestAnyTestContextHelper is now moved into TestAny.Essentials.Core
-- Dtos models are now moved into the Core project
Release 1.0.4
- Introduction of Selenium.Essentials.Api for Api testing
- Usage of utilities from Pj.Library
- Remove Utility class from Selenium Essentials
- Move properties from Utility class to SeAppConfig class
- Move InitializeFramework(..) from Utility to SeAppConfig class