Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- addMatchers(TestProxyRequestMatcher...) - Method in class com.azure.core.test.InterceptorManager
-
Add matcher rules to match recorded data in playback.
- addMatchers(List<TestProxyRequestMatcher>) - Method in class com.azure.core.test.InterceptorManager
-
Add matcher rules to match recorded data in playback.
- addSanitizers(TestProxySanitizer...) - Method in class com.azure.core.test.InterceptorManager
-
Add sanitizer rule for sanitization during record or playback.
- addSanitizers(List<TestProxySanitizer>) - Method in class com.azure.core.test.InterceptorManager
-
Add sanitizer rule for sanitization during record or playback.
- addTextReplacementRule(String, String) - Method in class com.azure.core.test.InterceptorManager
-
Add text replacement rule (regex as key, the replacement text as value) into
InterceptorManager.textReplacementRules - afterEach(ExtensionContext) - Method in class com.azure.core.test.ThreadDumper
- afterTest() - Method in class com.azure.core.test.TestBase
-
Dispose of any resources and clean-up after a test case runs.
- afterTestExecution(ExtensionContext) - Method in class com.azure.core.test.AzureTestWatcher
- AZURE_TEST_HTTP_CLIENTS_VALUE_ALL - Static variable in class com.azure.core.test.TestBase
-
Specifies to use all HttpClient implementations in testing.
- AZURE_TEST_HTTP_CLIENTS_VALUE_NETTY - Static variable in class com.azure.core.test.TestBase
-
Specifies to use Netty HttpClient implementation in testing.
- AZURE_TEST_SERVICE_VERSIONS_VALUE_ALL - Static variable in class com.azure.core.test.TestBase
-
Specifies to use all service versions in testing.
- AzureTestWatcher - Class in com.azure.core.test
-
JUnit 5 extension class which reports on testing running and simple metrics about the test such as run time.
- AzureTestWatcher() - Constructor for class com.azure.core.test.AzureTestWatcher
-
Creates an instance of
AzureTestWatcher.
B
- beforeAll(ExtensionContext) - Method in class com.azure.core.test.ThreadDumper
- beforeEach(ExtensionContext) - Method in class com.azure.core.test.TestBase
- beforeEach(ExtensionContext) - Method in class com.azure.core.test.ThreadDumper
- beforeTest() - Method in class com.azure.core.test.TestBase
-
Performs any set-up before each test case.
- beforeTestExecution(ExtensionContext) - Method in class com.azure.core.test.AzureTestWatcher
C
- close() - Method in class com.azure.core.test.InterceptorManager
-
Disposes of resources used by this InterceptorManager.
- com.azure.core.test - package com.azure.core.test
-
Package containing common test classes for Azure client libraries.
D
- didTestRun() - Method in class com.azure.core.test.TestContextManager
-
Returns whether the current test was ran.
- doNotRecordTest() - Method in class com.azure.core.test.TestContextManager
-
Returns whether the test should have its network calls recorded during a
recordtest run.
E
- execute(Runnable, Callable<Mono<Void>>) - Static method in class com.azure.core.test.SyncAsyncExtension
-
Executes sync or async branch depending on the context.
- execute(Callable<T>, Callable<Mono<T>>) - Static method in class com.azure.core.test.SyncAsyncExtension
-
Executes sync or async branch depending on the context.
G
- getHttpClientOrUsePlayback(HttpClient) - Method in class com.azure.core.test.TestBase
-
Convenience method which either returned the passed
HttpClientor returns aPlaybackClientdepending on whether the test mode is playback. - getHttpClients() - Static method in class com.azure.core.test.TestBase
-
Returns a list of
HttpClientsthat should be tested. - getPlaybackClient() - Method in class com.azure.core.test.InterceptorManager
-
Gets a new HTTP client that plays back test session records managed by
InterceptorManager. - getPlaybackRecordName() - Method in class com.azure.core.test.InterceptorManager
-
Gets the name of the playback record.
- getProxyVariableConsumer() - Method in class com.azure.core.test.InterceptorManager
-
Get a
Consumerfor adding variables used in test proxy tests. - getProxyVariableSupplier() - Method in class com.azure.core.test.InterceptorManager
-
A
Supplierfor retrieving a variable from a test proxy recording. - getRecordedData() - Method in class com.azure.core.test.InterceptorManager
-
Gets the recorded data InterceptorManager is keeping track of.
- getRecordingFileLocation() - Method in class com.azure.core.test.InterceptorManager
-
Get the recording file location in assets repo.
- getRecordPolicy() - Method in class com.azure.core.test.InterceptorManager
-
Gets a new HTTP pipeline policy that records network calls and its data is managed by
InterceptorManager. - getRecordPolicy(List<Function<String, String>>) - Method in class com.azure.core.test.InterceptorManager
-
Gets a new HTTP pipeline policy that records network calls.
- getTestClassPath() - Method in class com.azure.core.test.TestBase
-
Returns the path of the class to which the test belongs.
- getTestMode() - Method in class com.azure.core.test.TestBase
-
Gets the TestMode that has been initialized.
- getTestMode() - Method in class com.azure.core.test.TestContextManager
-
Returns the mode being used to run tests.
- getTestName() - Method in class com.azure.core.test.InterceptorManager
-
Gets the name of the running test.
- getTestName() - Method in class com.azure.core.test.TestBase
-
Deprecated.
- getTestName() - Method in class com.azure.core.test.TestContextManager
-
Returns the name of the test being ran.
- getTestPlaybackRecordingName() - Method in class com.azure.core.test.TestContextManager
-
Returns the name of the playback record for the test being ran.
- getValue() - Method in exception com.azure.core.test.MyAzureException
- getValue() - Method in exception com.azure.core.test.MyRestException
I
- initialize() - Static method in class com.azure.core.test.ThreadDumper
-
Initializes the singleton dumper.
- interceptorManager - Variable in class com.azure.core.test.TestBase
-
InterceptorManagerused for this test run. - InterceptorManager - Class in com.azure.core.test
-
A class that keeps track of network calls by either reading the data from an existing test session record or recording the network calls in memory.
- InterceptorManager(TestContextManager) - Constructor for class com.azure.core.test.InterceptorManager
-
Creates a new InterceptorManager that either replays test-session records or saves them.
- InterceptorManager(String, TestMode) - Constructor for class com.azure.core.test.InterceptorManager
-
Deprecated.Use
InterceptorManager(TestContextManager)instead. - InterceptorManager(String, Map<String, String>) - Constructor for class com.azure.core.test.InterceptorManager
-
Deprecated.Use
InterceptorManager(String, Map, boolean)instead. - InterceptorManager(String, Map<String, String>, boolean) - Constructor for class com.azure.core.test.InterceptorManager
-
Deprecated.Use
InterceptorManager(String, Map, boolean, String)instead. - InterceptorManager(String, Map<String, String>, boolean, String) - Constructor for class com.azure.core.test.InterceptorManager
-
Creates a new InterceptorManager that replays test session records.
- isLiveMode() - Method in class com.azure.core.test.InterceptorManager
-
Gets whether this InterceptorManager is in live mode.
- isPlaybackMode() - Method in class com.azure.core.test.InterceptorManager
-
Gets whether this InterceptorManager is in playback mode.
- isRecordMode() - Method in class com.azure.core.test.InterceptorManager
-
Gets whether this InterceptorManager is in record mode.
- isTestProxyEnabled() - Static method in class com.azure.core.test.TestBase
-
Indicates whether the out of process test recording proxy is in use.
- isTestProxyEnabled() - Method in class com.azure.core.test.TestContextManager
-
Returns if the test proxy is enabled
L
M
- MyAzureException - Exception in com.azure.core.test
-
A test exception.
- MyAzureException(String, HttpResponse, HttpBinJSON) - Constructor for exception com.azure.core.test.MyAzureException
-
Creates an exception with the
message,response, andbody. - MyRestException - Exception in com.azure.core.test
-
A test exception.
- MyRestException(String, HttpResponse, HttpBinJSON) - Constructor for exception com.azure.core.test.MyRestException
-
Creates a service request exception.
P
- PLAYBACK - Enum constant in enum com.azure.core.test.TestMode
-
Playback data from an existing test session.
- provideTestTemplateInvocationContexts(ExtensionContext) - Method in class com.azure.core.test.SyncAsyncExtension
R
S
- setPlaybackPollerFluxPollInterval(PollerFlux<T, U>) - Method in class com.azure.core.test.TestBase
-
Sets the polling interval for the passed
PollerFlux. - setPlaybackSyncPollerPollInterval(SyncPoller<T, U>) - Method in class com.azure.core.test.TestBase
-
Sets the polling interval for the passed
SyncPoller. - setProxyRecordingOptions(TestProxyRecordingOptions) - Method in class com.azure.core.test.InterceptorManager
-
Sets the recording options for the proxy.
- setTestProxyEnabled() - Static method in class com.azure.core.test.TestBase
-
Enables use of the test proxy.
- setupClass() - Static method in class com.azure.core.test.TestBase
-
Before tests are executed, determines the test mode by reading the
AZURE_TEST_MODEenvironment variable. - setupTest(TestInfo) - Method in class com.azure.core.test.TestBase
-
Sets-up the
TestBase.testResourceNamerandTestBase.interceptorManagerbefore each test case is run. - setupTestProxy(TestInfo) - Static method in class com.azure.core.test.TestProxyTestBase
-
Before tests are executed, determines the test mode by reading the
AZURE_TEST_MODEenvironment variable. - shouldClientBeTested(HttpClient) - Static method in class com.azure.core.test.TestBase
-
Returns whether the given http clients match the rules of test framework.
- skipRecordingRequestBody() - Method in class com.azure.core.test.TestContextManager
-
Returns whether the test is recording request body when run
recordmode. - sleepIfRunningAgainstService(long) - Method in class com.azure.core.test.TestBase
-
Sleeps the test for the given amount of milliseconds if
TestModeisn'tTestMode.PLAYBACK. - supportsTestTemplate(ExtensionContext) - Method in class com.azure.core.test.SyncAsyncExtension
- SyncAsyncExtension - Class in com.azure.core.test
-
A test template extension that helps to branch out a single test into sync and async invocation.
- SyncAsyncExtension() - Constructor for class com.azure.core.test.SyncAsyncExtension
-
Creates a new instance of
SyncAsyncExtension.
T
- teardownTest(TestInfo) - Method in class com.azure.core.test.TestBase
-
Disposes of
InterceptorManagerand its inheriting class' resources. - TestBase - Class in com.azure.core.test
-
Base class for running live and playback tests using
InterceptorManager. - TestBase() - Constructor for class com.azure.core.test.TestBase
-
Creates a new instance of
TestBase. - testContextManager - Variable in class com.azure.core.test.TestBase
-
TestContextManagerused for this test run. - TestContextManager - Class in com.azure.core.test
-
This class handles managing context about a test, such as custom testing annotations and verifying whether the test is capable of running.
- TestContextManager(Method, TestMode) - Constructor for class com.azure.core.test.TestContextManager
-
Constructs a
TestContextManagerbased on the test method. - TestContextManager(Method, TestMode, boolean, boolean, Path) - Constructor for class com.azure.core.test.TestContextManager
-
Constructs a
TestContextManagerbased on the test method. - TestMode - Enum in com.azure.core.test
-
The possible testing modes.
- TestProxyTestBase - Class in com.azure.core.test
-
Base class for running live and playback tests using test-proxy
- TestProxyTestBase() - Constructor for class com.azure.core.test.TestProxyTestBase
-
Creates an instance of
TestProxyTestBase. - testResourceNamer - Variable in class com.azure.core.test.TestBase
-
TestResourceNamerused for this test run. - ThreadDumper - Class in com.azure.core.test
-
A utility and extension to dump threads after 30 minutes from starting tests.
- ThreadDumper() - Constructor for class com.azure.core.test.ThreadDumper
-
Creates a new instance of
ThreadDumper.
V
- valueOf(String) - Static method in enum com.azure.core.test.TestMode
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum com.azure.core.test.TestMode
-
Returns an array containing the constants of this enum type, in the order they are declared.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
TestInfo. Keeping this for backward compatability of other client libraries that still override this method. This method can be deleted when all client libraries remove this method. SeeTestBase.setupTest(TestInfo).