Class Errors
A static class that provides factory methods for creating different types of errors.
public static class Errors
- Inheritance
-
Errors
- Inherited Members
Properties
DnsLookupFailed
Creates an error when the DNS lookup fails to resolve the hostname
public static Error DnsLookupFailed { get; }
Property Value
- Error
An error with code 1110 and a message indicating the DNS lookup failure
HeadlessBrowserNotFound
Creates an error when no Headless browsers are registered in the service provider
public static Error HeadlessBrowserNotFound { get; }
Property Value
- Error
An error with code 1011 and a message instructing to invoke AddBrowserClientFactory()
HttpClientsNotFound
Creates an error when no Http clients are registered in the service provider
public static Error HttpClientsNotFound { get; }
Property Value
- Error
An error with code 1010 and a message instructing to invoke AddHttpClientFactory()
IncorrectClientType
Creates an error when incorrect client type has been given for Http Request System
public static Error IncorrectClientType { get; }
Property Value
- Error
An error with code 1012 and a message instructing to use HttpClient or BrowserClient
IncorrectStartDate
Creates an error when the start date is in the past
public static Error IncorrectStartDate { get; }
Property Value
- Error
An error with code 1203 and a message indicating the incorrect start date
MissingStartTimeInTestSession
Creates an error when the start time is missing in the test session
public static Error MissingStartTimeInTestSession { get; }
Property Value
- Error
An error with code 1202 and a message indicating the missing start time
MissingUrlInTestSession
Creates an error when the URL is missing in the test session
public static Error MissingUrlInTestSession { get; }
Property Value
- Error
An error with code 1201 and a message indicating the missing URL
NoTestStepHandlers
Creates an error when no test step handlers are found
public static Error NoTestStepHandlers { get; }
Property Value
- Error
An error with code 1200 and a message indicating the absence of test step handlers
PingRequestFailed
Creates an error when the ping request fails
public static Error PingRequestFailed { get; }
Property Value
- Error
An error with code 1111 and a message indicating the ping request failure
Methods
ExceptionError(Exception)
Creates an error from an exception
public static Error ExceptionError(Exception ex)
Parameters
ex
ExceptionThe exception to create the error from
Returns
- Error
An error with code 1000 and the exception message
HttpStatusValidationFailed(HttpStatusCode)
Creates an error when the https status code validation fails
public static Error HttpStatusValidationFailed(HttpStatusCode expectedCode)
Parameters
expectedCode
HttpStatusCodeThe expected HTTP staus code
Returns
- Error
An error with code 1112 and a message indicating the http status code failure
InsufficientData(ITestComponent)
Creates an error when there is insufficient data to perform a test step
public static Error InsufficientData(ITestComponent component)
Parameters
component
ITestComponentThe test component that requires data
Returns
- Error
An error with code 1100 and a message indicating the test component name
TestComponentTimeout(ITestComponent, TimeSpan)
Creates an error representing a timeout failure for a test component.
public static Error TestComponentTimeout(ITestComponent component, TimeSpan timeout)
Parameters
component
ITestComponentThe test component that timed out.
timeout
TimeSpanThe maximum allowed execution time that was exceeded.
Returns
- Error
An error with code 1102 and a detailed error message.
ValidationFailed(ITestComponent)
Creates an error when the validation fails to perform a test step
public static Error ValidationFailed(ITestComponent component)
Parameters
component
ITestComponentThe test component that failed validation
Returns
- Error
An error with code 1101 and a message indicating the test component name
ValidationFailed(ITestComponent, string?)
Creates an error when the validation fails to perform a test step with an optional error message
public static Error ValidationFailed(ITestComponent component, string? errorMessage)
Parameters
component
ITestComponentThe test component that failed validation
errorMessage
stringThe optional error message to include
Returns
- Error
An error with code 1101 and a message indicating the test component name and the error message