- addons
What is an Addon?
Addons Community Marketplace
Install and Use Community Addons in Testsigma
Prerequisites for creating add-ons
Create an Addon
Update Addon
Addon Types
Create a Post Plan Hook add-on in Testsigma
Create OCR Text Extraction Addon
Creating an Addon in Testsigma
Testsigma enables you to extend its functionality by creating add-ons. You can use add-ons to perform specific tasks that the default features of Testsigma do not cover. This document guides you through the process of creating and using an addon in Testsigma.
Prerequisites
Before you start creating an addon, ensure you have:
- Basic understanding of Java and Maven.
- Ensure you have JUnit or TestNG configured as the Test Runner in your IDE.
- Set up a development environment with an IDE for Java (e.g., IntelliJ IDEA, Eclipse).
Understanding the Purpose of Addons
Addons in Testsigma enhance your testing capabilities by enabling you to create custom functionalities tailored to your specific needs. Each add-on action has a distinct purpose:
- Custom Actions: You can automate tasks specific to your application using Custom Actions not covered by Testsigma's built-in actions. Integrate unique functionalities into your tests as needed with these actions. For more details on creating custom action in add-ons, refer to the documentation on creating custom action in add-ons.
- Test Data Generators: Create custom data generators for the specific test data your scripts require. Customize these generators to fit the unique data needs of your testing scenarios. For more information on creating custom data generator add-on, refer to the documentation on creating custom data generator add-on.
- Conditional If Actions: Execute a sequence of steps based on specified conditions to control test flows dynamically. You can use these actions to manage test execution based on runtime conditions. For further details on creating conditional if loop add-on, refer to the documentation on creating conditional if loop add-on.
- While Loops: Repeat the steps until you meet a condition, which is useful for scenarios that require multiple iterations. Implement these loops to handle repetitive actions until you achieve the desired outcome. For more information on creating while loop add-on, refer to the documentation on creating while loop add-on.
- Post-Plan Hooks: Define actions that run after the completion of a test plan, regardless of its outcome, using Post-Plan Hooks. Use these hooks to automate tasks that need to occur after a test plan finishes. For more information on creating a post-plan hook add-on, refer to the documentation on creating post-plan hook add-on.
Creating an Addon Template
- Click on the Addons icon from the left navigation bar and click Add-ons from the dropdown.

- Click on the + New Addon button at the top right of the Addons page.

- Enter the Addon Name and provide a brief Description of what the addon does on the Testsigma Addon pop-up, then click Create. A zip file containing the template code will be downloaded automatically.

- Alternatively, open the addon and click the Download icon to get the source code. This action will download a zip file containing the sample template code, which you can use to add your code.
Updating the Action Code
- Unzip the downloaded file and open the extracted folder in your IDE as a Java project. Ensure that Maven is set as the build tool.
- The downloaded folder contains a Java Maven project with a pom.xml file and sample templates for Web, Mobile Web, Android, and iOS Application.

-
Refactor the sample code based on your requirements:
- Action Text: Customize the action text.
- Selenium or Java Code: Add Selenium or Java code to define the action.
- Elements/Locators: Modify elements or locators as needed.
- Test Data: Update the test data in the test class according to your requirements.

Here’s how you can change the code for an Android add-on to swipe left a specific number of times.
Validating the Addon Code
- Use JUnit or TestNG as your test runner.
- Right-click on the test class in your IDE and choose to run it as a JUnit or TestNG test.
- Verify that the add-on performs as expected.

Uploading the Updated Code
-
Once you have validated the code, save your changes. Zip the project folder. You can use a command in a bash shell like:
zip -r addonName.zip . -x "*" - Go to the Addons page, select your add-on, and click Upload Code.

- Browse and select the zipped file, then click Update.

-
Additional options in the dropdown include:
- Edit Description: Update the description of your add-on if needed.
- Manage Tags: Add tags or labels to organize your add-on.
- Deprecate: Delete the add-on if necessary.
Publishing the Addon
-
After uploading the code, click on Publish from the dropdown menu.

Then, choose your publish options:
- Public: Make the add-on available to the entire Testsigma community.
- Private: Restrict availability to users within your organization.
- Once you select the required option, click Publish.

- An automatic security check will be done. If it passes, the add-on will be published. If it fails, you will get an email notification.
Testsigma Support team will review your publishing request for trial users and send you an email notification once they approve the add-on.
Using the Addon in a Test Case
- Create a new test case or open an existing one. Click Add New Step and search for the action using the keywords.
- Look for the Addon icon before the test step to indicate it's from the Addon.
- Select it from the suggestions, update the test data and element, and then click Create Step.
