18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
How to get script status separately for multiple scripts?
Hi,
I am executing multiple sahi files, by including those files into another sahi file, in this way:
It is running fine, but script status is not coming out correctly. If all script tests went correct then there is no issue in script status, but suppose there are 10 files to be executed and if let say 5th test went failed and again from 6th to end these are correct, then _scriptStatus() returns "Failure" for all scripts, following 5th test script.
Is there any way, that I can log the result, as script are being executed.
Means if 1st to 4th tests are successful, then in Log File, it should write Successful for 1st to 4th. Then if 5th gets failed, only for 5th it should write Failure and again if following are being executed successfully, then for those tests, it should write successful.
Any help would be much appreciated.
I am executing multiple sahi files, by including those files into another sahi file, in this way:
_continueOnError();
switch($sahi_file)
{
case 'abc.sah':
_include("filepath\abc.sah");
ABC(); //function ABC is written over at above included file.
$overall_sahiscript_status = _scriptStatus();
_writeFile("SAHIRUNFILE_STATUS="+$overall_sahiscript_status,$ResultFile,true);
break;
case 'xyz.sah':
_include("filepath\xyz.sah");
XYZ(); //function XYZ is written over at above included file.
$overall_sahiscript_status = _scriptStatus();
_writeFile("SAHIRUNFILE_STATUS="+$overall_sahiscript_status,$ResultFile,true);
break;
}
It is running fine, but script status is not coming out correctly. If all script tests went correct then there is no issue in script status, but suppose there are 10 files to be executed and if let say 5th test went failed and again from 6th to end these are correct, then _scriptStatus() returns "Failure" for all scripts, following 5th test script.
Is there any way, that I can log the result, as script are being executed.
Means if 1st to 4th tests are successful, then in Log File, it should write Successful for 1st to 4th. Then if 5th gets failed, only for 5th it should write Failure and again if following are being executed successfully, then for those tests, it should write successful.
Any help would be much appreciated.
Comments
What exactly do you try to achive? If its just for writing that file, use a suite and include a writing function for onScriptEnd().
Does this help?
Regards
Wormi