Skip to content

Commit e4678e6

Browse files
imeron2433tomreece
authored andcommitted
MQE-345: [DevOps] [Customizability] Create suite schema declaration and supporting interpretation
- add new sample suite file - add robo command to include suite generate
1 parent 4e6b098 commit e4678e6

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

dev/tests/acceptance/RoboFile.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,23 @@ function generateTests()
4343
$this->say("Generate Tests Command Run");
4444
}
4545

46+
/**
47+
* Generate a suite based on name(s) passed in as args
48+
*/
49+
function generateSuite(array $args)
50+
{
51+
if (empty($args)) {
52+
throw new Exception("Please provide suite name(s) after generate:suite command");
53+
}
54+
55+
require 'tests/functional/_bootstrap.php';
56+
$sg = \Magento\FunctionalTestingFramework\Suite\SuiteGenerator::getInstance();
57+
58+
foreach ($args as $arg) {
59+
$sg->generateSuite($arg);
60+
}
61+
}
62+
4663
/**
4764
* Run all Functional tests using the Chrome environment
4865
*/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Suite/etc/suiteSchema.xsd">
3+
<suite name="mySuite">
4+
<include>
5+
<group name="example"/>
6+
<cest test="PersistMultipleEntitiesTest" name="PersistMultipleEntitiesCest"/>
7+
<module name="SampleTests" file="SampleCest.xml"/>
8+
</include>
9+
<exclude>
10+
<group name="testGroup"/>
11+
</exclude>
12+
</suite>
13+
</config>

0 commit comments

Comments
 (0)