4 Running Test Cases Using ATS

This section describes how to run test cases using ATS. It includes:

4.1 Running NWDAF Test Cases using ATS

This section describes how to run Networks Data Analytics Function (NWDAF) test cases using ATS.

Prerequisites

To run NWDAF test cases, ensure that the following prerequisites are met:

  • The ATS version must be compatible with the NWDAF release.
  • The NWDAF and ATS must be deployed in the same namespace.
  • The NWDAF must be deployed using the appropriate custom values.yaml file as per the configuration to be tested. The custom values.yaml file is available with the NWDAF documentation package. Ensure that you deploy the NWDAF for ATS using the correct custom value file based on the selected NWDAF configuration.

Logging into ATS

Running ATS

Before logging into ATS, you need to ensure that ATS is deployed successfully using HELM charts.

For example:

Figure 4-1 Verify ATS Deployment


Verify ATS Deployment

For more information on verifying ATS deployment, see Verifying ATS Deployment.

Note:

To modify default log in password, refer to Modifying Login Password.

To log in to ATS, open a browser and provide the IP Address and port details as <Worker-Node-IP>:<Node-Port-of-ATS>.

Figure 4-2 ATS Login


ATS Login

To run ATS, enter the login credentials. Click Sign in. A screen displaying the NWDAF pre-configured pipelines appears.

Figure 4-3 Pipelines


Pipelines

The NWDAF ATS has three configured pipelines:

  • NWDAF-NewFeatures
  • NWDAF-Performance
  • NWDAF-Regression

Configure NWDAF Pipelines

To run configure a pipeline perform the following steps:

  1. Select the pipeline you want to run the test cases on, click NWDAF-NewFeatures or NWDAF-Regression or NWDAF-Performance in the Name column. The following screen appears:

    Figure 4-4 Pipeline Configuration


    Pipeline Configuration

    In the above screen:

    • Click Configure to configure the NWDAF pipeline.
    • Click Build History box to view all the previous pipeline executions, and the Console Output of each execution.
    • The Stage View represents the previously executed pipelines for reference.
    • The Test Results Analyzer is the plugin integrated into the OCNWDAF-ATS. This option can be used to display the build-wise history of all the executions. It will provide a graphical representation of the past execution together.
  2. Click Configure to configure the environment parameters of the pipeline. User must wait for the page to load completely. Once the page loads completely, move to the Pipeline section:

    Note:

    Make sure that the following page loads completely before you perform any action on it. Also, do not modify any configuration other than shown below.

    Figure 4-5 Configure Pipeline


    Configure Pipeline

    Note:

    Remove the existing default content of the pipeline script.
  3. Depending on the pipeline you want to configure, use the respective script. The following scripts are available at: /var/lib/jenkins/ocnwdaf_tests/pipeline_scripts:
    • NewFeatures_Pipeline_script.txt
    • Regression_Pipeline_script.txt
    • Performance_Pipeline_script.txt
  4. Update the script of the pipeline you want to configure, and update the parameters according to the ATS and NWDAF environment you want to test.
  5. Click Save.
  6. To run the test cases, click Build with Parameters.
  7. The TestSuite multi-option page is displayed, ensure the SUT value is NWDAF.

    Figure 4-6 TestSuite Page


    TestSuite Page

  8. To run all scripts available, select All and click Build.
  9. To run scripts on a specific feature, select Single/MultipleFeatures option and select the Feature you want to run the test on and click Build.

    Figure 4-7 Single/Multiple Features


    Single/Multiple Features

  10. To run scripts on a specific test scenario, select MultipleFeatures_MultipleTestCases option and select the Feature and the TestCases you want to run the test on and click Build.

    Figure 4-8 Multiple Features and Testcases


    Multiple Features and Testcases

  11. The Build History menu displays the list of running jobs, select the latest job displayed in the list.
  12. Click the Console Output option for this job. The jobs progress can be visualized in the log.

4.2 Running OCNADD Test Cases using ATS

This section describes how to run Oracle Communications Network Analytics Data Director (OCNADD) test cases using ATS. It includes:

4.2.1 Prerequisites

To run OCNADD test cases, ensure that the following prerequisites are met:
  • The ATS version must be compatible with the OCNADD release.
  • The OCNADD, ATS, and Stub must be deployed in the same namespace.

