Package net.azae.xray

Class XrayListener

  • All Implemented Interfaces:
    org.junit.platform.launcher.TestExecutionListener

    public class XrayListener
    extends java.lang.Object
    implements org.junit.platform.launcher.TestExecutionListener
    • Constructor Summary

      Constructors 
      Constructor Description
      XrayListener()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void executionFinished​(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult)  
      java.lang.String extractComment​(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult)  
      java.util.Optional<java.lang.String> extractXrayTestKey​(org.junit.platform.engine.reporting.ReportEntry entry, java.lang.String key)  
      static java.util.Optional<java.lang.String> getXrayToken​(java.net.http.HttpClient client)  
      static void publishToXray​(java.net.http.HttpClient client, java.lang.String token, java.lang.String inputJson)  
      void reportingEntryPublished​(org.junit.platform.launcher.TestIdentifier testIdentifier, org.junit.platform.engine.reporting.ReportEntry entry)  
      void testPlanExecutionFinished​(org.junit.platform.launcher.TestPlan testPlan)  
      void updateXrayTestWithAnnotation​(org.junit.platform.engine.reporting.ReportEntry entry, XrayTest test)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.junit.platform.launcher.TestExecutionListener

        dynamicTestRegistered, executionSkipped, executionStarted, testPlanExecutionStarted
    • Constructor Detail

      • XrayListener

        public XrayListener()
    • Method Detail

      • publishToXray

        public static void publishToXray​(java.net.http.HttpClient client,
                                         java.lang.String token,
                                         java.lang.String inputJson)
      • getXrayToken

        public static java.util.Optional<java.lang.String> getXrayToken​(java.net.http.HttpClient client)
      • reportingEntryPublished

        public void reportingEntryPublished​(org.junit.platform.launcher.TestIdentifier testIdentifier,
                                            org.junit.platform.engine.reporting.ReportEntry entry)
        Specified by:
        reportingEntryPublished in interface org.junit.platform.launcher.TestExecutionListener
      • updateXrayTestWithAnnotation

        public void updateXrayTestWithAnnotation​(org.junit.platform.engine.reporting.ReportEntry entry,
                                                 XrayTest test)
      • extractXrayTestKey

        public java.util.Optional<java.lang.String> extractXrayTestKey​(org.junit.platform.engine.reporting.ReportEntry entry,
                                                                       java.lang.String key)
      • executionFinished

        public void executionFinished​(org.junit.platform.launcher.TestIdentifier testIdentifier,
                                      org.junit.platform.engine.TestExecutionResult testExecutionResult)
        Specified by:
        executionFinished in interface org.junit.platform.launcher.TestExecutionListener
      • extractComment

        public java.lang.String extractComment​(org.junit.platform.launcher.TestIdentifier testIdentifier,
                                               org.junit.platform.engine.TestExecutionResult testExecutionResult)
      • testPlanExecutionFinished

        public void testPlanExecutionFinished​(org.junit.platform.launcher.TestPlan testPlan)
        Specified by:
        testPlanExecutionFinished in interface org.junit.platform.launcher.TestExecutionListener