/** * After suite event. * * @param SuiteEvent $event * @AfterSuite */ public static function after_suite(SuiteEvent $event) { $browsermobproxy = new browsermobproxyclient(util::get_option('proxyurl')); $browsermobproxy->close_connection(); echo PHP_EOL . "Test plan has been generated under:" . PHP_EOL; echo " - " . util::get_final_testplan_path() . PHP_EOL; }
/** * Method for creating a new HAR file * * @param string $label optional label * * @return string */ public static function new_har($label = '') { $proxyurl = util::get_option('proxyurl'); $proxyport = util::get_option('proxyport'); $data = array("captureContent" => 'true', "initialPageRef" => $label, "captureHeaders" => 'true', "captureBinaryContent" => 'true'); $url = $proxyurl . "/proxy/" . $proxyport . "/har"; $response = self::curl_put($url, $data); return $response; }