27
27
use Codeception \Event \SuiteEvent ;
28
28
use Codeception \Event \StepEvent ;
29
29
use Codeception \Event \TestEvent ;
30
+ use Magento \FunctionalTestingFramework \Util \Logger \LoggingUtil ;
30
31
31
32
/**
32
33
* Class MagentoAllureAdapter
@@ -62,6 +63,7 @@ class MagentoAllureAdapter extends AllureCodeception
62
63
private function getGroup ()
63
64
{
64
65
if ($ this ->options ['groups ' ] != null ) {
66
+ LoggingUtil::getInstance ()->getLogger ("Inside getGroup() --> : " . $ this ->options ['groups ' ][0 ]);
65
67
return $ this ->options ['groups ' ][0 ];
66
68
}
67
69
return null ;
@@ -79,7 +81,9 @@ public function suiteBefore(SuiteEvent $suiteEvent)
79
81
80
82
if ($ this ->getGroup () != null ) {
81
83
$ suite = $ suiteEvent ->getSuite ();
84
+ LoggingUtil::getInstance ()->getLogger ("Output of suite->getName() : " . $ suite ->getName ());
82
85
$ suiteName = ($ suite ->getName ()) . "\\" . $ this ->sanitizeGroupName ($ this ->getGroup ());
86
+ LoggingUtil::getInstance ()->getLogger ("Value of suiteName : " . $ suiteName );
83
87
84
88
call_user_func (\Closure::bind (
85
89
function () use ($ suite , $ suiteName ) {
@@ -110,9 +114,11 @@ private function sanitizeGroupName($group)
110
114
{
111
115
$ suiteNames = array_keys (SuiteObjectHandler::getInstance ()->getAllObjects ());
112
116
$ exactMatch = in_array ($ group , $ suiteNames );
117
+ LoggingUtil::getInstance ()->getLogger ("Inside sanitizeGroupName() " );
113
118
114
119
// if this is an existing suite name we dont' need to worry about changing it
115
120
if ($ exactMatch || strpos ($ group , "_ " ) === false ) {
121
+ LoggingUtil::getInstance ()->getLogger ("Inside sanitizeGroupName() --> exact match found or no _ found " );
116
122
return $ group ;
117
123
}
118
124
@@ -123,6 +129,7 @@ private function sanitizeGroupName($group)
123
129
124
130
// confirm our original name is one of the existing suite names otherwise just return the original group name
125
131
$ originalName = in_array ($ originalName , $ suiteNames ) ? $ originalName : $ group ;
132
+ LoggingUtil::getInstance ()->getLogger ("Inside sanitizeGroupName() --> Return original name: " . $ originalName );
126
133
return $ originalName ;
127
134
}
128
135
0 commit comments