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
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

# Changelog ClickToDial

## Table of Contents

- wip

**Please be aware that the project will have frequent updates to the main branch. There are no compatibility guarantees associated with code in any branch, including main, until it has been released. For example, changes may be reverted before a release is published. For the best results, use the latest published release.**

The below sections record the changes for each API version in each release as follows:

* for an alpha release, the delta with respect to the previous release
* for the first release-candidate, all changes since the last public release
* for subsequent release-candidate(s), only the delta to the previous release-candidate
* for a public release, the consolidated changes since the previous public release

# wip

**The WIP version contributed API definitions, test definitions, and some essential documentation.**

## Please note

- this "release" is only tagged to document the history of the API, it is not intended to be used by implementors or API customers
- going forward the implementation [code](https://github.com/camaraproject/QualityOnDemand/tree/50e81e0c4a6a7431c0a7f50c26415caf935be6df/code/API_code) will not be part of releases of CTD API. Instead it will be provided within separate repositories (ClickToDial_PIx).

## What's Changed

* Create Click to Click to Dial_User_Story by @seekwain in https://github.com/camaraproject/ClickToDial/pull/11
* Add API yaml files by @seekwain in https://github.com/camaraproject/ClickToDial/pull/10
* Create Click to Dial_API.md by @wuhonglin in https://github.com/camaraproject/ClickToDial/pull/9
* Add CTD support material by @HanbaiWang in https://github.com/camaraproject/ClickToDial/pull/6

## New Contributors

* @HanbaiWang made their first contribution in https://github.com/camaraproject/ClickToDial/pull/4
* @wuhonglin made their first contribution in https://github.com/camaraproject/ClickToDial/pull/9
* @seekwain made their first contribution in https://github.com/camaraproject/ClickToDial/pull/10

**Full Changelog**: https://github.com/camaraproject/ClickToDial/commits/main/
201 changes: 100 additions & 101 deletions code/API_definitions/Click to Dial_API.md

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions code/Test_definitions/click-to-dial-clickToDialBegin.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
Feature: Click to Dial Service API Validations
# Input to be provided by the implementation to the tester
#
# Implementation indications:
# * apiRoot: API root of the server URL
#
# References to OAS spec schemas refer to schemas specified in Click to Dial.yaml, version 0.1.0

Background: Common ClickToDialBegin setup
Given an environment at "apiRoot" |
And the header "Content-Type" is set to "application/json"
And the header "Authorization" is set to a valid access token
# Properties not explicitly overwitten in the Scenarios can take any values compliant with the schema
And the request body is set by default to a request body compliant with the schema at "/components/schemas/ClickToDialBeginRequest"

# Success scenarios

@clicktodialbegin_success
Scenario: Common validations for ClickToDialBegin success scenario
# Valid testing device and default request body compliant with the schema
Given a valid testing device supported by the service, identified by the token or provided in the request body
And the request property "$.sponsor" is set to a valid sponsor number in E.164 fordmat
And the request property "$.caller" is set to a valid caller number in E.164 format
And the request property "$.callee" is set to a valid callee number in E.164 format
When the request "ClickToDialBegin" is sent
Then the response status code is 200
And the response header "Content-Type" is "application/json"
# The response has to comply with the OAS schema for ClickToDialBeginResponse
And the response body complies with the OAS schema at "/components/schemas/ClickToDialBeginResponse"
And the response property "$.code" is "0000000"
And the response property "$.description" is "Success"
And the response property "$.result.callidentifier" exists

@clicktodialbegin_failure_missing_fields
Scenario: Fail to initiate call due to missing required fields in ClickToDialBegin request
Given a valid testing device supported by the service, identified by the token or provided in the request body
# The request is missing the required "sponsor" property
And the request property "$.caller" is set to a valid caller number in E.164 format
And the request property "$.callee" is set to a valid callee number in E.164 format
When the request "ClickToDialBegin" is sent
Then the response status code is 400
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "0000002"
And the response property "$.description" is "Invalid Input Value"

@clicktodialbegin_failure_authentication
Scenario: Fail to initiate call due to authentication failure in ClickToDialBegin request
Given an invalid or missing authentication token for the service
And the request property "$.sponsor" is set to a valid sponsor number in E.164 format
And the request property "$.caller" is set to a valid caller number in E.164 format
And the request property "$.callee" is set to a valid callee number in E.164 format
When the request "ClickToDialBegin" is sent
Then the response status code is 400
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "0001004"
And the response property "$.description" is "Authentication Failure"

@clicktodialbegin_failure_invalid_caller
Scenario: Fail to initiate call due to invalid caller number in ClickToDialBegin request
Given a valid testing device supported by the service, identified by the token or provided in the request body
And the request property "$.sponsor" is set to a valid sponsor number in E.164 format
And the request property "$.caller" is set to a invalid caller number in error format
And the request property "$.callee" is set to a valid callee number in E.164 format
When the request "ClickToDialBegin" is sent
Then the response status code is 400
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "1001001"
And the response property "$.description" is "Number Format Error"

@clicktodialbegin_failure_server_error
Scenario: Fail to initiate call due to server error in ClickToDialBegin request
Given a valid testing device supported by the service, identified by the token or provided in the request body
And the request property "$.sponsor" is set to a valid sponsor number in E.164 format
And the request property "$.caller" is set to a valid caller number in E.164 format
And the request property "$.callee" is set to a valid callee number in E.164 format
When the request "ClickToDialBegin" is sent
Then the response status code is 500
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "0000001"
And the response property "$.description" is "Internal Service Error"
66 changes: 66 additions & 0 deletions code/Test_definitions/click-to-dial-clickToDialRelease.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
Feature: Click to Dial Service API Validations
# Input to be provided by the implementation to the tester
#
# Implementation indications:
# * apiRoot: API root of the server URL
#
# References to OAS spec schemas refer to schemas specified in Click to Dial.yaml, version 0.1.0

Background: Common ClickToDialRelease setup
Given an environment at "apiRoot" |
And the header "Content-Type" is set to "application/json"
And the header "Authorization" is set to a valid access token
# Properties not explicitly overwitten in the Scenarios can take any values compliant with the schema
And the request body is set by default to a request body compliant with the schema at "/components/schemas/ClickToDialReleaseRequest"

# Success scenarios
@clicktodialrelease_success
Scenario: Common validations for ClickToDialRelease success scenario
Given a valid call identifier obtained from a previous ClickToDialBegin response
And the request property "$.operation" is set to a valid operation, for example "EndCall"
When the request "ClickToDialRelease" is sent
Then the response status code is 200

@clicktodialrelease_failure_missing_operation
Scenario: Fail to release call due to missing operation field in ClickToDialRelease request
Given a valid call identifier obtained from a previous ClickToDialBegin response
# The request is missing the "operation" property
When the request "ClickToDialRelease" is sent
Then the response status code is 400
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "1001003"
And the response property "$.description" is "Operation Error"

@clicktodialrelease_failure_authentication
Scenario: Fail to release call due to authentication failure in ClickToDialRelease request
Given an invalid or missing authentication token for the service
And the request property "$.operation" is set to a valid operation, for example "EndCall"
When the request "ClickToDialRelease" is sent
Then the response status code is 400
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "0001004"
And the response property "$.description" is "Authentication Failure"

@clicktodialrelease_failure_invalid_callidentifier
Scenario: Fail to release call due to invalid call identifier in ClickToDialRelease request
Given an invalid call identifier
And the request property "$.operation" is set to a valid operation, for example "EndCall"
When the request "ClickToDialRelease" is sent
Then the response status code is 400
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "1001002"
And the response property "$.description" is "Call ID Error"

@clicktodialrelease_failure_server_error
Scenario: Fail to release call due to server error in ClickToDialRelease request
Given a valid call identifier obtained from a previous ClickToDialBegin response
And the request property "$.operation" is set to a valid operation, for example "EndCall"
When the request "ClickToDialRelease" is sent
Then the response status code is 500
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "0000001"
And the response property "$.description" is "Internal Service Error"
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
Feature: Click to Dial Service API Validations
# Input to be provided by the implementation to the tester
#
# Implementation indications:
# * apiRoot: API root of the server URL
#
# References to OAS spec schemas refer to schemas specified in Click to Dial.yaml, version 0.1.0

Background: Common ClickToDialStatusNotify setup
Given an environment at "apiRoot" |
And the header "Content-Type" is set to "application/json"
And the header "Authorization" is set to a valid access token
# Properties not explicitly overwitten in the Scenarios can take any values compliant with the schema
And the request body is set by default to a request body compliant with the schema at "/components/schemas/ClickToDialStatusNotifyRequest"

# Success scenarios
@clicktodialstatusnotify_success
Scenario: Common validations for ClickToDialStatusNotify success scenario
Given a valid call identifier obtained from a previous ClickToDialBegin response
And the request property "$.caller" is set to a valid caller number in E.164 format
And the request property "$.callee" is set to a valid callee number in E.164 format
And the request property "$.status" is set to a valid call status, for example "Connected"
And the request property "$.timeStamp" is set to the current UTC time in ISO8601 format
When the request "ClickToDialStatusNotify" is sent
Then the response status code is 200

@clicktodialstatusnotify_failure_missing_status
Scenario: Fail to send status notification due to missing status field in ClickToDialStatusNotify request
Given a valid call identifier obtained from a previous ClickToDialBegin response
And the request property "$.caller" is set to a valid caller number in E.164 format
And the request property "$.callee" is set to a valid callee number in E.164 format
# The request is missing the "status" property
And the request property "$.timeStamp" is set to the current UTC time in ISO8601 format
When the request "ClickToDialStatusNotify" is sent
Then the response status code is 400
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "0000002"
And the response property "$.description" is "Invalid Input Value"

@clicktodialstatusnotify_failure_invalid_callidentifier
Scenario: Fail to send status notification due to invalid call identifier in ClickToDialStatusNotify request
Given an invalid call identifier
And the request property "$.caller" is set to a valid caller number in E.164 format
And the request property "$.callee" is set to a valid callee number in E.164 format
And the request property "$.status" is set to a valid call status, for example "Connected"
And the request property "$.timeStamp" is set to the current UTC time in ISO8601 format
When the request "ClickToDialStatusNotify" is sent
Then the response status code is 400
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "1001002"
And the response property "$.description" is "Call ID Error"

@clicktodialstatusnotify_failure_server_error
Scenario: Fail to send status notification due to server error in ClickToDialStatusNotify request
Given a valid call identifier obtained from a previous ClickToDialBegin response
And the request property "$.caller" is set to a valid caller number in E.164 format
And the request property "$.callee" is set to a valid callee number in E.164 format
And the request property "$.status" is set to a valid call status, for example "Connected"
And the request property "$.timeStamp" is set to the current UTC time in ISO8601 format
When the request "ClickToDialStatusNotify" is sent
Then the response status code is 500
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "0000001"
And the response property "$.description" is "Internal Service Error"
72 changes: 72 additions & 0 deletions code/Test_definitions/click-to-dial-recordingDownload.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Feature: Click to Dial Service API Validations
# Input to be provided by the implementation to the tester
#
# Implementation indications:
# * apiRoot: API root of the server URL
#
# References to OAS spec schemas refer to schemas specified in Click to Dial.yaml, version 0.1.0

Background: Common RecordingDownload setup
Given an environment at "apiRoot" |
And the header "Content-Type" is set to "application/json"
And the header "Authorization" is set to a valid access token
# Properties not explicitly overwitten in the Scenarios can take any values compliant with the schema
And the request body is set by default to a request body compliant with the schema at "/components/schemas/RecordingDownloadRequest"

# Success scenarios
@recordingdownload_success
Scenario: Common validations for RecordingDownload success scenario
Given a valid call identifier obtained from a previous ClickToDialBegin response
And the request property "$.recordingId" is set to a valid recording identifier
When the request "RecordingDownload" is sent
Then the response status code is 200
And the response header "Content-Type" is "application/json"
# The response has to comply with the OAS schema for RecordingDownloadResponse
And the response body complies with the OAS schema at "/components/schemas/RecordingDownloadResponse"
And the response property "$.code" is "0000000"
And the response property "$.description" is "Success"
And the response property "$.result" exists

@recordingdownload_failure_missing_recordingId
Scenario: Fail to download recording due to missing recordingId in RecordingDownload request
Given a valid call identifier obtained from a previous ClickToDialBegin response
# The request is missing the "recordingId" property
When the request "RecordingDownload" is sent
Then the response status code is 400
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "0000002"
And the response property "$.description" is "Invalid Input Value"

@recordingdownload_failure_authentication
Scenario: Fail to download recording due to authentication failure in RecordingDownload request
Given an invalid or missing authentication token for the service
And the request property "$.recordingId" is set to a valid recording identifier
When the request "RecordingDownload" is sent
Then the response status code is 400
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "0001004"
And the response property "$.description" is "Authentication Failure"

@recordingdownload_failure_invalid_callidentifier
Scenario: Fail to download recording due to invalid call identifier in RecordingDownload request
Given an invalid call identifier
And the request property "$.recordingId" is set to a valid recording identifier
When the request "RecordingDownload" is sent
Then the response status code is 400
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "1001002"
And the response property "$.description" is "Call ID Error"

@recordingdownload_failure_server_error
Scenario: Fail to download recording due to server error in RecordingDownload request
Given a valid call identifier obtained from a previous ClickToDialBegin response
And the request property "$.recordingId" is set to a valid recording identifier
When the request "RecordingDownload" is sent
Then the response status code is 500
And the response header "Content-Type" is "application/json"
And the response body complies with the OAS schema at "/components/schemas/ErrorInfo"
And the response property "$.code" is "0000001"
And the response property "$.description" is "Internal Service Error"
Loading