Skip to content

Commit 6ac15c1

Browse files
committed
MQE-3122: Logging of failed test is not working when test fails in after section
1 parent 9570830 commit 6ac15c1

8 files changed

+20
-72
lines changed

dev/tests/verification/Resources/ActionGroupWithDataTest.txt

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,6 @@ class ActionGroupWithDataTestCest
3636
$I->comment("Exiting Action Group [beforeGroup] FunctionalActionGroup");
3737
}
3838

39-
/**
40-
* @param AcceptanceTester $I
41-
* @throws \Exception
42-
*/
43-
public function _after(AcceptanceTester $I)
44-
{
45-
if ($this->isSuccess) {
46-
unlink(__FILE__);
47-
}
48-
}
49-
5039
/**
5140
* @param AcceptanceTester $I
5241
* @throws \Exception
@@ -57,6 +46,9 @@ class ActionGroupWithDataTestCest
5746
$I->fillField("#foo", "myData1"); // stepKey: fillField1AfterGroup
5847
$I->fillField("#bar", "myData2"); // stepKey: fillField2AfterGroup
5948
$I->comment("Exiting Action Group [afterGroup] FunctionalActionGroup");
49+
if ($this->isSuccess) {
50+
unlink(__FILE__);
51+
}
6052
}
6153

6254
/**

dev/tests/verification/Resources/ExtendedActionGroupReturningValueTest.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ class ExtendedActionGroupReturningValueTestCest
2323
*/
2424
private $isSuccess = false;
2525

26+
/**
27+
* @param AcceptanceTester $I
28+
* @throws \Exception
29+
*/
30+
public function _after(AcceptanceTester $I)
31+
{
32+
if ($this->isSuccess) {
33+
unlink(__FILE__);
34+
}
35+
}
36+
2637
/**
2738
* @Severity(level = SeverityLevel::CRITICAL)
2839
* @Features({"TestModule"})

dev/tests/verification/Resources/ExtendingSkippedTest.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,6 @@ class ExtendingSkippedTestCest
2424
*/
2525
private $isSuccess = false;
2626

27-
/**
28-
* @param AcceptanceTester $I
29-
* @throws \Exception
30-
*/
31-
public function _after(AcceptanceTester $I)
32-
{
33-
if ($this->isSuccess) {
34-
unlink(__FILE__);
35-
}
36-
}
37-
3827
/**
3928
* @Severity(level = SeverityLevel::CRITICAL)
4029
* @Features({"TestModule"})

dev/tests/verification/Resources/MergeSkip.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,6 @@ class MergeSkipCest
2222
*/
2323
private $isSuccess = false;
2424

25-
/**
26-
* @param AcceptanceTester $I
27-
* @throws \Exception
28-
*/
29-
public function _after(AcceptanceTester $I)
30-
{
31-
if ($this->isSuccess) {
32-
unlink(__FILE__);
33-
}
34-
}
35-
3625
/**
3726
* @Features({"TestModule"})
3827
* @Parameter(name = "AcceptanceTester", value="$I")

dev/tests/verification/Resources/PersistedReplacementTest.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ class PersistedReplacementTestCest
2626
* @param AcceptanceTester $I
2727
* @throws \Exception
2828
*/
29-
public function _after(AcceptanceTester $I)
29+
public function _before(AcceptanceTester $I)
3030
{
31-
if ($this->isSuccess) {
32-
unlink(__FILE__);
33-
}
31+
$I->createEntity("createData1", "hook", "ReplacementPerson", [], []); // stepKey: createData1
3432
}
3533

3634
/**
3735
* @param AcceptanceTester $I
3836
* @throws \Exception
3937
*/
40-
public function _before(AcceptanceTester $I)
38+
public function _after(AcceptanceTester $I)
4139
{
42-
$I->createEntity("createData1", "hook", "ReplacementPerson", [], []); // stepKey: createData1
40+
if ($this->isSuccess) {
41+
unlink(__FILE__);
42+
}
4343
}
4444

4545
/**

dev/tests/verification/Resources/SkippedTest.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,6 @@ class SkippedTestCest
2323
*/
2424
private $isSuccess = false;
2525

26-
/**
27-
* @param AcceptanceTester $I
28-
* @throws \Exception
29-
*/
30-
public function _after(AcceptanceTester $I)
31-
{
32-
if ($this->isSuccess) {
33-
unlink(__FILE__);
34-
}
35-
}
36-
3726
/**
3827
* @Stories({"skipped"})
3928
* @Severity(level = SeverityLevel::MINOR)

dev/tests/verification/Resources/SkippedTestTwoIssues.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,6 @@ class SkippedTestTwoIssuesCest
2323
*/
2424
private $isSuccess = false;
2525

26-
/**
27-
* @param AcceptanceTester $I
28-
* @throws \Exception
29-
*/
30-
public function _after(AcceptanceTester $I)
31-
{
32-
if ($this->isSuccess) {
33-
unlink(__FILE__);
34-
}
35-
}
36-
3726
/**
3827
* @Stories({"skippedMultiple"})
3928
* @Severity(level = SeverityLevel::MINOR)

dev/tests/verification/Resources/SkippedTestWithHooks.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,6 @@ class SkippedTestWithHooksCest
2323
*/
2424
private $isSuccess = false;
2525

26-
/**
27-
* @param AcceptanceTester $I
28-
* @throws \Exception
29-
*/
30-
public function _after(AcceptanceTester $I)
31-
{
32-
if ($this->isSuccess) {
33-
unlink(__FILE__);
34-
}
35-
}
36-
3726
/**
3827
* @Stories({"skippedWithHooks"})
3928
* @Severity(level = SeverityLevel::MINOR)

0 commit comments

Comments
 (0)