Table of Contents

Class XpingConfiguration

Namespace
Xping.Sdk.Core.Configuration
Assembly
Xping.Sdk.Core.dll

Configuration options for the Xping SDK.

public sealed class XpingConfiguration
Inheritance
XpingConfiguration
Inherited Members

Fields

DefaultEnvironment

Represents the default environment setting for the Xping SDK if none is specified.

public const string DefaultEnvironment = "Local"

Field Value

string

Properties

ApiEndpoint

Gets or sets the Xping API endpoint URL.

public string ApiEndpoint { get; set; }

Property Value

string

ApiKey

Gets or sets the API key for authentication.

public string ApiKey { get; set; }

Property Value

string

AutoDetectCIEnvironment

Gets or sets a value indicating whether to automatically detect CI/CD environments.

public bool AutoDetectCIEnvironment { get; set; }

Property Value

bool

BatchSize

Gets or sets the batch size for uploading test executions.

public int BatchSize { get; set; }

Property Value

int

CaptureStackTraces

Gets or sets a value indicating whether to capture stack traces for failed tests.

public bool CaptureStackTraces { get; set; }

Property Value

bool

CollectNetworkMetrics

Gets or sets a value indicating whether to collect network reliability metrics. Network metrics include latency, connection type, and online status.

public bool CollectNetworkMetrics { get; set; }

Property Value

bool

EnableCompression

Gets or sets a value indicating whether to enable compression for uploads.

public bool EnableCompression { get; set; }

Property Value

bool

Enabled

Gets or sets a value indicating whether the SDK is enabled.

public bool Enabled { get; set; }

Property Value

bool

Environment

Gets or sets the environment name (e.g., "Local", "CI", "Staging", "Production").

public string Environment { get; set; }

Property Value

string

FlushInterval

Gets or sets the flush interval for automatically uploading batches.

public TimeSpan FlushInterval { get; set; }

Property Value

TimeSpan

LogLevel

Gets or sets the minimum log level for SDK diagnostics output. Default is Info. Set XpingLogLevel.None to disable all logging.

public XpingLogLevel LogLevel { get; set; }

Property Value

XpingLogLevel

Logger

Gets or sets a custom logger implementation. If null, the SDK will use a default console logger based on the LogLevel setting. Set to XpingNullLogger.Instance to completely disable logging.

public IXpingLogger? Logger { get; set; }

Property Value

IXpingLogger

MaxRetries

Gets or sets the maximum number of retry attempts for failed uploads.

public int MaxRetries { get; set; }

Property Value

int

ProjectId

Gets or sets the project ID.

public string ProjectId { get; set; }

Property Value

string

RetryDelay

Gets or sets the delay between retry attempts.

public TimeSpan RetryDelay { get; set; }

Property Value

TimeSpan

SamplingRate

Gets or sets the sampling rate (0.0 to 1.0, where 1.0 means 100% of tests are tracked).

public double SamplingRate { get; set; }

Property Value

double

UploadTimeout

Gets or sets the timeout for upload operations.

public TimeSpan UploadTimeout { get; set; }

Property Value

TimeSpan

Methods

IsValid()

Determines whether the configuration is valid.

public bool IsValid()

Returns

bool

true if the configuration is valid; otherwise, false.

Validate()

Validates the configuration and returns a list of validation errors.

public IReadOnlyList<string> Validate()

Returns

IReadOnlyList<string>

A list of validation error messages, or an empty list if valid.