4.2.2 Logging into ATS

Running ATS

Before logging into ATS, you need to ensure that ATS is deployed successfully using HELM charts as shown below:
[ocnadd@k8s-bastion ~]$ helm status ocats -n ocnadd
NAME: ocats
LAST DEPLOYED: Sat Nov  3 03:48:27 2022
NAMESPACE: ocnadd
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
# Copyright 2018 (C), Oracle and/or its affiliates. All rights reserved.
 
Thank you for installing ocats-ocnadd.
 
Your release is named ocats , Release Revision: 1.
To learn more about the release, try:
 
  $ helm status ocats
  $ helm get ocats
[ocnadd@k8s-bastion ~]$ kubectl get pod -n mad | grep ocats
ocats-ocats-ocnadd-54ffddb548-4j8cx         1/1     Running     0          9h
 
[ocnadd@k8s-bastion ~]$ kubectl get svc -n mad | grep ocats
ocats-ocats-ocnadd          LoadBalancer   10.20.30.40    <pending>       8080:12345/TCP       9h

For more information on verifying ATS deployment, see Verifying ATS Deployment.

To log in to ATS, open a browser and provide the IP Address and port details as <Worker-Node-IP>:<Node-Port-of-ATS>.

Figure 4-9 ATS Login

ATS Login
To run ATS:
  1. Enter the login credentials. Click Sign in. The following screen appears.

    Figure 4-10 OCNADD Pre-Configured Pipelines


    OCNADD Pre-Configured Pipelines

    OCNADD ATS has three pre-configured pipelines.

    • OCNADD-NewFeatures: This pipeline has all the test cases delivered as part of OCNADD ATS - 23.1.0.
    • OCNADD-Performance: This pipeline is not operational as of now. It is reserved for future releases of ATS.
    • OCNADD-Regression: This pipeline is not operational as of now. It is reserved for future releases of ATS.

4.2.3 OCNADD-NewFeatures Pipeline

OCNADD-NewFeatures Pipeline

