Skip to content

Commit b67a8aa

Browse files
Add test tags in functional tests (#183)
To be able to run each test scenario individually tags were added to test scenarios
1 parent 842119d commit b67a8aa

File tree

6 files changed

+21
-12
lines changed

6 files changed

+21
-12
lines changed

src/functionaltests/java/com/ericsson/ei/subscriptions/repeatHandler/SubscriptionRepeatHandlerSteps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public class SubscriptionRepeatHandlerSteps extends FunctionalTestBase {
7777
@Autowired
7878
private RunSubscription runSubscription;
7979

80-
@Before("@SubscriptionRepeatHandler")
80+
@Before("@SubscriptionRepeatTrue, @SubscriptionRepeatFalse")
8181
public void beforeScenario() throws IOException, JSONException {
8282
assertTrue(mongoDBHandler.insertDocument(dataBaseName, collectionName,
8383
eventManager.getJSONFromFile(AGGREGATED_OBJECT_FILE_PATH).toString()));

src/functionaltests/resources/features/queryAggregatedObjects.feature

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@tag
33
Feature: QueryAggregatedObjectsTestSteps
44

5+
@QueryAggregatedObjectsTestSteps
56
Scenario: Test QueryAggregatedObjectsTestSteps
67
Given Aggregated object is created
78
And Missed Notification object is created
@@ -14,6 +15,7 @@ Feature: QueryAggregatedObjectsTestSteps
1415
And Perform a query on created Aggregated object with filter
1516
And Perform a query and filter with part of path
1617

18+
@QueryConfidenceLevelModified
1719
Scenario: Test QueryConfidenceLevelModified
1820
Given Aggregated object is created
1921
Then perform query to retrieve and filter out confidence level information

src/functionaltests/resources/features/ruleCheck.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,36 @@
1919
@tag
2020
Feature: Test Rules Checker
2121

22-
@tag1
22+
@ExecuteRuleSingle
2323
Scenario: Execute JMESPath rule on JSON object
2424
Given file with JMESPath rules "/ExtractionRule.txt" and file with events "/EiffelArtifactCreatedEvent.json"
2525
When make a POST request to the REST API "/rules/rule-check" with a single rule
2626
Then get response code of 200
2727
And get content "/ExtractedContent.json"
2828

29-
#@tag2
29+
@ExecuteRuleMultiple
3030
Scenario: Execute list of JMESPath rules on list of JSON objects
3131
Given rules checking is enabled
3232
And file with JMESPath rules "/AggregateListRules.json" and file with events "/AggregateListEvents.json"
3333
When make a POST request to the REST API "/rules/rule-check/aggregation"
3434
Then get response code of 200
3535
And get content "/AggregateResultObject.json"
3636

37-
#@tag3
37+
@ExecuteIncorrectRule
3838
Scenario: Execute incorrect list of JMESPath rules on list of JSON objects
3939
Given rules checking is enabled
4040
And file with JMESPath rules "/AggregateListRules.json" and file with events "/subscription_single.json"
4141
When make a POST request to the REST API "/rules/rule-check/aggregation"
4242
Then get response code of 400
4343

44-
#@tag4
44+
@ExecuteRuleDisabled
4545
Scenario: Execute list of JMESPath rules on list of JSON objects, when rules checking is not enabled
4646
Given rules checking is not enabled
4747
And file with JMESPath rules "/AggregateListRules.json" and file with events "/AggregateListEvents.json"
4848
When make a POST request to the REST API "/rules/rule-check/aggregation"
4949
Then get response code of 503
5050

51-
#@tag5
51+
@RuleCheckStatus
5252
Scenario: Check status of test rule page using REST API
5353
When rules checking is enabled
5454
Then get request from REST API "/rules/rule-check/testRulePageEnabled" return response code of 200 and status as "true"

src/functionaltests/resources/features/subscriptionBulk.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,44 +18,51 @@
1818
#Sample Feature Definition Template
1919
Feature: Test Subscription Bulk Operations
2020

21+
@CreateSubscriptions
2122
Scenario: Create multiple subscriptions using REST API
2223
Given file with subscriptions "/subscriptions_multiple.json"
2324
When make a POST request with list of subscriptions to the subscription REST API "/subscriptions"
2425
Then get response code of 200
2526
And number of retrieved subscriptions using REST API "/subscriptions" is 3
2627
And retrieved subscriptions are same as given
2728

29+
@GetSubscriptions
2830
Scenario: Fetch multiple subscriptions using REST API, one subscription does not exist
2931
When make a GET request with list of subscriptions names "Subscription_Test_1,Subscription_Test_Not_Found,Subscription_Test_2" to the subscription REST API "/subscriptions"
3032
Then get response code of 200
3133
And get in response content 2 found subscriptions and not found subscription name "Subscription_Test_Not_Found"
3234

35+
@CreateWithDuplicate
3336
Scenario: Create multiple subscriptions using REST API, one subscription already exists
3437
Given file with subscriptions "/subscriptions_multiple_wrong.json"
3538
When make a POST request with list of subscriptions to the subscription REST API "/subscriptions"
3639
Then get response code of 400
3740
And get in response content subscription "Subscription_Test_2"
3841
And number of retrieved subscriptions using REST API "/subscriptions" is 5
3942

43+
@DeleteSubscriptions
4044
Scenario: Delete multiple subscriptions using REST API
4145
When make a DELETE request with list of subscriptions names "Subscription_Test_4,Subscription_Test_5" to the subscription REST API "/subscriptions"
4246
Then get response code of 200
4347
And number of retrieved subscriptions using REST API "/subscriptions" is 3
4448

49+
@UpdateSubscriptions
4550
Scenario: Update multiple subscriptions using REST API
4651
Given file with subscriptions "/subscriptions_multiple_updated.json"
4752
When make a PUT request with list of subscriptions to the subscription REST API "/subscriptions"
4853
Then get response code of 200
4954
And number of retrieved subscriptions using REST API "/subscriptions" is 3
5055
And retrieved subscriptions are same as given
5156

57+
@UpdateSubscriptionsNonExisting
5258
Scenario: Update multiple subscriptions using REST API, one subscription does not exist
5359
Given file with subscriptions "/subscriptions_multiple_wrong_updated.json"
5460
When make a PUT request with list of subscriptions to the subscription REST API "/subscriptions"
5561
Then get response code of 400
5662
And get in response content subscription "Subscription_Test_Not_Found"
5763
And number of retrieved subscriptions using REST API "/subscriptions" is 3
5864

65+
@DeleteSubscriptionsNonExisting
5966
Scenario: Delete multiple subscriptions using REST API, one subscription does not exist
6067
When make a DELETE request with list of subscriptions names "Subscription_Test_1,Subscription_Test_2,Subscription_Test_Not_Found,Subscription_Test_3" to the subscription REST API "/subscriptions"
6168
Then get response code of 400

src/functionaltests/resources/features/subscriptionCRUD.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,27 @@
1919
@tag
2020
Feature: Test Subscription CRUD
2121

22-
@tag1
22+
@RESTCreateSubscription
2323
Scenario: Create subscription with JSON object using REST API by POST method
2424
Given The REST API "/subscriptions" is up and running
2525
When I make a POST request with valid "JSON" to the subscription REST API "/subscriptions"
2626
Then I get response code of 200
2727

28-
#@tag2
28+
@RESTReadSubscription
2929
Scenario: Read subscription using REST API by GET method
3030
Given The REST API "/subscriptions" is up and running
3131
When I make a GET request with subscription name "Subscription_Test" to the subscription REST API "/subscriptions/"
3232
Then I get response code of 200
3333
And Subscription name is "Subscription_Test"
3434

35-
#@tag3
35+
@RESTUpdateSubscription
3636
Scenario: Update subscription using REST API by PUT method and validate updation
3737
Given The REST API "/subscriptions" is up and running
3838
When I make a PUT request with modified notificationType as "MAIL" to REST API "/subscriptions"
3939
Then I get response code of 200
4040
And I can validate modified notificationType "MAIL" with GET request at "/subscriptions/Subscription_Test"
4141

42-
#@tag4
42+
@RESTDeleteSubscription
4343
Scenario: Delete subscription using REST API by DELETE method and validate deletion
4444
Given The REST API "/subscriptions" is up and running
4545
When I make a DELETE request with subscription name "Subscription_Test" to the subscription REST API "/subscriptions/"

src/functionaltests/resources/features/subscriptionRepeatHandler.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
@tag
2020
Feature: Test Subscription Repeat Handler
2121

22-
@SubscriptionRepeatHandler
22+
@SubscriptionRepeatFalse
2323
Scenario: Subscription match the Aggragated Object one time
2424
Given Publish events on Message Bus
2525
When In MongoDb RepeatFlagHandler collection the subscription has matched the AggrObjectId
2626
Then I make a DELETE request with subscription name "Subscription_Test" to the subscription REST API "/subscriptions/"
2727
And Check in MongoDB RepeatFlagHandler collection that the subscription has been removed
2828

29-
@SubscriptionRepeatHandler
29+
@SubscriptionRepeatTrue
3030
Scenario: Subscription match the Aggragated Object at least two time
3131
Given Publish events on Message Bus
3232
When In MongoDb RepeatFlagHandler collection the subscription has matched the AggrObjectId at least two times

0 commit comments

Comments
 (0)