Ask a Question

Accessing 'Gherkin' Keywords in the Test Logs (Looking for an urgent advice)

SOLVED
TestQA1
Contributor

Accessing 'Gherkin' Keywords in the Test Logs (Looking for an urgent advice)

Hi,

I need to access the 'When' in the test logs and add a picture to its 'Has Picture' column. 

The problem is that the picture I need to add will be captured further down in the 'When' statements (check line 6th in the log hierarchy, it captures the picture with Log.Picture) as it captures one of the test steps. Please check the attachment.

So once the picture has been captured in one of the steps, I need to add the picture to the 'When' (which is the second line in the log hierarchy).

This is something important as the reviewer just want to check the picture for the When entry and don't want to go inside to look at each test step.

 

Thanks very much!

 

3 REPLIES 3
Marsha_R
Community Hero

There's no way to go back and change a log line once it's been written. The only thing I can suggest is that you try to log the picture earlier, perhaps as the first step after the When.


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

Thank you for your reply. The picture is captured after performing some steps so logging it after When won't make a difference. I will try to find another solution.

Can you please also share if we can add some actions/functionality in Feature files' Gherkin keyword Scenario and When, then etc.? Like if I want to add a counter with each Gherkin step that increments with the sequence? Example Test Case 1,2 and so on...

Please add your new question as a new post on the forum. This makes the question and answer searchable for others looking for answers. Thanks!


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
cancel
Showing results for 
Search instead for 
Did you mean: