Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ curl -v http://127.0.0.1:49152/wait-completion?testRunId=${{ env.TMS_TEST_RUN_ID

# 🚀 Warning
Since 2.2.0 version:
- If value from @WorkItemIds annotation not found in TMS then test result will NOT be uploaded.
- If value from @WorkItemId annotation not found in TMS then test result will NOT be uploaded.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=4.2.0
version=4.2.1

org.gradle.daemon=true
org.gradle.parallel=true
Expand Down
8 changes: 5 additions & 3 deletions testit-adapter-cucumber4/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ $ maven test -DtmsTestRunId=6d4ac4b7-dd67-4805-b879-18da0b89d4a8 -DtmsAdapterMod
Use tags to specify information about autotest.

Description of tags:
- `WorkItemIds` - a method that links autotests with manual tests. Receives the array of manual tests' IDs
- `WorkItemId` - a method that links an autotest with a manual test. Receives a single globalId
- `WorkItemIds` - deprecated, use `WorkItemId` instead
- `DisplayName` - internal autotest name (used in Test IT)
- `ExternalId` - unique internal autotest ID (used in Test IT)
- `Title` - autotest name specified in the autotest card. If not specified, the name from the displayName method is used
Expand All @@ -327,7 +328,8 @@ Description of methods:
- `Adapter.addLinks` - add links to the autotest result.
- `Adapter.addAttachments` - add attachments to the autotest result.
- `Adapter.addMessage` - add message to the autotest result.
- `Adapter.addWorkItemIds` - a dynamic method that links autotests with manual tests. Receives the array of manual tests' IDs
- `Adapter.addWorkItemId` - a dynamic method that links an autotest with a manual test. Receives a single globalId
- `Adapter.addWorkItemIds` - deprecated, use `Adapter.addWorkItemId` instead
- `Adapter.addDisplayName` - a dynamic method for adding internal autotest name (used in Test IT)
- `Adapter.addExternalId` - a dynamic method for adding unique internal autotest ID (used in Test IT)
- `Adapter.addTitle` - a dynamic method for adding autotest name specified in the autotest card or the step. If not specified, the name from the displayName method is used
Expand Down Expand Up @@ -414,7 +416,7 @@ Feature: Sample

@ExternalId=with_all_annotations
@DisplayName=Test_with_all_annotations
@WorkItemIds=123
@WorkItemId=123
@Title=Title_in_the_autotest_card
@Description=Test_with_all_annotations
@Tags=Tag1,Tag2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ public class TagParser {
private static final String TAGS = "@TAGS";
private static final String LINKS = "@LINKS";
private static final String WORK_ITEM_IDS = "@WORKITEMIDS";
private static final String WORK_ITEM_ID = "@WORKITEMID";
private static final String LAYER = "@LAYER";

private final List<Label> labelList = new ArrayList<>();
private final List<String> tagList = new ArrayList<>();
private final List<LinkItem> linkItemList = new ArrayList<>();
private final List<String> workItemIdList = new ArrayList<>();
private String workItemIdValue;
private String externalIdValue = "";
private String titleValue = "";
private String displayNameValue = "";
Expand Down Expand Up @@ -80,7 +82,11 @@ public class TagParser {
getScenarioLinks().addAll(getLinkItems(tagValue));
}
break;
case WORK_ITEM_ID:
workItemIdValue = Utils.setParameters(parseSpaceInTag(tagValue), parameters);
break;
case WORK_ITEM_IDS:
Utils.warnDeprecated("WorkItemIds", "WorkItemId");
Arrays.stream(Utils.setParameters(parseSpaceInTag(tagValue), parameters).split(TAG_VALUE_DELIMITER))
.forEach(id -> getWorkItemIdList().add(id));
break;
Expand All @@ -93,6 +99,11 @@ public class TagParser {
}
}

if (workItemIdValue != null && !workItemIdValue.isEmpty()) {
workItemIdList.clear();
workItemIdList.add(workItemIdValue);
}

final String featureName = feature.getName();
final String name = scenario.getName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: SampleFailed

@ExternalId=failed_with_all_annotations
@DisplayName=Failed_test_with_all_annotations
@WorkItemIds=123
@WorkItemId=123
@Title=Title_in_the_autotest_card
@Description=Test_with_all_annotations
@Labels=Tag1,Tag2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: Sample

@ExternalId=with_all_annotations
@DisplayName=Test_with_all_annotations
@WorkItemIds=123
@WorkItemId=123
@Title=Title_in_the_autotest_card
@Description=Test_with_all_annotations
@Labels=Tag1,Tag2
Expand Down
8 changes: 5 additions & 3 deletions testit-adapter-cucumber5/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ $ maven test -DtmsTestRunId=6d4ac4b7-dd67-4805-b879-18da0b89d4a8 -DtmsAdapterMod
Use tags to specify information about autotest.

