/** * Run scenario and optionally write results to report file * * @param string $scenarioFile * @param Magento_Performance_Scenario_Arguments $scenarioArguments * @param string|null $reportFile Report file to write results to, NULL disables report creation * @return bool Whether handler was able to process scenario * * @todo Implement execution in concurrent threads defined by the "users" scenario argument */ public function run($scenarioFile, Magento_Performance_Scenario_Arguments $scenarioArguments, $reportFile = null) { if (pathinfo($scenarioFile, PATHINFO_EXTENSION) != 'php') { return false; } $reportRows = array(); for ($i = 0; $i < $scenarioArguments->getLoops(); $i++) { $oneReportRow = $this->_executeScenario($scenarioFile, $scenarioArguments); $reportRows[] = $oneReportRow; } if ($reportFile) { $this->_writeReport($reportRows, $reportFile); } $this->_verifyReport($reportRows); return true; }
public function testGetLoops() { $this->assertEquals(100, $this->_object->getLoops()); }