Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contentschildren

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.

Image Removed

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 restapi 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 package.
  2. Requires an endpoint to get result status and logs separate for each test case in a package.

CDRouter and Automatics in CI/CD Pipeline

  • User Triggers CDRouter test from Automatics CI environment.
  • Then Automatics Orchestration gets the required details from Automatics DB and device details from Device manager and then sends trigger request to CDRouter microservice which again sends the request to device manager.
  • Then device manager sends the response to CDRouter microservice and then the microservice sends the trigger request to CDRouter device, where execution of the testcase happens.
  • Then CDRouter sends the test results response to CDRouter microservice.
  • Then CDRouter microservice updates the result in the CI environment where user can see the end results from Job manager page.

...

CDRouter CI Flow

  • user can view the different CDRouter execution from the following diagram.
    example: to view CDRouter Ci execution result user has to navigate to Job manager page and can view the the detailed result. (For more information, please go through Job Manager section provided in this page).

Image Removed

Changes in Existing Screens

...

New Drop Down for selecting CD Router Tests

via Test Source

...

Trigger Execution Manually Page

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

Image Removed

DB Structure

Adding 2 new tables to automatics DB:

Image Removed

Reference CDRouter Web APIs:

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

...

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

Image Removed

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 Automatics URL, login and select 'Trigger Execution Manually' from the 'Manage Trigger Drop-down'.

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.
Image Removed

...

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

Image Removed

...

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. 

Image Removed

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

Job Manager

Image Removed

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 Image Removed Once testcase triggered successfully. Following image will be available.

Image Removed

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

Image Removed

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