Skip to content

Commit 4f1dd85

Browse files
authored
Merge pull request #567 from lbajsarowicz/bugfix/544-missing-request-information
#544 Log Request sent even if Response failed
2 parents 5ac5683 + 8d6c5d5 commit 4f1dd85

File tree

1 file changed

+3
-2
lines changed
  • src/Magento/FunctionalTestingFramework/DataGenerator/Persist

1 file changed

+3
-2
lines changed

src/Magento/FunctionalTestingFramework/DataGenerator/Persist/CurlHandler.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ public function executeRequest($dependentEntities)
134134
false
135135
);
136136

137+
AllureHelper::addAttachmentToCurrentStep(json_encode($this->requestData, JSON_PRETTY_PRINT), 'Request Body');
138+
137139
if (($contentType === 'application/json') && ($authorization === 'adminOauth')) {
138140
$this->isJson = true;
139141
$executor = new WebapiExecutor($this->storeCode);
@@ -169,7 +171,6 @@ public function executeRequest($dependentEntities)
169171
$response = $executor->read($successRegex, $returnRegex, $returnIndex);
170172
$executor->close();
171173

172-
AllureHelper::addAttachmentToCurrentStep(json_encode($this->requestData, JSON_PRETTY_PRINT), 'Request Body');
173174
AllureHelper::addAttachmentToCurrentStep(
174175
json_encode(json_decode($response, true), JSON_PRETTY_PRINT+JSON_UNESCAPED_UNICODE+JSON_UNESCAPED_SLASHES),
175176
'Response Data'
@@ -229,7 +230,7 @@ private function resolveUrlReference($urlIn, $entityObjects)
229230
foreach ($entityObjects as $entityObject) {
230231
$param = null;
231232

232-
if ($paramEntityParent === "" || $entityObject->getType() == $paramEntityParent) {
233+
if ($paramEntityParent === "" || $entityObject->getType() === $paramEntityParent) {
233234
$param = $entityObject->getDataByName(
234235
$dataItem,
235236
EntityDataObject::CEST_UNIQUE_VALUE

0 commit comments

Comments
 (0)