Skip to content

Commit

Permalink
Add App Service V2 Testcases
Browse files Browse the repository at this point in the history
Fix edgexfoundry#155

Signed-off-by: Ginny Guan <[email protected]>
  • Loading branch information
jinlinGuan committed Aug 21, 2020
1 parent 697da75 commit bd59dca
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
26 changes: 26 additions & 0 deletions TAF/testScenarios/functionalTest/V2-API/app-service/info/GET.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
*** Settings ***
Resource TAF/testCaseModules/keywords/common/commonKeywords.robot
Suite Setup Run Keywords Setup Suite AND Deploy App Service
Suite Teardown Run Keywords Suite Teardown And Remove App Service

*** Variables ***
${SUITE} App-Service GET Testcases
${LOG_FILE_PATH} ${WORK_DIR}/TAF/testArtifacts/logs/app-service-get.log

*** Test Cases ***
InfoGET001 - Query ping
When Query Ping
Then Should Return Status Code "200" And Timestamp

InfoGET002 - Query version
When Query Version
Then Should Return Status Code "200" And Version
And Should Return SDK Version

InfoGET003 - Query metrics
When Query Metrics
Then Should Return Status Code "200" And Metrics

InfoGET004 - Query config
When Query Config
Then Should Return Status Code "200" And Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
*** Settings ***
Resource TAF/testCaseModules/keywords/common/commonKeywords.robot
Suite Setup Run Keywords Setup Suite AND Deploy App Service
Suite Teardown Run Keywords Suite Teardown And Remove App Service

*** Variables ***
${SUITE} App-Service Secrets POST Testcases
${LOG_FILE_PATH} ${WORK_DIR}/TAF/testArtifacts/logs/app-service-secrets.log

*** Test Cases ***
SecretsPOST001 - Stores secrets to the secret client
When Store Secret Data
Then Run Keyword if $SECURITY_SERVICE_NEEDED == 'true'
... Should Return Status Code "201"
... ELSE IF Should Return Status Code "500"

SecretsPOST002 - Stores secrets to the secret client With Path
When Store Secret Data With Path
Then Run Keyword if $SECURITY_SERVICE_NEEDED == 'true'
... Should Return Status Code "201"
... ELSE IF Should Return Status Code "500"

ErrSecretsPOST001 - Stores secrets to the secret client fails (missing key)
When Store Secret Data With Missing Key
Then Run Keyword if $SECURITY_SERVICE_NEEDED == 'true'
... Should Return Status Code "400"
... ELSE IF Should Return Status Code "500"

ErrSecretsPOST002 - Stores secrets to the secret client fails (missing value)
When Store Secret Data With Missing Value
Then Run Keyword if $SECURITY_SERVICE_NEEDED == 'true'
... Should Return Status Code "400"
... ELSE IF Should Return Status Code "500"
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
*** Settings ***
Resource TAF/testCaseModules/keywords/common/commonKeywords.robot
Suite Setup Run Keywords Setup Suite AND Deploy App Service
Suite Teardown Run Keywords Suite Teardown And Remove App Service

*** Variables ***
${SUITE} App-Service Trigger POST Testcases
${LOG_FILE_PATH} ${WORK_DIR}/TAF/testArtifacts/logs/app-service-trigger.log

*** Test Cases ***
TriggerPOST001 - Trigger pipeline
When Trigger Function Pipeline
Then Should Return Status Code "200"
And Should Return Expected Data

ErrTriggerPOST001 - Trigger pipeline fails (Invalid Data)
When Trigger Function Pipeline With Invalid Data
Then Should Return Status Code "400"

ErrTriggerPOST002 - Trigger pipeline fails (Unprocessable Entity)
When Trigger Function Pipeline With Unprocessable Entity
Then Should Return Status Code "422"

0 comments on commit bd59dca

Please sign in to comment.