Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Adding Url from site in failed tests

#1

Can I add Url from the site to my comment if my auto test failed? If yes, how?

private function report(array $cases_ids, $assigned_to, $message = '')
{
$run_id = self::$run['id'];
foreach ($cases_ids as $case_id) {
    self::$testRailAPIClient->send_post(
        "add_result_for_case/{$run_id}/{$case_id}",
        [
            'status_id' => $message ? self::FAILED : self::PASSED,
            'comment' => $message ?: 'This test worked fine!',
            'version' => '1',
            'elapsed' => '0m 1s', //$this->getTestResultObject()->time(),
            'defects' => 'BRDX-145',
            'assignedto_id' => $assigned_to
        ]
    );
}
$this->message = '';
}
0 Likes