Description of tags:
- `WorkItemIds` - a method that links autotests with manual tests. Receives the array of manual tests' IDs
- `WorkItemId` - a method that links an autotest with a manual test. Receives a single globalId
- `WorkItemIds` - deprecated, use `WorkItemId` instead
- `DisplayName` - internal autotest name (used in Test IT)
- `ExternalId` - unique internal autotest ID (used in Test IT)
- `Title` - autotest name specified in the autotest card. If not specified, the name from the displayName method is used
Expand All @@ -447,7 +448,8 @@ Description of methods:
- `Adapter.addLinks` - add links to the autotest result.
- `Adapter.addAttachments` - add attachments to the autotest result.
- `Adapter.addMessage` - add message to the autotest result.
- `Adapter.addWorkItemIds` - a dynamic method that links autotests with manual tests. Receives the array of manual tests' IDs
- `Adapter.addWorkItemId` - a dynamic method that links an autotest with a manual test. Receives a single globalId
- `Adapter.addWorkItemIds` - deprecated, use `Adapter.addWorkItemId` instead
- `Adapter.addDisplayName` - a dynamic method for adding internal autotest name (used in Test IT)
- `Adapter.addExternalId` - a dynamic method for adding unique internal autotest ID (used in Test IT)
- `Adapter.addTitle` - a dynamic method for adding autotest name specified in the autotest card or the step. If not specified, the name from the displayName method is used
Expand Down Expand Up @@ -534,7 +536,7 @@ Feature: Sample

@ExternalId=with_all_annotations
@DisplayName=Test_with_all_annotations
@WorkItemIds=123
@WorkItemId=123
@Title=Title_in_the_autotest_card
@Description=Test_with_all_annotations
@Tags=Tag1,Tag2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ public class TagParser {
private static final String TAGS = "@TAGS";
private static final String LINKS = "@LINKS";
private static final String WORK_ITEM_IDS = "@WORKITEMIDS";
private static final String WORK_ITEM_ID = "@WORKITEMID";
private static final String LAYER = "@LAYER";

private final List<Label> labelList = new ArrayList<>();
private final List<String> tagList = new ArrayList<>();
private final List<LinkItem> linkItemList = new ArrayList<>();
private final List<String> workItemIdList = new ArrayList<>();
private String workItemIdValue;
private String externalIdValue = "";
private String titleValue = "";
private String displayNameValue = "";
Expand Down Expand Up @@ -78,7 +80,11 @@ public class TagParser {
getScenarioLinks().addAll(getLinkItems(tagValue));
}
break;
case WORK_ITEM_ID:
workItemIdValue = Utils.setParameters(parseSpaceInTag(tagValue), parameters);
break;
case WORK_ITEM_IDS:
Utils.warnDeprecated("WorkItemIds", "WorkItemId");
Arrays.stream(Utils.setParameters(parseSpaceInTag(tagValue), parameters).split(TAG_VALUE_DELIMITER))
.forEach(id -> getWorkItemIdList().add(id));
break;
Expand All @@ -91,6 +97,11 @@ public class TagParser {
}
}

if (workItemIdValue != null && !workItemIdValue.isEmpty()) {
workItemIdList.clear();
workItemIdList.add(workItemIdValue);
}

final String featureName = feature.getName();
final String name = scenario.getName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: SampleFailed

@ExternalId=failed_with_all_annotations
@DisplayName=Failed_test_with_all_annotations
@WorkItemIds=123
@WorkItemId=123
@Title=Title_in_the_autotest_card
@Description=Test_with_all_annotations
@Labels=Tag1,Tag2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: Sample

@ExternalId=with_all_annotations
@DisplayName=Test_with_all_annotations
@WorkItemIds=123
@WorkItemId=123
@Title=Title_in_the_autotest_card
@Description=Test_with_all_annotations
@Labels=Tag1,Tag2
Expand Down
8 changes: 5 additions & 3 deletions testit-adapter-cucumber6/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ $ maven test -DtmsTestRunId=6d4ac4b7-dd67-4805-b879-18da0b89d4a8 -DtmsAdapterMod
Use tags to specify information about autotest.

