Skip to content

Commit 97f7a37

Browse files
committed
Merge remote-tracking branch 'origin/develop' into MQE-1676
2 parents 0331f7e + afcae2c commit 97f7a37

File tree

2 files changed

+31
-21
lines changed

2 files changed

+31
-21
lines changed

docs/extending.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ __Use case__: Create two similar tests with different `url` (`"{{AdminCategoryPa
2626
> Test with "extends":
2727
2828
```xml
29-
<tests >
29+
<tests>
3030
<test name="AdminCategoryTest">
3131
<annotations>
3232
...
@@ -47,7 +47,7 @@ __Use case__: Create two similar tests with different `url` (`"{{AdminCategoryPa
4747
> Test without "extends":
4848
4949
```xml
50-
<tests >
50+
<tests>
5151
<test name="AdminCategoryTest">
5252
<annotations>
5353
...
@@ -77,7 +77,7 @@ __Use case__: Create two similar tests where the second test contains two additi
7777
> Tests with "extends":
7878
7979
```xml
80-
<tests >
80+
<tests>
8181
<test name="LogInAsAdminTest">
8282
<amOnPage url="{{AdminLoginPage}}" stepKey="navigateToAdmin"/>
8383
<fillField selector="{{AdminLoginFormSection.username}}" userInput="admin" stepKey="fillUsername"/>
@@ -95,7 +95,7 @@ __Use case__: Create two similar tests where the second test contains two additi
9595
> Tests without "extends":
9696
9797
```xml
98-
<tests >
98+
<tests>
9999
<test name="LogInAsAdminTest">
100100
<amOnPage url="{{AdminLoginPage}}" stepKey="navigateToAdmin"/>
101101
<fillField selector="{{AdminLoginFormSection.username}}" userInput="admin" stepKey="fillUsername"/>
@@ -125,7 +125,7 @@ __Use case__: Create two similar tests where the second one contains two additio
125125
> Tests with "extends":
126126
127127
```xml
128-
<tests >
128+
<tests>
129129
<test name="LogInAsAdminTest">
130130
<before>
131131
<amOnPage url="{{AdminLoginPage}}" stepKey="navigateToAdmin"/>
@@ -147,7 +147,7 @@ __Use case__: Create two similar tests where the second one contains two additio
147147
> Tests without "extends":
148148
149149
```xml
150-
<tests >
150+
<tests>
151151
<test name="LogInAsAdminTest">
152152
<before>
153153
<amOnPage url="{{AdminLoginPage}}" stepKey="navigateToAdmin"/>
@@ -295,7 +295,7 @@ __Use case__: Create an entity named `DivPanelGreen`, which is similar to the `D
295295
> Entities with "extends":
296296
297297
```xml
298-
<entities >
298+
<entities>
299299
<entity name="DivPanel">
300300
<data key="divColor">Red</data>
301301
<data key="divSize">80px</data>
@@ -310,7 +310,7 @@ __Use case__: Create an entity named `DivPanelGreen`, which is similar to the `D
310310
> Entities without "extends":
311311
312312
```xml
313-
<entities >
313+
<entities>
314314
<entity name="DivPanel">
315315
<data key="divColor">Red</data>
316316
<data key="divSize">80px</data>
@@ -331,7 +331,7 @@ __Use case__: Create an entity named `DivPanelGreen`, which is similar to the `D
331331
> Entities with "extends":
332332
333333
```xml
334-
<entities >
334+
<entities>
335335
<entity name="DivPanel">
336336
<data key="divColor">Red</data>
337337
<data key="divSize">80px</data>
@@ -347,7 +347,7 @@ __Use case__: Create an entity named `DivPanelGreen`, which is similar to the `D
347347
> Entities without "extends":
348348
349349
```xml
350-
<entities >
350+
<entities>
351351
<entity name="DivPanel">
352352
<data key="divColor">Red</data>
353353
<data key="divSize">80px</data>

src/Magento/FunctionalTestingFramework/Console/RunTestGroupCommand.php

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,31 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9494
$command->run(new ArrayInput($args), $output);
9595
}
9696

97-
$codeceptionCommand = realpath(PROJECT_ROOT . '/vendor/bin/codecept') . ' run functional --verbose --steps';
97+
$commandString = realpath(PROJECT_ROOT . '/vendor/bin/codecept') . ' run functional --verbose --steps';
9898

99+
$exitCode = -1;
100+
$returnCodes = [];
99101
foreach ($groups as $group) {
100-
$codeceptionCommand .= " -g {$group}";
101-
}
102+
$codeceptionCommandString = $commandString . " -g {$group}";
103+
104+
$process = new Process($codeceptionCommandString);
105+
$process->setWorkingDirectory(TESTS_BP);
106+
$process->setIdleTimeout(600);
107+
$process->setTimeout(0);
102108

103-
$process = new Process($codeceptionCommand);
104-
$process->setWorkingDirectory(TESTS_BP);
105-
$process->setIdleTimeout(600);
106-
$process->setTimeout(0);
109+
$returnCodes[] = $process->run(
110+
function ($type, $buffer) use ($output) {
111+
$output->write($buffer);
112+
}
113+
);
114+
}
107115

108-
return $process->run(
109-
function ($type, $buffer) use ($output) {
110-
$output->write($buffer);
116+
foreach ($returnCodes as $returnCode) {
117+
if ($returnCode != 0) {
118+
return $returnCode;
111119
}
112-
);
120+
$exitCode = 0;
121+
}
122+
return $exitCode;
113123
}
114124
}

0 commit comments

Comments
 (0)