Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geofencing feature file #181

Merged
merged 44 commits into from
Aug 30, 2024
Merged
Changes from 2 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
ddfc1d4
Geofencing feature file
mdomale Apr 8, 2024
95bd04b
Update Geofencing.feature
mdomale Apr 15, 2024
bb2df50
Update Geofencing.feature
mdomale Jul 19, 2024
a5221b1
Update Geofencing.feature
mdomale Jul 19, 2024
296c111
Update Geofencing.feature
mdomale Jul 19, 2024
7507571
Merge branch 'camaraproject:main' into Feature-file-Geofencing
mdomale Aug 12, 2024
7b39f8a
Update Geofencing.feature
mdomale Aug 12, 2024
de6e32c
Update Geofencing.feature
mdomale Aug 12, 2024
a3d58ba
Update Geofencing.feature
mdomale Aug 12, 2024
b806c65
Update Geofencing.feature
mdomale Aug 12, 2024
422ca3c
Update Geofencing.feature
mdomale Aug 12, 2024
0a37af2
Update code/Test_definitions/Geofencing.feature
mdomale Aug 23, 2024
368ac66
Update code/Test_definitions/Geofencing.feature
mdomale Aug 23, 2024
ce8b897
Update Geofencing.feature
mdomale Aug 26, 2024
36ccd72
Update Geofencing.feature
mdomale Aug 26, 2024
e1faaac
Update Geofencing.feature
mdomale Aug 26, 2024
9e58ca3
Update Geofencing.feature
mdomale Aug 26, 2024
7951305
Update Geofencing.feature
mdomale Aug 27, 2024
104e848
Update Geofencing.feature
mdomale Aug 27, 2024
ae9e8bc
Update Geofencing.feature
mdomale Aug 27, 2024
62989db
Update Geofencing.feature
mdomale Aug 27, 2024
ab8471f
Update Geofencing.feature
mdomale Aug 27, 2024
e627cc9
Update code/Test_definitions/Geofencing.feature
mdomale Aug 27, 2024
88aed70
Update code/Test_definitions/Geofencing.feature
mdomale Aug 28, 2024
65919a0
Update code/Test_definitions/Geofencing.feature
mdomale Aug 28, 2024
7aafd88
Update Geofencing.feature
mdomale Aug 28, 2024
fc4b480
Update Geofencing.feature
mdomale Aug 28, 2024
ba17839
Update code/Test_definitions/Geofencing.feature
mdomale Aug 28, 2024
b9fd8c9
Update code/Test_definitions/Geofencing.feature
mdomale Aug 28, 2024
a2893a6
Update code/Test_definitions/Geofencing.feature
mdomale Aug 28, 2024
188c49c
Update code/Test_definitions/Geofencing.feature
mdomale Aug 28, 2024
38f1660
Update Geofencing.feature
mdomale Aug 28, 2024
9fcd8f1
Update Geofencing.feature
mdomale Aug 28, 2024
7d91a4a
Update Geofencing.feature
mdomale Aug 28, 2024
f26f845
Update Geofencing.feature
mdomale Aug 29, 2024
888f6ba
Update code/Test_definitions/Geofencing.feature
mdomale Aug 29, 2024
05186ee
Update code/Test_definitions/Geofencing.feature
mdomale Aug 29, 2024
91eb45e
Update code/Test_definitions/Geofencing.feature
mdomale Aug 29, 2024
cde7ad6
Update code/Test_definitions/Geofencing.feature
mdomale Aug 29, 2024
c449069
Update code/Test_definitions/Geofencing.feature
mdomale Aug 29, 2024
2e1fbae
Update code/Test_definitions/Geofencing.feature
mdomale Aug 29, 2024
2b337f7
Update code/Test_definitions/Geofencing.feature
mdomale Aug 29, 2024
7056453
Update code/Test_definitions/Geofencing.feature
mdomale Aug 29, 2024
bfe30d1
Update Geofencing.feature
mdomale Aug 29, 2024
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
118 changes: 118 additions & 0 deletions code/Test_definitions/Geofencing.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
#-
# ---license-start
# CAMARA Project
# ---
# Copyright (C) 2023 - 2024 Contributors | Deutsche Telekom AG to CAMARA a Series
#
# The contributor of this file confirms his sign-off for the
# Developer Certificate of Origin
# (http://developercertificate.org).
# ---
# 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
#
# http://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.
# ---license-end

