Commit 5638272c authored by Najam UI Hassan's avatar Najam UI Hassan Committed by Giacomo Bernini
Browse files

fixed issues in PMJobs

parent a2d67d29
Loading
Loading
Loading
Loading
+68 −36
Original line number Original line Diff line number Diff line
@@ -8,8 +8,22 @@ Library REST ${NFVMANO_SCHEMA}://${NFVMANO_HOST}:${NFVMANO_PORT}
Library           MockServerLibrary
Library           MockServerLibrary


*** Test Cases ***
*** Test Cases ***
GET all NFV-MANO Performance Monitoring Jobs
Create new NFV-MANO Performance Monitoring Job
    [Documentation]    Test ID: 8.3.2.1.1
    [Documentation]    Test ID: 8.3.2.1.1
    ...    Test title:  Create a new NFV-MANO Performance Monitoring Job
    ...    Test objective: The objective is to test the creation of a new NFV-MANO performance monitoring job and perform the JSON schema validation of the returned job data structure
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Reference: clause 6.5.3.3.1 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Post-Conditions: The NFV-MANO Performance Job is successfully created on the NFV-MANO
    Send Post Request Create new NFV-MANO Performance Monitoring Job
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is   PmJob
    Check Postcondition PmJob Exists
    
GET all NFV-MANO Performance Monitoring Jobs
    [Documentation]    Test ID: 8.3.2.1.2
    ...    Test title: GET all NFV-MANO Performance Monitoring Jobs
    ...    Test title: GET all NFV-MANO Performance Monitoring Jobs
    ...    Test objective: The objective is to test the retrieval of all the available NFV-MANO performance monitoring jobs and perform a JSON schema validation
    ...    Test objective: The objective is to test the retrieval of all the available NFV-MANO performance monitoring jobs and perform a JSON schema validation
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
@@ -22,7 +36,7 @@ GET all NFV-MANO Performance Monitoring Jobs
    Check HTTP Response Body Json Schema Is   PmJobs
    Check HTTP Response Body Json Schema Is   PmJobs


GET NFV-MANO Performance Monitoring Jobs with attribute-based filter
GET NFV-MANO Performance Monitoring Jobs with attribute-based filter
    [Documentation]    Test ID: 8.3.2.1.2
    [Documentation]    Test ID: 8.3.2.1.3
    ...    Test title: GET all NFV-MANO Performance Monitoring Jobs with attribute-based filter
    ...    Test title: GET all NFV-MANO Performance Monitoring Jobs with attribute-based filter
    ...    Test objective: The objective is to test the retrieval of NFV-MANO performance monitoring jobs using attribute-based filter, perform a JSON schema validation of the collected jobs data structure
    ...    Test objective: The objective is to test the retrieval of NFV-MANO performance monitoring jobs using attribute-based filter, perform a JSON schema validation of the collected jobs data structure
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
@@ -35,7 +49,7 @@ GET NFV-MANO Performance Monitoring Jobs with attribute-based filter
    Check HTTP Response Body Json Schema Is   PmJobs
    Check HTTP Response Body Json Schema Is   PmJobs


GET all NFV-MANO Performance Monitoring Jobs with all_fields attribute selector
GET all NFV-MANO Performance Monitoring Jobs with all_fields attribute selector
    [Documentation]    Test ID: 8.3.2.1.3
    [Documentation]    Test ID: 8.3.2.1.4
    ...    Test title: GET all NFV-MANO Performance Monitoring Jobs with all_fields attribute selector
    ...    Test title: GET all NFV-MANO Performance Monitoring Jobs with all_fields attribute selector
    ...    Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs all_fields attribute selector, perform a JSON schema validation of the collected jobs data structure
    ...    Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs all_fields attribute selector, perform a JSON schema validation of the collected jobs data structure
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
@@ -48,7 +62,7 @@ GET all NFV-MANO Performance Monitoring Jobs with all_fields attribute selector
    Check HTTP Response Body Json Schema Is   PmJobs
    Check HTTP Response Body Json Schema Is   PmJobs


