@@ -58,6 +58,7 @@ public final class ResultsUtils {
5858 public static final String ISSUE_LINK_TYPE = "issue" ;
5959 public static final String TMS_LINK_TYPE = "tms" ;
6060
61+ public static final String SUITE_LABEL_NAME = "suite" ;
6162 public static final String EPIC_LABEL_NAME = "epic" ;
6263 public static final String FEATURE_LABEL_NAME = "feature" ;
6364 public static final String STORY_LABEL_NAME = "story" ;
@@ -66,6 +67,9 @@ public final class ResultsUtils {
6667 public static final String OWNER_LABEL_NAME = "owner" ;
6768 public static final String HOST_LABEL_NAME = "host" ;
6869 public static final String THREAD_LABEL_NAME = "thread" ;
70+ public static final String TEST_METHOD_LABEL_NAME = "testMethod" ;
71+ public static final String TEST_CLASS_LABEL_NAME = "testClass" ;
72+ public static final String PACKAGE_LABEL_NAME = "package" ;
6973
7074 private static final Logger LOGGER = LoggerFactory .getLogger (ResultsUtils .class );
7175 private static final String ALLURE_DESCRIPTIONS_PACKAGE = "allureDescriptions/" ;
@@ -77,6 +81,22 @@ private ResultsUtils() {
7781 throw new IllegalStateException ("Do not instance" );
7882 }
7983
84+ public static Label createSuiteLabel (final String suite ) {
85+ return new Label ().setName (SUITE_LABEL_NAME ).setValue (suite );
86+ }
87+
88+ public static Label createTestMethodLabel (final String testMethod ) {
89+ return new Label ().setName (TEST_METHOD_LABEL_NAME ).setValue (testMethod );
90+ }
91+
92+ public static Label createTestClassLabel (final String testClass ) {
93+ return new Label ().setName (TEST_CLASS_LABEL_NAME ).setValue (testClass );
94+ }
95+
96+ public static Label createPackageLabel (final String packageName ) {
97+ return new Label ().setName (PACKAGE_LABEL_NAME ).setValue (packageName );
98+ }
99+
80100 public static Label createEpicLabel (final String epic ) {
81101 return new Label ().setName (EPIC_LABEL_NAME ).setValue (epic );
82102 }
@@ -301,6 +321,9 @@ public static void processDescription(final ClassLoader classLoader,
301321
302322 private static Optional <String > readResource (final ClassLoader classLoader , final String resourceName ) {
303323 try (InputStream is = classLoader .getResourceAsStream (resourceName )) {
324+ if (Objects .isNull (is )) {
325+ return Optional .empty ();
326+ }
304327 final byte [] bytes = IOUtils .toByteArray (is );
305328 return Optional .of (new String (bytes , StandardCharsets .UTF_8 ));
306329 } catch (IOException e ) {
0 commit comments