Class AdvancedAuditingClient
java.lang.Object
com.atlassian.jira.testkit.client.RestApiClient<AdvancedAuditingClient>
com.atlassian.jira.functest.framework.backdoor.AdvancedAuditingClient
public final class AdvancedAuditingClient
extends com.atlassian.jira.testkit.client.RestApiClient<AdvancedAuditingClient>
This class is a for handling necessary communications between Jira func test and Jira instance.
It provides two main functionality such as:
- obtaining all audit entities from Global Audit log
- changing the the configuration for Coverage areas
All the POJOs and the logic responsible for auditing came from cross product plugin and the name is atlassian-audit.
- Since:
- 8.9.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classNested classes/interfaces inherited from class com.atlassian.jira.testkit.client.RestApiClient
com.atlassian.jira.testkit.client.RestApiClient.BackdoorLoggingFilter, com.atlassian.jira.testkit.client.RestApiClient.JsonMediaTypeFilter, com.atlassian.jira.testkit.client.RestApiClient.RestCall -
Field Summary
Fields inherited from class com.atlassian.jira.testkit.client.RestApiClient
REST_VERSION -
Constructor Summary
ConstructorsConstructorDescriptionAdvancedAuditingClient(com.atlassian.jira.testkit.client.JIRAEnvironmentData environmentData) -
Method Summary
Modifier and TypeMethodDescriptionvoidallAreasTo(String coverageLevel) protected javax.ws.rs.client.WebTargettakeAllEvents(int limit) takeAllEventsWithAffectedObject(String affectedObjectType, String affectedObjectId) waitUntilEventIsFound(String eventSummary) This method was introduced to reduce flakiness of tests that use audit log entries to confirm some actions.waitUntilEventIsFound(String eventSummary, int secondsAtMost) Methods inherited from class com.atlassian.jira.testkit.client.RestApiClient
anonymous, authenticate, authoriseWithOAuth2, authoriseWithOAuth2, cleanUp, client, createResource, createResourceGadget, createResourceInternal, errorResponse, expanded, getCredentialsProvider, getEnvironmentData, loginAs, loginAs, registerResponse, resourceRoot, resourceRoot, setOf, toResponse, toResponse, toResponse, withCredentialsProvider
-
Constructor Details
-
AdvancedAuditingClient
public AdvancedAuditingClient(com.atlassian.jira.testkit.client.JIRAEnvironmentData environmentData)
-
-
Method Details
-
allAreasTo
-
takeAllEvents
- Returns:
- limited list of events with default limit defined by endpoint
-
takeAllEvents
- Parameters:
limit- number of returned events- Returns:
- limited list of events
-
takeAllEventsWithAffectedObject
public List<AdvancedAuditingClient.AuditEntities> takeAllEventsWithAffectedObject(String affectedObjectType, String affectedObjectId) -
waitUntilEventIsFound
This method was introduced to reduce flakiness of tests that use audit log entries to confirm some actions. Due to occasional delay, proper entries were not returned, but after waiting few additional seconds they eventually appeared. The method returns the event if it appeared in the given amount of time (the default is 10 seconds), otherwise it throws an error that will cause the test to fail.- Parameters:
eventSummary- example "Issue created"- Returns:
- audit entry for given summary
-
waitUntilEventIsFound
public AdvancedAuditingClient.AuditEntities waitUntilEventIsFound(String eventSummary, int secondsAtMost) -
createResource
protected javax.ws.rs.client.WebTarget createResource()- Overrides:
createResourcein classcom.atlassian.jira.testkit.client.RestApiClient<AdvancedAuditingClient>
-