GET all NFV-MANO Performance Monitoring Jobs with exclude_default attribute selector
GET all NFV-MANO Performance Monitoring Jobs with exclude_default attribute selector
    [Documentation]    Test ID: 8.3.2.1.4
    [Documentation]    Test ID: 8.3.2.1.5
    ...    Test title: GET all NFV-MANO Performance Monitoring Jobs with exclude_default attribute selector
    ...    Test title: GET all NFV-MANO Performance Monitoring Jobs with exclude_default attribute selector
    ...    Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs exclude_default attribute selector, perform a JSON schema validation of the collected jobs data structure
    ...    Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs exclude_default attribute selector, perform a JSON schema validation of the collected jobs data structure
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
@@ -61,7 +75,7 @@ GET all NFV-MANO Performance Monitoring Jobs with exclude_default attribute sele
    Check HTTP Response Body Json Schema Is   PmJobs
    Check HTTP Response Body Json Schema Is   PmJobs


GET all NFV-MANO Performance Monitoring Jobs with fields attribute selector
GET all NFV-MANO Performance Monitoring Jobs with fields attribute selector
    [Documentation]    Test ID: 8.3.2.1.5
    [Documentation]    Test ID: 8.3.2.1.6
    ...    Test title: GET all NFV-MANO Performance Monitoring Jobs with fields attribute selector
    ...    Test title: GET all NFV-MANO Performance Monitoring Jobs with fields attribute selector
    ...    Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs fields attribute selector, perform a JSON schema validation of the collected jobs data structure
    ...    Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs fields attribute selector, perform a JSON schema validation of the collected jobs data structure
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
@@ -74,7 +88,7 @@ GET all NFV-MANO Performance Monitoring Jobs with fields attribute selector
    Check HTTP Response Body Json Schema Is   PmJobs
    Check HTTP Response Body Json Schema Is   PmJobs


GET all NFV-MANO Performance Monitoring Jobs with exclude_fields attribute selector
GET all NFV-MANO Performance Monitoring Jobs with exclude_fields attribute selector
    [Documentation]    Test ID: 8.3.2.1.6
    [Documentation]    Test ID: 8.3.2.1.7
    ...    Test title: GET all NFV-MANO Performance Monitoring Jobs with exclude_fields attribute selector
    ...    Test title: GET all NFV-MANO Performance Monitoring Jobs with exclude_fields attribute selector
    ...    Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs exclude_fields attribute selector, perform a JSON schema validation of the collected jobs data structure
    ...    Test objective: The objective is to test the retrieval of all NFV-MANO performance monitoring jobs exclude_fields attribute selector, perform a JSON schema validation of the collected jobs data structure
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
@@ -87,7 +101,7 @@ GET all NFV-MANO Performance Monitoring Jobs with exclude_fields attribute selec
    Check HTTP Response Body Json Schema Is   PmJobs
    Check HTTP Response Body Json Schema Is   PmJobs


GET NFV-MANO Performance Monitoring Jobs with invalid attribute-based filter
GET NFV-MANO Performance Monitoring Jobs with invalid attribute-based filter
    [Documentation]    Test ID: 8.3.2.1.7
    [Documentation]    Test ID: 8.3.2.1.8
    ...    Test title: GET NFV-MANO Performance Monitoring Jobs with invalid attribute-based filter
    ...    Test title: GET NFV-MANO Performance Monitoring Jobs with invalid attribute-based filter
    ...    Test objective: The objective is to test that the retrieval of NFV-MANO performance monitoring jobs fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response
    ...    Test objective: The objective is to test that the retrieval of NFV-MANO performance monitoring jobs fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
@@ -99,34 +113,47 @@ GET NFV-MANO Performance Monitoring Jobs with invalid attribute-based filter
    Check HTTP Response Status Code Is    400
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is   ProblemDetails
    Check HTTP Response Body Json Schema Is   ProblemDetails