Description of tags:
- `WorkItemIds` - a method that links autotests with manual tests. Receives the array of manual tests' IDs
- `WorkItemId` - a method that links an autotest with a manual test. Receives a single globalId
- `WorkItemIds` - deprecated, use `WorkItemId` instead
- `DisplayName` - internal autotest name (used in Test IT)
- `ExternalId` - unique internal autotest ID (used in Test IT)
- `Title` - autotest name specified in the autotest card. If not specified, the name from the displayName method is used
Expand All @@ -440,7 +441,8 @@ Description of methods:
- `Adapter.addLinks` - add links to the autotest result.
- `Adapter.addAttachments` - add attachments to the autotest result.
- `Adapter.addMessage` - add message to the autotest result.
- `Adapter.addWorkItemIds` - a dynamic method that links autotests with manual tests. Receives the array of manual tests' IDs
- `Adapter.addWorkItemId` - a dynamic method that links an autotest with a manual test. Receives a single globalId
- `Adapter.addWorkItemIds` - deprecated, use `Adapter.addWorkItemId` instead
- `Adapter.addDisplayName` - a dynamic method for adding internal autotest name (used in Test IT)
- `Adapter.addExternalId` - a dynamic method for adding unique internal autotest ID (used in Test IT)
- `Adapter.addTitle` - a dynamic method for adding autotest name specified in the autotest card or the step. If not specified, the name from the displayName method is used
Expand Down Expand Up @@ -527,7 +529,7 @@ Feature: Sample

@ExternalId=with_all_annotations
@DisplayName=Test_with_all_annotations
@WorkItemIds=123
@WorkItemId=123
@Title=Title_in_the_autotest_card
@Description=Test_with_all_annotations
@Tags=Tag1,Tag2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ public class TagParser {
private static final String TAGS = "@TAGS";
private static final String LINKS = "@LINKS";
private static final String WORK_ITEM_IDS = "@WORKITEMIDS";
private static final String WORK_ITEM_ID = "@WORKITEMID";
private static final String LAYER = "@LAYER";

private final List<Label> labelList = new ArrayList<>();
private final List<String> tagList = new ArrayList<>();
private final List<LinkItem> linkItemList = new ArrayList<>();
private final List<String> workItemIdList = new ArrayList<>();
private String workItemIdValue;
private String externalIdValue = "";
private String titleValue = "";
private String displayNameValue = "";
Expand Down Expand Up @@ -77,7 +79,11 @@ public class TagParser {
getScenarioLinks().addAll(getLinkItems(tagValue));
}
break;
case WORK_ITEM_ID:
workItemIdValue = Utils.setParameters(parseSpaceInTag(tagValue), parameters);
break;
case WORK_ITEM_IDS:
Utils.warnDeprecated("WorkItemIds", "WorkItemId");
Arrays.stream(Utils.setParameters(parseSpaceInTag(tagValue), parameters).split(TAG_VALUE_DELIMITER))
.forEach(id -> getWorkItemIdList().add(id));
break;
Expand All @@ -90,6 +96,11 @@ public class TagParser {
}
}

if (workItemIdValue != null && !workItemIdValue.isEmpty()) {
workItemIdList.clear();
workItemIdList.add(workItemIdValue);
}

final String featureName = feature.getName();
final String name = scenario.getName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: SampleFailed

@ExternalId=failed_with_all_annotations
@DisplayName=Failed_test_with_all_annotations
@WorkItemIds=123
@WorkItemId=123
@Title=Title_in_the_autotest_card
@Description=Test_with_all_annotations
@Labels=Tag1,Tag2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: Sample

@ExternalId=with_all_annotations
@DisplayName=Test_with_all_annotations
@WorkItemIds=123
@WorkItemId=123
@Title=Title_in_the_autotest_card
@Description=Test_with_all_annotations
@Labels=Tag1,Tag2
Expand Down
8 changes: 5 additions & 3 deletions testit-adapter-cucumber7/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ $ maven test -DtmsTestRunId=6d4ac4b7-dd67-4805-b879-18da0b89d4a8 -DtmsAdapterMod
Use tags to specify information about autotest.

Description of tags:
- `WorkItemIds` - a method that links autotests with manual tests. Receives the array of manual tests' IDs
- `WorkItemId` - a method that links an autotest with a manual test. Receives a single globalId
- `WorkItemIds` - deprecated, use `WorkItemId` instead
- `DisplayName` - internal autotest name (used in Test IT)
- `ExternalId` - unique internal autotest ID (used in Test IT)
- `Title` - autotest name specified in the autotest card. If not specified, the name from the displayName method is used
Expand All @@ -452,7 +453,8 @@ Description of methods:
- `Adapter.addLinks` - add links to the autotest result.
- `Adapter.addAttachments` - add attachments to the autotest result.
- `Adapter.addMessage` - add message to the autotest result.
- `Adapter.addWorkItemIds` - a dynamic method that links autotests with manual tests. Receives the array of manual tests' IDs
- `Adapter.addWorkItemId` - a dynamic method that links an autotest with a manual test. Receives a single globalId
- `Adapter.addWorkItemIds` - deprecated, use `Adapter.addWorkItemId` instead
- `Adapter.addDisplayName` - a dynamic method for adding internal autotest name (used in Test IT)
- `Adapter.addExternalId` - a dynamic method for adding unique internal autotest ID (used in Test IT)
- `Adapter.addTitle` - a dynamic method for adding autotest name specified in the autotest card or the step. If not specified, the name from the displayName method is used
Expand Down Expand Up @@ -539,7 +541,7 @@ Feature: Sample

