Package com.adaptris.tester.runners
Class TestExecutor
- java.lang.Object
-
- com.adaptris.tester.runners.TestExecutor
-
public class TestExecutor extends java.lang.ObjectEntry point into service tester via the commandline.
Argument Description Required -serviceTestTest configuration location true -serviceTestOutputOutput directory for test results (default: ./test-results) false -serviceTestPreProcessorPre-processors to execute against test configuration (ex: xinclude) false
-
-
Constructor Summary
Constructors Constructor Description TestExecutor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JUnitReportTestResultsexecute(ServiceTest serviceTest)ExecutesServiceTestconfiguration returningJUnitReportTestResultsvoidexecute(java.io.File input, java.io.File outputDirectory)Reads contents of input and executesexecute(String)using output directory with the returned resultsJUnitReportTestResults.writeReports(File)JUnitReportTestResultsexecute(java.lang.String text)Unmarshalls input toServiceTestusingAdaptrisMarshallerexecutesexecute(ServiceTest)returningJUnitReportTestResultsvoidexecute(java.lang.String[] args)Passes arguments usingcheckAndSetArguments(String[])and executesexecute(File, File).JUnitReportTestResultsexecute(java.lang.String text, java.io.File workingDirectory)Unmarshalls input toServiceTestusingAdaptrisMarshallerexecutesexecute(ServiceTest)returningJUnitReportTestResultsjava.lang.StringgetInputFilePath()Gets test configuration pathjava.lang.StringgetOutputFilePath()Gets output directory for test resultsjava.lang.StringgetPreProcessors()Gets Pre-Processors to be when service test configuration is unmarshalled.static voidmain(java.lang.String[] args)Entry point into service tester via the commandline, executesexecute(String[]).voidsetInputFilePath(java.lang.String inputFilePath)Sets test configuration pathvoidsetOutputFilePath(java.lang.String outputFilePath)Sets output directory for test resultsvoidsetPreProcessors(java.lang.String preProcessors)Sets Pre-Processors to be when service test configuration is unmarshalled.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws ServiceTestExceptionEntry point into service tester via the commandline, executesexecute(String[]).- Parameters:
args- service tester arguments- Throws:
ServiceTestException- wrapping any exception
-
execute
public void execute(java.lang.String[] args) throws ServiceTestExceptionPasses arguments usingcheckAndSetArguments(String[])and executesexecute(File, File).- Parameters:
args- service tester arguments- Throws:
ServiceTestException- wrapping any exception
-
execute
public void execute(java.io.File input, java.io.File outputDirectory) throws ServiceTestExceptionReads contents of input and executesexecute(String)using output directory with the returned resultsJUnitReportTestResults.writeReports(File)- Parameters:
input- File location of service test configuration.outputDirectory- File location of output directory.- Throws:
ServiceTestException- wrapping any exception
-
execute
public JUnitReportTestResults execute(java.lang.String text) throws ServiceTestException
Unmarshalls input toServiceTestusingAdaptrisMarshallerexecutesexecute(ServiceTest)returningJUnitReportTestResults- Parameters:
text- Test configuration- Returns:
- Test results in
JUnitReportTestResults - Throws:
ServiceTestException- wrapping any exception
-
execute
public JUnitReportTestResults execute(java.lang.String text, java.io.File workingDirectory) throws ServiceTestException
Unmarshalls input toServiceTestusingAdaptrisMarshallerexecutesexecute(ServiceTest)returningJUnitReportTestResults- Parameters:
text- Test configurationworkingDirectory- The working directory- Returns:
- Test results in
JUnitReportTestResults - Throws:
ServiceTestException- wrapping any exception
-
execute
public JUnitReportTestResults execute(ServiceTest serviceTest) throws ServiceTestException
ExecutesServiceTestconfiguration returningJUnitReportTestResults- Parameters:
serviceTest- Test configuration- Returns:
- Test results in
JUnitReportTestResults - Throws:
ServiceTestException- wrapping any exception
-
setPreProcessors
public void setPreProcessors(java.lang.String preProcessors)
Sets Pre-Processors to be when service test configuration is unmarshalled.- Parameters:
preProcessors- Pre-processors for service test configuration
-
getPreProcessors
public java.lang.String getPreProcessors()
Gets Pre-Processors to be when service test configuration is unmarshalled.- Returns:
- Pre-processors for service test configuration
-
setInputFilePath
public void setInputFilePath(java.lang.String inputFilePath)
Sets test configuration path- Parameters:
inputFilePath- Test configuration path
-
getInputFilePath
public java.lang.String getInputFilePath()
Gets test configuration path- Returns:
- Test configuration path
-
setOutputFilePath
public void setOutputFilePath(java.lang.String outputFilePath)
Sets output directory for test results- Parameters:
outputFilePath- Output directory for test results
-
getOutputFilePath
public java.lang.String getOutputFilePath()
Gets output directory for test results- Returns:
- Output directory for test results (default: test-results)
-
-