Skip to content

MQE-2008: Filter test generation and execution by severity #605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 27, 2020
Merged
Prev Previous commit
Next Next commit
MQE-2008: Filter test generation and execution by severity
  • Loading branch information
okolesnyk committed Feb 27, 2020
commit 75f5224674f629b44fe47b24f5536ed9c030c0d5
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class BaseGenerateCommand extends Command
*
* @var SymfonyStyle
*/
private $ioStyle = null;
protected $ioStyle = null;

/**
* Configures the base command.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$ioStyle = new SymfonyStyle($input, $output);
$this->setOutputStyle($input, $output);
$tests = $input->getArgument('name');
$config = $input->getOption('config');
$json = $input->getOption('tests'); // for backward compatibility
Expand All @@ -103,7 +103,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$filterList ?? []
);
} catch (\Exception $exception) {
$ioStyle->error("Test generation failed." . PHP_EOL . $exception->getMessage());
$this->ioStyle->error("Test generation failed." . PHP_EOL . $exception->getMessage());
return 1;
}

Expand Down Expand Up @@ -151,7 +151,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$message .= !empty($filters) ? 'Filter(s): ' . implode(', ', $filters) . PHP_EOL : '';
$message .= !empty($tests) ? 'Test name(s): ' . implode(', ', $tests) . PHP_EOL : '';
$message .= !empty($json) && empty($tests) ? 'Test configuration: ' . $json . PHP_EOL : '';
$ioStyle->note($message);
$this->ioStyle->note($message);

return 1;
}
Expand Down