GET NFV-MANO Performance Monitoring Jobs with invalid resource endpoint
GET NFV-MANO Performance Monitoring Jobs with invalid attribute selector
    [Documentation]    Test ID: 8.3.2.1.8
    [Documentation]    Test ID: 8.3.2.1.9
    ...    Test title: GET NFV-MANO Performance Monitoring Jobs with invalid resource endpoint
    ...    Test title: GET NFV-MANO Performance Monitoring Jobs with invalid resource endpoint
    ...    Test objective: The objective is to test that the retrieval of NFV-MANO performance monitoring jobs fails when using invalid resource endpoint
    ...    Test objective: The objective is to test that the retrieval of NFV-MANO performance monitoring jobs fails with invalid attribute selector
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Applicability: none
    ...    Post-Conditions: none
    ...    Post-Conditions: none
    GET NFV-MANO Performance Monitoring Jobs with invalid resource endpoint
    GET NFV-MANO Performance Monitoring Jobs with invalid attribute selector
    Check HTTP Response Status Code Is    404
    Check HTTP Response Status Code Is    400
    
    
Create new NFV-MANO Performance Monitoring Job
GET information about multiple Performance Monitoring Jobs to get Paged Response
    [Documentation]    Test ID: 8.3.2.1.9
    [Documentation]    Test ID: 8.3.2.1.10
    ...    Test title:  Create a new NFV-MANO Performance Monitoring Job
    ...    Test title: GET information about multiple Performance Monitoring Jobs to get Paged Response
    ...    Test objective: The objective is to test the creation of a new NFV-MANO performance monitoring job and perform the JSON schema validation of the returned job data structure
    ...    Test objective: The objective is to retrieve information about the performance monitoring jobs to get paged response
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Pre-conditions: 
    ...    Reference: clause 6.5.3.3.1 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: none
    ...    Applicability: 
    ...    Post-Conditions: The NFV-MANO Performance Job is successfully created on the NFV-MANO
    ...    Post-Conditions:  
    Send Post Request Create new NFV-MANO Performance Monitoring Job
    GET all NFV-MANO Performance Monitoring Jobs
    Check HTTP Response Status Code Is    201
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   PmJob
    Check LINK in Header 
    Check Postcondition PmJob Exists
    
GET information about multiple Performance Monitoring Jobs for Bad Request Response too big
    [Documentation]    Test ID: 8.3.2.1.11
    ...    Test title: GET information about multiple Performance Monitoring Jobs for Bad Request Response too big
    ...    Test objective: The objective is to test that GET method fail retrieving status information about performance monitoring jobs when Response is too big, and perform the JSON schema validation of the failed operation HTTP response
    ...    Pre-conditions: 
    ...    Reference: clause 6.5.3.3.2 - ETSI GS NFV-SOL 009 [5] V3.3.1
    ...    Config ID: Config_prod_NFV-MANO
    ...    Applicability: 
    ...    Post-Conditions: 
    GET all NFV-MANO Performance Monitoring Jobs
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails



PUT all NFV-MANO Performance Monitoring Jobs - Method not implemented
PUT all NFV-MANO Performance Monitoring Jobs - Method not implemented
    [Documentation]    Test ID: 8.3.2.1.10
    [Documentation]    Test ID: 8.3.2.1.12
    ...    Test title: PUT all NFV-MANO Performance Monitoring Jobs - Method not implemented
    ...    Test title: PUT all NFV-MANO Performance Monitoring Jobs - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to modify NFV-MANO Performance Monitoring Jobs
    ...    Test objective: The objective is to test that PUT method is not allowed to modify NFV-MANO Performance Monitoring Jobs
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
@@ -138,7 +165,7 @@ PUT all NFV-MANO Performance Monitoring Jobs - Method not implemented
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    405
    
    
PATCH all NFV-MANO Performance Monitoring Jobs - (Method not implemented)
PATCH all NFV-MANO Performance Monitoring Jobs - (Method not implemented)
    [Documentation]    Test ID: 8.3.2.1.11
    [Documentation]    Test ID: 8.3.2.1.13
    ...    Test title: PATCH all NFV-MANO Performance Monitoring Jobs - Method not implemented
    ...    Test title: PATCH all NFV-MANO Performance Monitoring Jobs - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update NFV-MANO Performance Monitoring Jobs
    ...    Test objective: The objective is to test that PATCH method is not allowed to update NFV-MANO Performance Monitoring Jobs
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
@@ -150,7 +177,7 @@ PATCH all NFV-MANO Performance Monitoring Jobs - (Method not implemented)
    Check HTTP Response Status Code Is    405
    Check HTTP Response Status Code Is    405
    
    
