Ocf173 testing CCF Id

Proposers

  • Jorge Moratinos Salcines (Telefónica)

Description

Include a new test suite with one test related with Helper to check CCF_ID

Acknowledgements

This work is funded by the European Commission through the FIDAL project with Grant Agreement number 101096146

Merge request reports

Loading
+2 −0
Changes for tests/features/Helper/__init__.robot: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
*** Settings ***
Force Tags    helper
 No newline at end of file
+29 −0
Changes for tests/features/Helper/helper.robot: 29 added lines, 0 removed lines.
Original line number Diff line number Diff line
*** Settings ***
Resource            /opt/robot-tests/tests/resources/common.resource
Library             /opt/robot-tests/tests/libraries/bodyRequests.py
Library             XML
Library             String
Resource            /opt/robot-tests/tests/resources/common/basicRequests.robot
Resource            ../../resources/common.resource
Resource            ../../resources/common/basicRequests.robot

Suite Teardown      Reset Testing Environment
Test Setup          Reset Testing Environment
Test Teardown       Reset Testing Environment


*** Variables ***
${API_INVOKER_NOT_REGISTERED}       not-valid
${SUBSCRIBER_ID_NOT_VALID}          not-valid
${SUBSCRIPTION_ID_NOT_VALID}        not-valid


*** Test Cases ***
Obtain ccfId
    [Tags]    helper_1  smoke

    ${ccfId}=    Get Capif Ccf Id

    Log    CCF ID obtained: ${ccfId}
    Should Match Regexp    ${ccfId}    ^CCF[a-zA-Z0-9]+
    
 No newline at end of file
+13 −0
Changes for tests/resources/common/basicRequests.robot: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -967,3 +967,16 @@ Get Number Of Services
    ${size}=    Get Length    ${resp.json()['services']}

    RETURN    ${size}

Get Capif Ccf Id
    ${resp}=    Get Request Capif
    ...    /helper/getCcfId
    ...    server=${CAPIF_HTTPS_URL}
    ...    verify=ca.crt
    ...    username=${SUPERADMIN_USERNAME}

    Should Be Equal As Integers    ${resp.status_code}    200
    ${ccfId}=    Get From Dictionary    ${resp.json()}    ccf_id
    Set Suite Variable    ${CCF_ID}    ${ccfId}

    RETURN    ${ccfId}
Loading