-
Hi there! Does anyone know how to output (e.g., echo, printf, etc.) to the console while tests are running? I have a custom error message that triggers during tearDown -> hasFailed, which prints a detailed error message if a test fails. However, after migrating from brianium/paratest version 3 to version 6, my error message has gone silent. It still works fine in PHPUnit, but not in Paratest. Does anyone know a solution to enable message output while Paratest is running? protected function tearDown(): void
{
if ($this->hasFailed() && $this->lastServiceStatus !== null) {
printf(
PHP_EOL . 'Last query service status from test: "%s" (%s)' . PHP_EOL . '%s' . PHP_EOL . PHP_EOL,
$this->getName(),
$this->getStatusName($this->getStatus()),
json_encode($this->lastServiceStatus, JSON_PRETTY_PRINT)
);
}
parent::tearDown();
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is not feasible in ParaTest currently because the concept of "is running" is not linear but rather multi-dimensional. I suggest you to rely on more precise or custom assertions. |
Beta Was this translation helpful? Give feedback.
This is not feasible in ParaTest currently because the concept of "is running" is not linear but rather multi-dimensional.
This means that, except for blocking errors, the
STDOUT
andSTDERR
or sub-processes are ignored by design.I suggest you to rely on more precise or custom assertions.