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
Properties
ApiEndpoint
Gets or sets the Xping API endpoint URL.
public string ApiEndpoint { get; set; }
Property Value
ApiKey
Gets or sets the API key for authentication.
public string ApiKey { get; set; }
Property Value
AutoDetectCIEnvironment
Gets or sets a value indicating whether to automatically detect CI/CD environments.
public bool AutoDetectCIEnvironment { get; set; }
Property Value
BatchSize
Gets or sets the batch size for uploading test executions.
public int BatchSize { get; set; }
Property Value
CaptureStackTraces
Gets or sets a value indicating whether to capture stack traces for failed tests.
public bool CaptureStackTraces { get; set; }
Property Value
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
EnableCompression
Gets or sets a value indicating whether to enable compression for uploads.
public bool EnableCompression { get; set; }
Property Value
Enabled
Gets or sets a value indicating whether the SDK is enabled.
public bool Enabled { get; set; }
Property Value
Environment
Gets or sets the environment name (e.g., "Local", "CI", "Staging", "Production").
public string Environment { get; set; }
Property Value
FlushInterval
Gets or sets the flush interval for automatically uploading batches.
public TimeSpan FlushInterval { get; set; }
Property Value
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
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
MaxRetries
Gets or sets the maximum number of retry attempts for failed uploads.
public int MaxRetries { get; set; }
Property Value
ProjectId
Gets or sets the project ID.
public string ProjectId { get; set; }
Property Value
RetryDelay
Gets or sets the delay between retry attempts.
public TimeSpan RetryDelay { get; set; }
Property Value
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
UploadTimeout
Gets or sets the timeout for upload operations.
public TimeSpan UploadTimeout { get; set; }
Property Value
Methods
IsValid()
Determines whether the configuration is valid.
public bool IsValid()
Returns
- bool
trueif 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.