@Geofencing
Feature: Operations to manage event subscription on geofencing events for leaving and entering in an area

@geofencing_01_Create_geofencing_subscription_for_a_device
Scenario: Create geofencing subscription
mdomale marked this conversation as resolved.
Show resolved Hide resolved
Given they use the geofencing url
When they create subscription
Then Response code is 201

@geofencing_02_Operation_to_retrieve_list_of_subscriptions
Scenario: Get a list of subscriptions.
Given they use the geofencing url
When they get all subscriptions
Then Response code is 200


@geofencing_03_Operation_to_retrieve_subscription_based_on_the_provided_ID
Scenario: Get a subscription based on provided id.
mdomale marked this conversation as resolved.
Show resolved Hide resolved
Given they use the geofencing url
When they get subscription for subscription-id
Then Response code is 200

@geofencing_04_Operation_to_delete_subscription_based_on_the_provided_ID
Scenario: Delete a subscription based on provided id.
Given they use the geofencing url
When they delete subscription for subscription-id
Then Response code is 204

@geofencing_05_Create_invalid_geofencing_subscription_for_a_device
Scenario: Create geofencing subscription with invalid parameter
Given they use the geofencing url
When they create subscription with invalid parameter
Then Response code is 400

@geofencing_06_Get_invalid_geofencing_subscription_for_a_device
Scenario: Get geofencing subscription with invalid parameter
mdomale marked this conversation as resolved.
Show resolved Hide resolved
Given they use the geofencing url
When they get subscription with invalid subscription-id
Then Response code is 404


@geofencing_07_Delete_invalid_geofencing_subscription_for_a_device
Scenario: Delete geofencing subscription with invalid parameter
mdomale marked this conversation as resolved.
Show resolved Hide resolved
Given they use the geofencing url
When they delete subscription with invalid subscription-id
Then Response code is 404

@geofencing_08_Invalid_method_geofencing_subscription_for_a_device
Scenario: Update geofencing subscription
mdomale marked this conversation as resolved.
Show resolved Hide resolved
Given they use the geofencing url
When they update subscription
Then Response code is 405


@geofencing_09_creation_of_subscription_for_subscribed_expired_time_in_past
Scenario: Subscribed expire time in past for geofencing subscription
Given they use the geofencing url
When they create subscription with expire time in past
Then Response code is 400
mdomale marked this conversation as resolved.
Show resolved Hide resolved


@geofencing_10_creation_of_subscription_when_service_unavailable
Scenario: Subscription creation when service unavailable
Given they use the geofencing url
When they create subscription when service is unavailable
Then Response code is not 503

@geofencing_11_Get_Event-Details_of_subscription_entered
Scenario: Subscription creation when service have area-entered event
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we wanted to test that event is received when the device enters in some area I would write it as:

Scenario: Events are received for a created subscription for area-entered event
Given an existing subscription to area-entered for a device and an area
When the device enters the area
Then an event is received in the subscription callback url
And the event request body complies with the schema at "/components/schemas/EventAreaEntered"

More scenarios could be added to test the other type of events

That's a minimum. An enhanced scenario should validate that properties make sense, authorization is according to the subscription sink credentials, etc

Given they use the geofencing url
When they create subscription with event have area-entered at "Boon"
When they create subscription with event have area-entered at "Berlin" and device enters "Berlin"
Then they get event details from notifications-url
Then Response code is 200

@geofencing_12_Get_Event-Details_of_subscription_left
Scenario: Subscription creation when service have area-left event
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments as above

Given they use the geofencing url
When they create subscription with event have area-left with at "Boon"
mdomale marked this conversation as resolved.
Show resolved Hide resolved
When they create subscription with event have area-left with at "Berlin" and device left "Boon"
Then they get event details from notifications-url
Then Response code is 200

@geofencing_13_Getting_of_subscription_when_service_unavailable
Scenario: Getting Subscription when service unavailable
Given they use the geofencing url
When they get subscription when service is unavailable
Then Response code is not 503


@geofencing_14_Deletion_of_subscription_when_service_unavailable
Scenario: Deletion Subscription when service unavailable
Given they use the geofencing url
When they delete subscription when service is unavailable
Then Response code is not 503