Package io.testomat.junit.methodexporter
Class MethodExportManager
- java.lang.Object
-
- io.testomat.junit.methodexporter.MethodExportManager
-
public class MethodExportManager extends java.lang.ObjectManages 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 Summary
Fields Modifier and Type Field Description static java.lang.StringEXPORT_REQUIRED_PROPERTY_NAME
-
Constructor Summary
Constructors Constructor Description MethodExportManager()MethodExportManager(io.testomat.core.propertyconfig.interf.PropertyProvider provider, FileFinder fileFinder, ExportSender exportSender, FileParser fileParser, MethodCaseExtractor methodCaseExtractor)Constructor for testing
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidloadTestBodyForClass(java.lang.Class<?> testClass)Loads and exports test method bodies for the specified test class.voidloadTestBodyIfRequired(org.junit.jupiter.api.extension.ExtensionContext extensionContext)Loads test method bodies if export is required for the given extension context.
-
-
-
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 providerfileFinder- the file finderexportSender- the export senderfileParser- the file parsermethodCaseExtractor- 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
-
-