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
  • Constructor Details

    • AdvancedAuditingClient

      public AdvancedAuditingClient(com.atlassian.jira.testkit.client.JIRAEnvironmentData environmentData)
  • Method Details

    • allAreasTo

      public void allAreasTo(String coverageLevel)
    • takeAllEvents

      public List<AdvancedAuditingClient.AuditEntities> takeAllEvents()
      Returns:
      limited list of events with default limit defined by endpoint
    • takeAllEvents

      public List<AdvancedAuditingClient.AuditEntities> takeAllEvents(int limit)
      Parameters:
      limit - number of returned events
      Returns:
      limited list of events
    • takeAllEventsWithAffectedObject

      public List<AdvancedAuditingClient.AuditEntities> takeAllEventsWithAffectedObject(String affectedObjectType, String affectedObjectId)
    • waitUntilEventIsFound

      public AdvancedAuditingClient.AuditEntities waitUntilEventIsFound(String eventSummary)
      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:
      createResource in class com.atlassian.jira.testkit.client.RestApiClient<AdvancedAuditingClient>