Skip to content

Commit d4984c5

Browse files
committed
MTA-1284: Implement mechanism of cleaning up all data after scenario execution
- CR Changes
1 parent c0202a3 commit d4984c5

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* Added mechanism of cleaning up all data after scenario execution
1+
* Added mechanism of cleaning up data in steps after scenario execution
22

33
1.0.0-rc.23
44
=============

Magento/Mtf/TestCase/Scenario.php

+5-7
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ protected function executeScenario()
5656
$config[$testCaseName]['step'],
5757
$config[$testCaseName]['firstStep']
5858
);
59-
/** @var \Magento\Mtf\Util\Iterator\Step $stepIterator */
6059
$this->stepIterator = $this->objectManager->create(
6160
'Magento\Mtf\Util\Iterator\Step',
6261
[
@@ -71,18 +70,17 @@ protected function executeScenario()
7170
}
7271

7372
/**
74-
* Run with Variations Iterator
73+
* Execute test variation with cleaning up data in steps after scenario execution.
7574
*
7675
* @param \PHPUnit_Framework_TestResult $result
77-
* @return \PHPUnit_Framework_TestResult
76+
* @param array $variation
77+
* @return void
7878
*/
79-
public function run(\PHPUnit_Framework_TestResult $result = null)
79+
protected function executeTestVariation(\PHPUnit_Framework_TestResult $result, array $variation)
8080
{
81-
$result = parent::run($result);
81+
parent::executeTestVariation($result, $variation);
8282

8383
$this->runStepsCleanup();
84-
85-
return $result;
8684
}
8785

8886
/**

0 commit comments

Comments
 (0)