You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 67 Next »


Introduction

CDRouter is a comprehensive test tool for Cable/DSL/SOHO/Edge and wireless routers and other similar IP devices. The test suite contains several types of tests including functional, conformance, negative, denial of service, and scaling. CDRouter test suite simulates a networking environment by creating LAN clients, providing an ISP connection to the device under test, and exercising different protocol and traffic flows. CDRouter can create IP hosts and services that appear to be operating out in the Internet.

Previously, we utilized the CDRouter UI to trigger CDRouter test executions and review CDRouter execution results. However, after the integration of CDRouter into Automatics, we now have the capability to execute all 1.0 ,3.0 test cases and CDRouter test cases exclusively through Automatics.

  • Following diagram shows interaction of Orchestration tool with CD Router Automation Engine via CD Router Service. (Trigger execution steps is explained below)
  • No Jenkins resources are needed for triggering test execution.


CDRouter Rest APIs 

Test Configuration side

APIs available

  1. To get the list of packages configured in CDRouter,  we can use webAPI mentioned in below link

https://support.qacafe.com/cdrouter/cdrouter-web-api/packages#list-packages

       2. To get the list of test scripts/test names in a package,  we can use webAPI mentioned in below link

https://support.qacafe.com/cdrouter/cdrouter-web-api/packages#get-a-package

       3.To get the device configs,  we can use webAPI mentioned in below link

https://support.qacafe.com/cdrouter/cdrouter-web-api/devices#list-devices

       4.To get the test configs,  we can use webAPI mentioned in below link


https://support.qacafe.com/cdrouter/cdrouter-web-api/configs#list-configs


Execution side

APIs available

  1. To trigger an execution job in CDRouter, we can use webAPI mentioned in below link.  

           Inputs to be passed are package name, device config and test config

               On success, it will return 200 response code and status of execution will be Pending initially.

  1. To get the status of job, we can use the below rest endpoint

             We can think of background thread checking for updates of running jobs from cdrouter.

              https://support.qacafe.com/cdrouter/cdrouter-web-api/jobs#get-a-job

      3. To get execution result of job, we can use webAPI mentioned in below link. The input to the rest api result id and in output we overall status count of all test cases.

     "loops": 5, "tests": 2552, "pass": 0, "fail": 1150

APIs required

  1. Requires an endpoint to get details of test cases/test names configured in a pacakage
  2. Requires an endpoint to get result status and logs separate for each test case in a package

CD Router and Automatics in CI/CD Pipeline

  • User Triggers CDRouter test from Automatics CI environment.
  • Then Automatics Orchestration gets the required details and device details from Device manager and the request to CDRouter microservice which again sends the request to device manager.
  • Device manager sends the response to CDRouter microservice and then the microservice sends the trigger request to CDRouter device and then CDRouter sends the trigger test response to CDRouter microservice.
  • Then CDRouter microservice updates the result shos in the CI portal where user can see the end results.




Use Case

Changes in Existing Screens

Existing PagesPurposeChanges Expected

E2E RDK Request Filter Page

Configure CD Packages for CI executionsNew Tab for selecting CD Router Tests
Trigger Execution Manually PageUser can select CDRouter packages trigger executionsNew Tab for selecting CD Router Tests
Job Manager PageUser can view the progress of CD Router package executions - Each job will show the status of single packageChange in actions button since Jenkins is not needed
Execution Results PageTo view overall execution results like Total script count, and its pass and fail countNo change in UI
Detailed Execution Results PageTo view the execution results of each test script (in cd router each test case contains only one step)No change in UI
Manage script pageTo map cdrouter package with automatics automation idChange in components that are displayed, new fields to come in

E2E RDK Request Filter Page

In the request filter page, new tab Cd Router Tests will be coming where user can select Cd Router Tests for CI/CD integration

After Cd Router automation ids are selected, they are displayed in the main page of E2E RDK Request Filter Page.

Trigger Execution Manually Page

From the Trigger Execution Manually Page, user can select the Cd Router tests for execution.


DB Structure

Adding 2 new tables to automatics DB:

Reference CD Router Web APIs:

https://support.qacafe.com/cdrouter/cdrouter-web-api/.


Trigger Execution from Automatics Orchestration

Following diagram shows the interaction among Automatics CD Router service and CD Router Automation Engine

Note: Before Triggering a testcase user has to enable the corresponding package by navigating to job manager page and enable the package and click on edit script details button and map the device.(All the steps are explained under JOB Manager page please go through it for more clarification) 

 1. Navigate to the URL "https://automatics.rdkcentral.com/Automatics/login.htm ", login and select 'Trigger Execution Manually' from the 'Manage Trigger Dropdown'.

2. Enter the build name and Select the Execution Environment Type, quick test if needed. Click on next button if all the mandatory fields are added.


3. Select the corressponding Automation ID and click on Next button.


4. Enter the Device mac address and click on Trigger Job button you can see a pop-up that execution is triggered successfully.


Manage Script Page

Steps to select only CD router testcases.


1.  Navigate to manage scripts page by selecting 'Manage scripts' under Test Manager dropdown.

2. Under Filter dropdown scroll till 'Select Test Source' tab and select 'CDRouter' from the drop down and click on filter button.



3. User can see all the CDRouter testcases that are present. 


Editing TestScript Details of CDRouter testcases

1.  Navigate to ManageScripts page under 'Test Manager' drop down and filter the CDrouter Testcases followin the above steps.(ManageScripts →filter → Select CDRouter under 'Select TestSource' → click filter)

