Class MethodExportManager


  • public class MethodExportManager
    extends java.lang.Object
    Manages the export of test method bodies to Testomat.io. This class handles the extraction, parsing, and sending of test case information from JUnit test classes to the Testomat reporting system.
    • Field Detail

      • EXPORT_REQUIRED_PROPERTY_NAME

        public static final java.lang.String EXPORT_REQUIRED_PROPERTY_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • MethodExportManager

        public MethodExportManager()
      • MethodExportManager

        public MethodExportManager​(io.testomat.core.propertyconfig.interf.PropertyProvider provider,
                                   FileFinder fileFinder,
                                   ExportSender exportSender,
                                   FileParser fileParser,
                                   MethodCaseExtractor methodCaseExtractor)
        Constructor for testing
        Parameters:
        provider - the property provider
        fileFinder - the file finder
        exportSender - the export sender
        fileParser - the file parser
        methodCaseExtractor - the method case extractor
    • Method Detail

      • loadTestBodyForClass

        public void loadTestBodyForClass​(java.lang.Class<?> testClass)
        Loads and exports test method bodies for the specified test class. This method extracts test cases from the class file, parses them, and sends them to the Testomat server if export is required.
        Parameters:
        testClass - the test class to process
      • loadTestBodyIfRequired

        public void loadTestBodyIfRequired​(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
        Loads test method bodies if export is required for the given extension context. This is a simplified version that processes a single extension context.
        Parameters:
        extensionContext - the JUnit extension context
        Throws:
        java.lang.IllegalArgumentException - if extensionContext is null