@ExternalId=with_all_annotations
@DisplayName=Test_with_all_annotations
@WorkItemIds=123
@WorkItemId=123
@Title=Title_in_the_autotest_card
@Description=Test_with_all_annotations
@Tags=Tag1,Tag2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class TagParser {
private static final String TAGS = "@TAGS";
private static final String LINKS = "@LINKS";
private static final String WORK_ITEM_IDS = "@WORKITEMIDS";
private static final String WORK_ITEM_ID = "@WORKITEMID";
private static final String LAYER = "@LAYER";
private static final String NAMESPACE = "@NAMESPACE";
private static final String CLASS_NAME = "@CLASSNAME";
Expand All @@ -31,6 +32,7 @@ public class TagParser {
private final List<String> tagList = new ArrayList<>();
private final List<LinkItem> linkItemList = new ArrayList<>();
private final List<String> workItemIdList = new ArrayList<>();
private String workItemIdValue;
private String externalIdValue = "";
private String titleValue = "";
private String displayNameValue = "";
Expand Down Expand Up @@ -90,7 +92,11 @@ public class TagParser {
getScenarioLinks().addAll(getLinkItems(tagValue));
}
break;
case WORK_ITEM_ID:
workItemIdValue = Utils.setParameters(parseSpaceInTag(tagValue), parameters);
break;
case WORK_ITEM_IDS:
Utils.warnDeprecated("WorkItemIds", "WorkItemId");
Arrays.stream(Utils.setParameters(parseSpaceInTag(tagValue), parameters).split(TAG_VALUE_DELIMITER))
.forEach(id -> getWorkItemIdList().add(id));
break;
Expand All @@ -103,6 +109,11 @@ public class TagParser {
}
}

if (workItemIdValue != null && !workItemIdValue.isEmpty()) {
workItemIdList.clear();
workItemIdList.add(workItemIdValue);
}

final String featureName = feature.getName();
final String name = scenario.getName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: SampleFailed

@ExternalId=failed_with_all_annotations
@DisplayName=Failed_test_with_all_annotations
@WorkItemIds=123
@WorkItemId=123
@Title=Title_in_the_autotest_card
@Description=Test_with_all_annotations
@Labels=Tag1,Tag2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: Sample

@ExternalId=with_all_annotations
@DisplayName=Test_with_all_annotations
@WorkItemIds=123
@WorkItemId=123
@Title=Title_in_the_autotest_card
@Description=Test_with_all_annotations
@Labels=Tag1,Tag2
Expand Down
8 changes: 5 additions & 3 deletions testit-adapter-jbehave/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ If you want to add attachment for a failed test then see [How to add an attachme
Use tags to specify information about autotest.

Description of tags:
- `WorkItemIds` - a method that links autotests with manual tests. Receives the array of manual tests' IDs
- `WorkItemId` - a method that links an autotest with a manual test. Receives a single globalId
- `WorkItemIds` - deprecated, use `WorkItemId` instead
- `DisplayName` - internal autotest name (used in Test IT)
- `ExternalId` - unique internal autotest ID (used in Test IT)
- `Title` - autotest name specified in the autotest card. If not specified, the name from the displayName method is used
Expand All @@ -337,7 +338,8 @@ Description of methods:
- `Adapter.addLinks` - add links to the autotest result.
- `Adapter.addAttachments` - add attachments to the autotest result.
- `Adapter.addMessage` - add message to the autotest result.
- `Adapter.addWorkItemIds` - a dynamic method that links autotests with manual tests. Receives the array of manual tests' IDs
- `Adapter.addWorkItemId` - a dynamic method that links an autotest with a manual test. Receives a single globalId
- `Adapter.addWorkItemIds` - deprecated, use `Adapter.addWorkItemId` instead
- `Adapter.addDisplayName` - a dynamic method for adding internal autotest name (used in Test IT)
- `Adapter.addExternalId` - a dynamic method for adding unique internal autotest ID (used in Test IT)
- `Adapter.addTitle` - a dynamic method for adding autotest name specified in the autotest card or the step. If not specified, the name from the displayName method is used
Expand Down Expand Up @@ -397,7 +399,7 @@ Scenario: Add a to b
Meta:
@ExternalId failed_with_all_annotations
@DisplayName Failed_test_with_all_annotations
@WorkItemIds 123
@WorkItemId 123
@Title Title_in_the_autotest_card
@Description Test_with_all_annotations
@Tags Tag1,Tag2
Expand Down
Loading
Loading