Presently I'm running API scenarios part of the Web scenario pack. When an API scenario fails (Eg. assert for a response status), I can see the screenshot of the browser attached with the failure in the QAF report. The screenshot is taken from the open browser from another scenario. I have noticed this issue after upgrading from QAF version 3.0.0 to 3.0.1. Not sure whether it is QAF framework issue/bug or whether I'm doing something wrong here.
If it is a known QAF issue, any temporary hacks will be very helpful.
Below is the snippet of test-results JSON from QAF:
{
"message": "And I assert api response status code is \"200\"",
"type": "TestStepFail",
"screenshot": "../img/IQT25_61ae18f7ea70ae94a2fd4fff_API_SC_1fqpasxi7oxor25901.png",
"duration": 582,
"threshold": 0,
"subCheckPoints": [
{
"message": "Response Status\nExpected: <200>\n Actual: was <301>",
"type": "Fail",
"screenshot": "../img/IQT25_61ae18f7ea70ae94a2fd4fff_API_SC_wd7gsvcac7ov25900.png",
"duration": 0,
"threshold": 0,
"subCheckPoints": []
},
{
"message": "Response Status",
"type": "Fail",
"screenshot": null,
"duration": 0,
"threshold": 0,
"subCheckPoints": []
}
]
}