/** * Launch test Suite * * @return Void */ public function run() { if ($this->_user) { exec('rspec ' . $this->_testSuiteFile . ' -r rspec_junit_formatter --format RspecJunitFormatter ', $output); $resultManager = new ResultManager($this->_user); $testSuite = file_get_contents($this->_testSuiteFile); $resultManager->logNewResult($output, $this->name, $testSuite); $testCases = $this->getTestCases(); //do not loop on dependencies foreach ($testCases as $key => $tcName) { $resultManager->prepareTestCaseResult($tcName, $output, $this->name); } return true; } return false; }
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with FireOpal. If not, see <http://www.gnu.org/licenses/>. */ ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . dirname(__DIR__) . DIRECTORY_SEPARATOR . 'include'); require_once 'ResultManager.class.php'; require_once 'common/User.class.php'; if (!isset($_SESSION)) { session_start(); } if (isset($_SESSION['sess_idUser'])) { $user = new user(); $user->loadFromId($_SESSION['sess_idUser']); $resultManager = new ResultManager($user); if (!empty($_REQUEST)) { if (isset($_REQUEST['delete_result']) && !empty($_REQUEST['delete_result'])) { $resultManager->deleteResult($_REQUEST['delete_result']); } if (isset($_REQUEST['download_result']) && !empty($_REQUEST['download_result'])) { $resultManager->downloadResult($_REQUEST['download_result']); } if (isset($_REQUEST['download_testsuite']) && !empty($_REQUEST['download_testsuite'])) { $resultManager->downloadTestSuite($_REQUEST['download_testsuite']); } } $content = $resultManager->displayResults(); } else { $content = 'You must be logged in to access to this page'; }