Using .jar File for Uploading Custom Actions and Interacting with the Dashboard

Modified on Fri, 21 Jun at 6:10 PM

TABLE OF CONTENTS

1. Uploading Custom Action Files Using .jar Files into algoQA 

1.2. JAR File Overview 

1.3. Jar File Usage

2. Execution of .Jar file via Command Prompt

3. To Insert Database into Dashboard
 

1. Uploading Custom Action Files Using .jar Files into algoQA 


This feature allows you to upload custom action files into the Custom Setting Editor screen and Customize Framework functionality using .jar files. These files are stored in the Utility folder generated within the Test Cases folder. When you modify the generated scripts and upload these modified scripts (custom files), the custom files are reflected in the profiler interface.


1.2. JAR File Overview 

A JAR (Java Archive) file is a single file that stores compressed versions of .class files (Java program files), along with other types of files like audio files, image files, or entire directories. You can think of a .jar file as similar to a zipped file (.zip), which is created using WinZip software.

Following procedure is applicable for Java Selenium framework when you create a custom action specific to a use case.
.

1.3. Jar File Usage

  • Dashboard Interaction:
    Use the .jar file to insert data into the database for dashboard purposes.

  • File Upload:
    Execute the .jar file with the appropriate command-line argument ("-upload-argument") to upload files via the command prompt.


2. Execution of .Jar file via Command Prompt


algoQA supports customization and extension of your framework by allowing you to upload custom files and view it on the dashboard. This can be done using the Customize Framework functionality and uploading scripts to the Utility folder while configuring custom actions.


Execution of the 'Jar file via command prompt to upload files in the algoQA generated Script folder

  1. Ensure that the appropriate files and packages are installed on your system.
  2. Navigate to the algoQA generated folder structure containing the .jar file and open the command prompt from that location, as shown:
  3. Run the following command:
    java -jar algoQAUtil.jar
    If you're unsure of the .jar file name, run the following command in the command prompt for more information:
    java -jar algoQAUtil.jar - help. 
    
    

  4. While configuring custom action, run the following command to upload a custom action file in Code Editor screen to the required Utility file and press Enter to update the path. Enter the file path as shown:

    java -jar algoQAUtil.jar -upload
    Enter File Path (s): 
    C: \\Users\\HP\\Downloads\\WebBrowserUtil.Java. Ensure to replace with the actual path.
    
    


  5. Enter Y  to upload the file to utility folder and press Enter.

  6. File uploaded successfully message is displayed.

  7. If you wish to upload the custom action file via customize framework functionality, perform the following: 

    1. Make use of up and down arrow keys in your keyboard to navigate to the following command.

      java -jar algoQAUtil.jar -upload 
    2. Type N to not upload file into the utility folder and press Enter.

    3. Type Y to  upload file  onto  Customize Framework  functionality and press Enter

    4. After uploading the file, you will see File uploaded successfully message.


  8. You can view the uploaded files within the Test Cases folder.

3. To Insert Database into Dashboard

Ensure the algoQA script is executed and report is generated.

Perform the following: 

  1. Run the following command in the command prompt:
    java -jar algoQAUtil.jar -dashboard

  2. After the data is inserted, a confirmation message saying 'data inserted to database successfully' is displayed.


 
















Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article