-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/java/com/epam/reportportal/annotations/Description.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright 2024 EPAM Systems | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.epam.reportportal.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* If put on a method or constructor, or class, overrides or set corresponding Test Item description on ReportPortal. | ||
* This annotation should be handled in priority to other mechanisms of existing test frameworks. | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE }) | ||
public @interface Description { | ||
|
||
/** | ||
* Test Item description as a simple String. | ||
* | ||
* @return new description for a Test Item | ||
*/ | ||
String value(); | ||
} |
38 changes: 38 additions & 0 deletions
38
src/main/java/com/epam/reportportal/annotations/DisplayName.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright 2024 EPAM Systems | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.epam.reportportal.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* If put on a method or constructor, or class, overrides corresponding Test Item name on ReportPortal. | ||
* This annotation should be handled in priority to other mechanisms of existing test frameworks. | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE }) | ||
public @interface DisplayName { | ||
|
||
/** | ||
* Test Item name as a simple String. | ||
* | ||
* @return new name for a Test Item | ||
*/ | ||
String value(); | ||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/com/epam/reportportal/annotations/TmsLink.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright 2024 EPAM Systems | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.epam.reportportal.annotations; | ||
|
||
/** | ||
* Add a link to a Test Case located in external Test Management System. | ||
* This annotation appends a hypertext link to a Test Case into the Test Item description. | ||
*/ | ||
public @interface TmsLink { | ||
|
||
/** | ||
* TMS ticket ID. | ||
* | ||
* @return ID as string | ||
*/ | ||
String value(); | ||
|
||
/** | ||
* Link text pattern, accepts 'tms_id' parameter. | ||
* | ||
* @return formatted link text | ||
*/ | ||
String linkTextPattern() default "TMS #{tms_id}"; | ||
|
||
/** | ||
* Link URL pattern, accepts 'tms_id' parameter. | ||
* | ||
* @return link to a TMS ticket | ||
*/ | ||
String urlPattern() default ""; | ||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/com/epam/reportportal/annotations/TmsLinks.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2024 EPAM Systems | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.epam.reportportal.annotations; | ||
|
||
import java.lang.annotation.*; | ||
|
||
/** | ||
* Gathering annotation for {@link TmsLink}/ | ||
*/ | ||
@Documented | ||
@Inherited | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE }) | ||
public @interface TmsLinks { | ||
TmsLink[] value(); | ||
} |