I want to integrate my functional test result with TestRail . Since test rail accept status update means whether the test is success or fail for integrating with it . But PHPunit functions like assertEqual, assertTrue, etc do not return any values. How can we do this?
public function testGetItem()
{
$this->specify("Verify the functionality of the method ", function ($itemId, $orgId, $expectedResult) {
$result = $this->itemRepository->getItemInfo($ItemId , $orgId);
//$this->assertEquals($expectedResult , $result)
$testRail=new TestRailIntegration();
if($this->assertEquals($expectedResult , $result)){
$testRail->postResultsToTestRail("34530","1");
} else{
$testRail->postResultsToTestRail("34530","");
}
//34530 is testrail id
}
when a test fails it does not go to the else condition.