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

Compare with Current View Page History

« Previous Version 11 Current »



Introduction

A smart debugger greatly enhances the effectiveness of test case development by simulating test execution in debug mode. Users can strategically place breakpoints within test steps, allowing Jenkins to pause execution at these designated points. The test steps which has breakpoint won't be executed until the user resumes the test execution. For the Automation Developers, while developing the testcase itself they can use this testcase debugger feature for validating the testcases.


Configurations in Orchestration

Add Configs in System Configuration Page

  1. Launch Automatics Orchestration tool. From menu select Settings → System Configuration as shown in the image below.

       


2. Click on 'Add configuration' shown on the top right corner of the System Configuration page and add the following 3 configurations and click on save changes button.

Parameter NameDescription
DEBUGGER_SERVICESmart Debugger Service Base URL
SMART_DEBUGGER_JENKINS_CONFIG

This is the configuration of the jenkins job which will be used for the debugger feature test execution. It is done in json format. Two jenkins job details has to be mentioned which are the scripted and scriptless jenkins job.
scriptlessDebuggerJobName - provide the name of the scriptless debugger job
scriptedDebuggerJobName - provide the name of the scripted debugger job name
scriptlessJenkinsServerBaseUrl - provide the base URL of the jenkins application in which the scriptless debugger job is present
scriptedJenkinsServerBaseUrl - provide the base URL of the jenkins application in which the scripted debugger job is present
scriptlessJenkinsServerUserName - provide the user name of the jenkins application in which the scriptless debugger job is present
scriptedJenkinsServerUserName - provide the user name of the jenkins application in which the scripted debugger job is present
scriptlessJenkinsServerPassword - provide the password of the jenkins application in which the scriptless debugger job is present
scriptedJenkinsServerPassword - provide the password of the jenkins application in which the scripted debugger job is present

eg:
{"scriptlessDebuggerJobName":"SCRIPTLESS_JOB_SMART_DEBUGGER","scriptedDebuggerJobName":"SCRIPTED_JOB_SMART_DEBUGGER","scriptlessJenkinsServerBaseUrl":"http://localhost:8081/jenkins","scriptedJenkinsServerBaseUrl":"http://localhost:8082/jenkins","scriptlessJenkinsServerUserName":"username","scriptlessJenkinsServerPassword":"xyz","scriptedJenkinsServerUserName":"username","scriptedJenkinsServerPassword":"pqr"} 

AUTOMATICS_DNS_BASE_URL

Provide the DNS (Domain Name System) base URL of the Automatics application.

eg: https://rdkm/Automatics


Configurations in Automatics Properties

Launch Automatics Properties application and add the below configuration.

Property NameDescription
debuggerService.base.urlSmart Debugger Service Base URL





Setup Jenkins Job For Smart Debugger

Jenkins job is getting used in the Automatics to execute the test case in debug mode. Partner can refer Smart Debugger Jenkins Setup for detailed steps on how to setup jenkins job for smart debugger.

Smart-Debugger Service Setup

Software Requirement

  • JDK 17

  • Maven 3

JDK 17 Setup Details

Follow Steps below to install Java 17 on CentOS/linux.

    • Update before installing any new program

      yum -y update
    • Install Java 17

      yum install java-17-openjdk
    • Verify Java is Installed

      java –version

Building debugger Service Source Code

  1. Clone Debugger Service source code from Debugger Service
  2.  Open debuggerservice/src/main/resources/application.properties in source code and update automaticsBaseUrl with automatics base url and save the changes.
  3. Build the source code using maven to generate the jar file

"mvn clean install

Deployment

  1. Copy the jar file to the VM where Debugger Service to be deployed.
  2. Create 2 directories debugger-service and logs in VM.
  3. Copy the jar file to debugger-service directory.
  4. Run the below command from debugger-service directory to bring the Debugger Service up in the VM.

    nohup java -XX:+UseSerialGC -Dlog4j2.formatMsgNoLookups=true -jar debuggerservice-0.0.1-SNAPSHOT.jar > logfile.log 2>&1 &
  5. debuggerservice.log file will be created in the logs directory and we can check the real time logs of the Debugger Service using this file.

Steps for Smart Debugger Execution

1. In step builder page at the top, developer can find a debugger icon. Click on the icon to open the testcase debugger popup.


2. In the debugger popup, developer can see configuration options to start the execution.


After starting the execution, click on EXECUTION LOGS panel to see the execution logs.


3. At the bottom of the page, automation developer can see the available steps from the testcase loaded in table.

4. Functionalities:

    Status involved in step execution:
        * YET_TO_START
        * IN_PROGRESS
        * PAUSED
        * PASS
        * FAIL


    * Output: Step output will be added in output column of the table.

    * By using Checkboxes at the left side, automation developer can select/unselect the steps for the execution. So, if automation developer wants to execute sepecific steps they can select the steps on demand for the execution.

    * Click on PAUSE button to pause the execution and use the PLAY button to resume the execution.

    * Automation Developers can see the Jenkins execution logs using the Jenkins icon at the top right corner.



For the test execution team, separate dashboard was there under Manage Test Trigger menu. This option is available under Manage Test Trigger tab → Test Case Debugger

To start the debugger execution, please follow the below steps: 

1. Select Testcase Type

    * Scriptless - To load the Scritless testcases (i.e. created from Build Testcase page)
    * Scripted - To load the scripted testcases (i.e. Testcases that has its own scripts in Test projects).

2. Select Environment Type and enter valid Device Mac of the Rack Device.

3. Upon the previous inputs Testcase IDs will be populated in Test case ID select box. Select the test case from the drop down.

4. After giving all the inputs click on Load Steps button at the left side.

5. After loading the steps into the table present in Available Steps division, click on the START button to start the execution.





  • No labels