How to Sync Actions using Code Editor?

To ensure your custom method becomes available for use in SimplifyQA test cases, you need to sync the action after writing your code.

Prerequisites

  1. The Code Editor should be properly installed and set up, and the user should be working with annotated methods using @SyncAction.

Syncing Global and Project-Level Actions in SimplifyQA

  • Global (Customer-Level) Actions: These are reusable actions that are available across all projects under a single customer account.

  • Project-Level Actions: These are specific to an individual project and are not accessible across other projects. They are useful for project-specific logic or customizations.

The user can choose to sync the custom method either from the SimplifyQA platform or from the SimplifyQA Code Editor.

Sync the Custom Method from SimplifyQA

  1. Use the @SyncAction Annotation While writing your custom method in the Code Editor, ensure the method is annotated with @SyncAction. This annotation helps SimplifyQA recognise and register the method as an action that can be reused in test steps.

  2. The syntax for Sync annotation should be as follows:

@SyncAction(uniqueId = "[unique id]",groupName = "Generic",objectTemplate = @ObjectTemplate(name = TechnologyType.GENERIC,description = "This action belongs to GENERIC"))

Below is the explanation of sync annotation,

  • uniqueId: A unique identifier for the action to avoid conflicts during syncing.

  • groupName: The category under which the custom action will appear in test cases in SimplifyQA.

  • @ObjectTemplate: Defines the platform type and description for the custom action.

  1. Use build.bat to compile the code and navigate to SimplifyQA.

    • Go to Profile > Settings > Configurations

  • Navigate to 'Actions' tab and locate 'Sync' button.

  • Click Sync Action.

  • SimplifyQA will fetch the latest methods annotated with @SyncAction from the code editor. User can accept or reject the sync actions from here.

  • Now your custom method is available to use in any test case

Sync the Custom Method from Code Editor

  1. Ensure the method is correctly annotated using @SyncAction.

  2. The code must be built successfully using build.bat (for Windows) or ./macBuild.sh (for macOS).

  3. Post which run the command : sync.bat (for Windows) or macsync.sh (for macOS).

  4. This will sync all methods that include the @SyncAction annotation into SimplifyQA, making them available for use in test cases.

Syncing actions ensures that custom methods written in the Code Editor are recognized by SimplifyQA and become available for use in test automation. By using the @SyncAction annotation and regularly syncing after publishing, teams can extend their testing capabilities with reusable, project-specific logic in a structured and efficient way.

Frequently Asked Questions (FAQs)

What happens if I forget the @SyncAction annotation?

If you do not include @SyncAction, the method will not be available in SimplifyQA’s action list even if the code is pushed and published.

How often should I sync actions?

You should sync actions every time you write a new custom methods or modify existing ones to make them available in SimplifyQA.

Can multiple custom methods be synced at once?

Yes, all methods annotated with @SyncAction will be synced together when you run the Sync Action from SimplifyQA.

Do I need admin access to sync actions?

No, syncing actions can be done by users with appropriate privilege. However, configuring the Code Editor requires admin privileges.

Last updated