This is a pre-configured pipeline where users can run all the OCNADD new test cases. To configure its parameters, which is a one time activity, perform the following steps:
  1. Click OCNADD-NewFeatures in the Name column. The following screen appears:

    Figure 4-11 Configuring OCNADD-New Features


    Configuring OCNADD-New Features

    In the above screen:
    • Click Configure to configure OCNADD-New Features.
    • Click Build History box to view all the previous pipeline executions, and the Console Output of each execution.
    • The Stage View represents the previously executed pipelines for reference.
    • The Test Results Analyzer is the plugin integrated into the OCNADD-ATS. This option can be used to display the build-wise history of all the executions. It will provide a graphical representation of the past execution together.
  2. Click Configure. Once the page loads completely, click the Pipeline tab:

    Note:

    Make sure that the Configure page loads completely before you perform any action on it. Also, do not modify any configuration other than shown below.
    The Pipeline section of the configuration page appears as follows:

    Figure 4-12 Pipeline Section


    Pipeline Section

    Important:

    Remove the existing default content of the pipeline script and copy the following script content.
    The content of the pipeline script is as follows:
    node('built-in'){
                 //a= NF    b = NAMESPACE    c = VERSION    d = DB_HOST   e = DB_USER    f = DB_PASSWORD  
                 //g= ALARM_DB_NAME    h = HEALTH_MONITORING_DB_NAME    i = CONFIG_DB_NAME  
                 //j= ALARM_API_ROOT    k = HEALTH_MONITORING_API_ROOT    l = CONFIG_SVC_API_ROOT 
                 //m= UIROUTER_API_ROOT    n = ADMIN_API_ROOT    o = THIRD_PARTY_CONSUMER_API_ROOT 
                 //p= BACKUP_RESTORE_IMG_PATH    q = ALERT_MANAGER_URI   
                 //Descriptionof Variables: 
                 //NF: Name of the NF 
                 //NAMESPACE: Namespace name 
                 //VERSION: API Version  
                 //DB_HOST: DB Host IP 
                 //DB_USER: DB User Name 
                 //DB_PASSWORD: DB Password 
                 //ALARM_DB_NAME: Alarm Service DB Name  
                 //HEALTH_MONITORING_DB_NAME: Health Monitoring Service DB Name 
                 //CONFIG_DB_NAME: Configuration Service DB Name  
                 //ALARM_API_ROOT: Alarm Service API Root
                 //HEALTH_MONITORING_API_ROOT: Health Monitoring Service API Root 
                 //CONFIG_SVC_API_ROOT: Configuration Service API Root  
                 //UIROUTER_API_ROOT: UI Router API Root 
                 //ADMIN_API_ROOT: Admin Service API Root  
                //THIRD_PARTY_CONSUMER_API_ROOT: Third Pary Consumer API Root  
                //BACKUP_RESTORE_IMG_PATH: Repository path forBackup restore image 
                //ALERT_MANAGER_URI: Alert Manager API Root 
     
               sh ''' 
                    sh /var/lib/jenkins/ocnadd_tests/preTestConfig-NewFeatures-NADD.sh \  
                    -a NADD \   
                    -b v2 \    
                    -c <ocnadd-namespace> \       
                    -d <DB_HOST> \   
                    -e <DB_USER> \   
                    -f <DB_PASSWORD> \   
                    -g alarm_schema \    
                    -h healthdb_schema \     
                    -i configuration_schema\   
                    -j ocnaddalarm:9099 \ 
                    -k ocnaddhealthmonitoring:12591 \       
                    -l ocnaddconfiguration:12590 \       
                    -m ocnaddbackendrouter:8988\   
                    -n ocnaddadminservice:9181 \       
                    -o ocnaddthirdpartyconsumer:9094 \      
                    -p <repo-path>/ocdd.repo/ocnaddbackuprestore:<tag>\     
                    -q occne-kube-prom-stack-kube-alertmanager.occne-infra.svc.<domainName>:80/<clusterName>\   
                '''   
                load "/var/lib/jenkins/ocnadd_tests/jenkinsData/Jenkinsfile-NADD-NewFeatures"}

    You can modify pipeline script parameters from "-b" to "-q" on the basis of your deployment environment, click on 'Save' after making the necessary changes.

    The description of all the script parameters is as follows:

    • a: Name of the NF to be tested in the capital (NADD).(Must not be modified)
    • b: Namespace in which the NADD is deployed. (ocnadd)
    • c: API Version. (v2)
    • d: DB Host IP as provided during deployment of NADD. (10.XX.XX.XX)
    • e: DB Username as provided during deployment of NADD.
    • f: DB password as provided during deployment of NADD.
    • g: DB Schema Name of ocnaddalarm microservice as provided during deployment of NADD. (alarm_schema)
    • h: DB Schema Name of ocnaddhealthmonitoring microservice as provided during deployment of NADD. (healthdb_schema)
    • i: DB Schema Name of ocnaddconfiguration microservice as provided during deployment of NADD. (configuration_schema)
    • j: API root endpoint to reach ocnaddalarm microservice of NADD. (<Worker-Node-IP>:<Node-Port-of-ocnaddalarm>) or default value
    • k: API root endpoint to reach ocnaddhealthmonitoring microservice of NADD. (<Worker-Node-IP>:<Node-Port-of-ocnaddhealthmonitoring>) or default value
    • l: API root endpoint to reach ocnaddconfiguration microservice of NADD. (<Worker-Node-IP>:<Node-Port-of-ocnaddconfiguration>) or default value
    • m: API root endpoint to reach ocnaddbackendrouter microservice of NADD. (Not used in the current release, use the default value)
    • n: API root endpoint to reach ocnaddadminservice microservice of NADD. (Not used in the current release, use the default value)
    • o: API root endpoint to reach ocnaddthirdpartyconsumer microservice of NADD. (<Worker-Node-IP>:<Node-Port-of-ocnaddthirdpartyconsumer>) or default value
    • p: Repository path for ocnaddbackuprestore image.
    • q: API root endpoint to reach alert manager microservice.

Running OCNADD Test Cases

To run OCNADD test cases, perform the following steps:
  1. Click the Build with Parameters link available in the left navigation pane of the NADD-NewFeatures Pipeline screen. The following page appears:

    Figure 4-13 Pipeline NADD_NewFeatures


    Pipeline NADD_NewFeatures

  2. Select Configuration_Type as Product_Config.
  3. In Select_Option:
    • Select All to run all the feature test cases and click the Build button to execute the pipeline
    • Choose Single/MultipleFeatures to run the specific feature test cases and click the Build button to execute the pipeline