2. Now click on the Edit Script Details Icon corresponding to the testcase to be edited.
3. Now user can see a pop-up, check all the mandatory fields to entered/changed. update the corresponding fields and click on next button

4. Under 'Select Test Source' drop down user should select CDrouter. 


5. User should enter the mandatory fields and and click save button to save the changes.

Job Manager

When the user triggers the job and navigating to the Manage Test Trigger page, user can verify the job status depending on their testcase (RDKV or RDKB) and selecting the Job Manager button can able to see the triggered Job.

 To find the execution results by clicking this button  Once testcase triggered successfully. Following image will be available.


User can find the full execution logs by clicking this button.  . User can get the full execution logs and find out the pass and failure steps in detail. 

By clicking this icon we can see the child Jobs name. After that click on this icon . Then CDRouter Execution logs will be available in the Jenkins icon. We can verify pass and failures of all the steps. 


 Configuration Changes in Orchestration

1.User should make the following changes

     1.1 Setting Pagination Limit

 Pagination Limit: User has the freedom to set the pagination limit

If the user sets the pagination limit to 10, it means that in a single API call, the orchestration side will receive 10  packages. If there are a total of 30 packages and the pagination limit is set to 10, then these packages will be fetched in three requests. This approach is implemented to maintain a constant JSON size and to minimize any potential overhead, ensuring efficient processing.

 user can set pagination limit in both the ways one using UI and and other using MySql DB.


 1.1.1 Using UI

  1.User should navigate to 'https://automatics.rdkcentral.com/Automatics/login.htm' url and click on 'System Configuration' under settings drop down as show in the image below.

   


2. User should click on 'Add configuration' shown on the top right corner of the System Configuration page and add the Configuration name and configuration value accordingly and click on save changes button.


1.1.2 Using MySql 

 user should be able to set the pagenation limit from master_config table. ( User should set CDROUTER_PAGINATION_LIMIT from MASTER_CONFIG table  ).

user has to run this query to update 

INSERT INTO master_config (CONFIG_NAME, CONFIG_VALUE) VALUES ('CDROUTER_PAGINATION_LIMIT', '10');


2.  Setting CD Routers url

    • If there are multiple CDRouters in a single setup, the user has the option to provide details for each CDRouter by specifying their respective URLs and specific names. This allows users to include information about different CDRouters present in the same setup.

2.1.1 Using UI

1.User should navigate to 'https://automatics.rdkcentral.com/Automatics/login.htm' url and click on 'System Configuration' under settings drop down as show in the image below.


2.  User should click on 'Add configuration' shown on the top right corner of the System Configuration page and add the Configuration name and configuration value accordingly and click on save changes button.


user should set the urls for different CDRouters available in MASTER_CONFIG table. If more than one CDRouters are available also user has to set the urls according in the master_config table under CDROUTERS column. the values entered by the user should be in Json format only as shown in the figure.

Example : (CDROUTERS master config value:
[{"name":"CDRouter1","url":"http://123.456.789.012"},{"name":"CDRouter2","url":"http://987.654.321.012"}] )

INSERT INTO master_config (CONFIG_NAME, CONFIG_VALUE)
VALUES ('CDROUTERS', '[{"name":"CDRouter1","url":"http://123.456.789.012"},{"name":"CDRouter2","url":"http://987.654.321.012"}]');



1.3 Setting CDRouter base Url:

    • User should provide CDRouter base url beacuse it's responsible for orchestrating CDRouter test executions.

       1.3.1 Using UI 

               user can add CDRouter service base url also by following above steps but changing the configuration name and configuration value accordingly.
               


1.3.2 Using MySql DB

user should set the base CD router url in master-config table under CDROUTER_SERVICE_BASE_URL column.
Example: http://localhost:8080/api/cdrouter/service

INSERT INTO master_config (CONFIG_NAME, CONFIG_VALUE)
VALUES ('CDROUTER_SERVICE_BASE_URL', 'http://localhost:8080/api/cdrouter/service');

Note: user should add their base CDRouter service url when they setup the CDRouter service 



3.Adding a new test type as CDROUTER

1. Navigate to the URL 'https://automatics.rdkcentral.com/Automaticsdev/login.htm' and select 'System Configuration' under the settings drop down as shown in the below image.


2. User should search for 'Test_Types' in the search bar and click on the edit button present on the right side of the page.


3. user should add 'CDROUTER' in the configuration value and click on save changes to save the new test_type.


 

4.Creating a New Job as AUTO_CDROUTER_TEST_JOB

  1.  Navigate to the URL 'https://automatics.rdkcentral.com/Automaticsdev/login.htm' and select 'Job Settings' under the settings drop down as shown in the below image.


2. Click on add new job on the right top corner as shown below.


3. User should add the following details under 'Enter Job Name' add AUTO_CDROUTER_TEST_JOB' and under select parent job add 'AUTO_QUICK_TEST_JOB' and click on save button.




5. Adding CDRouter Base URL in Manage Script Page

  1. User should navigate to manage Scripts page and click on 'run on models' button seen on top the page.

 

    2. User should add CDRouter base url "http://192.168.162.176/" under Device Name and add'CDROUTER' as Image Name prefix. Select the device type in Select Category and click on save button.
        it's a mandatory step that user should follow.

Configuration Changes in MicroService

1.Java Version

This microservice needs JAVA 11 to run. User should use Java 11 to make this microservice up. please refer setup page for steps to install Java 11.

2. Automatics base url
         In CDrouter service  user should navigate to application.properties and update automatics.url with proper automatics base url and save the changes.



 






  • No labels