DELETE all NFV-MANO Performance Monitoring Jobs - Method not implemented
DELETE all NFV-MANO Performance Monitoring Jobs - Method not implemented
    [Documentation]    Test ID: 8.3.2.1.12
    [Documentation]    Test ID: 8.3.2.1.14
    ...    Test title: DELETE all NFV-MANO Performance Monitoring Jobs - Method not implemented
    ...    Test title: DELETE all NFV-MANO Performance Monitoring Jobs - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to update NFV-MANO Performance Monitoring Jobs
    ...    Test objective: The objective is to test that DELETE method is not allowed to update NFV-MANO Performance Monitoring Jobs
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
    ...    Pre-conditions: A NFV-MANO instance is instantiated. One or more NFV-MANO performance jobs are set in the NFV-MANO.
@@ -221,13 +248,14 @@ GET NFV-MANO Performance Monitoring Jobs with invalid attribute-based filter
    ${output}=    Output    response
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Set Suite Variable    ${response}    ${output}


GET NFV-MANO Performance Monitoring Jobs with invalid resource endpoint    
GET NFV-MANO Performance Monitoring Jobs with invalid attribute selector	
    Log    Trying to perform a GET on a erroneous URI
    Log    Query VNF The GET method queries information about multiple VNF instances.
    Set Headers  {"Accept":"${ACCEPT_JSON}"}  
    Set Headers  {"Accept":"${ACCEPT_JSON}"}  
    Set Headers  {"Content-Type": "${CONTENT_TYPE_JSON}"}
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"} 
    Run Keyword If    ${AUTH_USAGE} == 1    Set Headers    {"Authorization":"${AUTHORIZATION}"} 
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/pm_job    # wrong URI /pm_job instead of /pm_jobs
    GET    ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=wrong_field
    ${output}=    Output    response
    ${outputResponse}=    Output    response
    Set Suite Variable    ${response}    ${output}
	Set Global Variable    ${response}    ${outputResponse}


Send Post Request Create new NFV-MANO Performance Monitoring Job
Send Post Request Create new NFV-MANO Performance Monitoring Job
    Log    Creating a new PM Job
    Log    Creating a new PM Job
@@ -294,3 +322,7 @@ Check HTTP Response Body Json Schema Is
Check Postcondition NFV-MANO Performance Monitoring Jobs Exist
Check Postcondition NFV-MANO Performance Monitoring Jobs Exist
    Log    Checking that Pm Job still exists
    Log    Checking that Pm Job still exists
    GET all NFV-MANO Performance Monitoring Jobs
    GET all NFV-MANO Performance Monitoring Jobs
    
Check LINK in Header
    ${linkURL}=    Get Value From Json    ${response['headers']}    $..Link
    Should Not Be Empty    ${linkURL}
 No newline at end of file
+1 −1
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<keywordspec name="Easter" type="library" format="ROBOT" generated="20200817 12:25:57">
<keywordspec name="Easter" type="library" format="ROBOT" generated="20200820 10:23:51">
<version></version>
<version></version>
<scope>global</scope>
<scope>global</scope>
<namedargs>yes</namedargs>
<namedargs>yes</namedargs>
+1 −1
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<keywordspec name="Reserved" type="library" format="ROBOT" generated="20200817 12:25:57">
<keywordspec name="Reserved" type="library" format="ROBOT" generated="20200820 10:23:51">
<version></version>
<version></version>
<scope>global</scope>
<scope>global</scope>
<namedargs>yes</namedargs>
<namedargs>yes</namedargs>