Skip to main content
Version: v1

ITestDriver Interface

Signature​

export interface ITestDriver

Properties​

PropertyModifiersTypeDescription
endpointNameoptionalstringSpecific endpoint name if there are any
tenantNameoptionalstringTenant name if there are any
typeTestDriverTypesThe type of server the test driver executes against
userIndexoptionalnumberUser index if there are any
versionstringThe semantic version of the test drivers package. In general this version will match that of the client interfaces and implementation exposed and used by the test driver.

Methods​

MethodReturn TypeDescription
createContainerUrl(testId, containerUrl)Promise<string>Creates a container url that can be resolved by the url resolver for this driver. Repeated calls with the same test id will return the same test id. The test id may not map directly to any specific Fluid Framework concept. If you need more control you should disambiguate the driver based on its type, this should only be done it absolutely necessary for complex scenarios as the test may not work against all supported servers if done. UPDATE/To help with disambiguating the container the caller can pass an optional resolved URL associated with a container created earlier. The specific driver will use it as an additional hint when resolving the container URL.
createCreateNewRequest(testId)IRequestCreates a create new request based on the test id. Repeated calls with the same test id will return the same request. The test id may not map directly to any specific Fluid Framework concept. If you need more control you should disambiguate the driver based on its type, this should only be done it absolutely necessary for complex scenarios as the test may not work against all supported servers if done.
createDocumentServiceFactory()IDocumentServiceFactoryCreates a document service factory targetting the server
createUrlResolver()IUrlResolverCreates a url resolver targetting the server

Property Details​

endpointName​

Specific endpoint name if there are any

Signature​

readonly endpointName?: string;

Type: string

tenantName​

Tenant name if there are any

Signature​

readonly tenantName?: string;

Type: string

type​

The type of server the test driver executes against

Signature​

readonly type: TestDriverTypes;

Type: TestDriverTypes

userIndex​

User index if there are any

Signature​

readonly userIndex?: number;

Type: number

version​

The semantic version of the test drivers package. In general this version will match that of the client interfaces and implementation exposed and used by the test driver.

Signature​

readonly version: string;

Type: string

Method Details​

createContainerUrl​

Creates a container url that can be resolved by the url resolver for this driver. Repeated calls with the same test id will return the same test id. The test id may not map directly to any specific Fluid Framework concept. If you need more control you should disambiguate the driver based on its type, this should only be done it absolutely necessary for complex scenarios as the test may not work against all supported servers if done. UPDATE/To help with disambiguating the container the caller can pass an optional resolved URL associated with a container created earlier. The specific driver will use it as an additional hint when resolving the container URL.

Signature​

createContainerUrl(testId: string, containerUrl?: IResolvedUrl): Promise<string>;

Parameters​

ParameterModifiersTypeDescription
testIdstring
containerUrloptionalIResolvedUrl

Returns​

Return type: Promise<string>

createCreateNewRequest​

Creates a create new request based on the test id. Repeated calls with the same test id will return the same request. The test id may not map directly to any specific Fluid Framework concept. If you need more control you should disambiguate the driver based on its type, this should only be done it absolutely necessary for complex scenarios as the test may not work against all supported servers if done.

Signature​

createCreateNewRequest(testId?: string): IRequest;

Parameters​

ParameterModifiersTypeDescription
testIdoptionalstring

Returns​

Return type: IRequest

createDocumentServiceFactory​

Creates a document service factory targetting the server

Signature​

createDocumentServiceFactory(): IDocumentServiceFactory;

Returns​

Return type: IDocumentServiceFactory

createUrlResolver​

Creates a url resolver targetting the server

Signature​

createUrlResolver(): IUrlResolver;

Returns​

Return type: IUrlResolver