Class JvmTestExecutor
java.lang.Object
org.ek9lang.cli.JvmTestExecutor
- All Implemented Interfaces:
TestExecutor
Executes JVM bytecode test programs in-process.
This executor uses BytecodeExecutor to run compiled EK9 bytecode
within the current JVM. This is significantly faster than spawning external
JVM processes for each test.
Thread-safe: multiple tests can be executed in parallel, each with independent output capture via thread-local PrintStreams.
-
Nested Class Summary
Nested classes/interfaces inherited from interface TestExecutor
TestExecutor.ExecutionResult -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(TestProgram test) Execute a test program and capture its output.execute(TestProgram test, List<String> arguments) Execute a test program with command line arguments.
-
Constructor Details
-
JvmTestExecutor
JvmTestExecutor(Path bytecodeDir) Create a JVM test executor.- Parameters:
bytecodeDir- Directory containing compiled .class files
-
-
Method Details
-
execute
Description copied from interface:TestExecutorExecute a test program and capture its output.- Specified by:
executein interfaceTestExecutor- Parameters:
test- The test program to execute- Returns:
- Execution result with captured output and status
-
execute
Description copied from interface:TestExecutorExecute a test program with command line arguments.Used for parameterized black-box tests where arguments are read from commandline_arg_*.txt files.
- Specified by:
executein interfaceTestExecutor- Parameters:
test- The test program to executearguments- Command line arguments to pass- Returns:
- Execution result with captured output and status
-