cancel
Showing results for 
Search instead for 
Did you mean: 

how to log the failure message s for individual test steps

Occasional Contributor

how to log the failure message s for individual test steps

While running a testsuites -test scase,how to log which test step is failing.

If its in a sequence,would like to register in which step it has failed.

Only the last execution's messages can be viewed.

2 REPLIES 2
Community Manager

Re: how to log the failure message s for individual test steps

Hi Siji,

 

You can try doing the following:

  1. Add the TestRunListener.afterStep event to your project. Please read the following article for more information: http://readyapi.smartbear.com/readyapi/events/start
  2. Add the following script code to the Edit window:
log.info(testStepResult.status);

It will post statuses of execution of each your test step to the test log.

 

Does this suggestion work for you?

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Occasional Contributor

Re: how to log the failure message s for individual test steps

Thanks for the reply.I am able to get the test status as OK or FAILED.

I am running tests in a loop,where the data gets loaded from a datasource(here excel sheet)

my test case has 5 steps,now i am able to log in the overall result as PASS or FAIL back to another excel sheet.

ie testcase description and status.

My issue is, I am not able to know,which test step has failed for that Test Case.

ie when a test step fails along wd other details it shd also get added to my result

Teststep description and corresponding error message.

New Here?
Join us and watch the welcome video:
Top Kudoed Authors