Code quality check in RPA Hub
Summarize
Summary of Code quality check in RPA Hub
Code quality check in RPA Hub is a crucial process that evaluates automation files or scripts to ensure they comply with coding standards, best practices, and maintainability requirements. This process helps identify potential issues early in the RPA development lifecycle, promoting robust and efficient automation solutions.
Show less
RPA release managers or admins select predefined code quality rules within the RPA Hub instance. The RPA Desktop Design Studio then performs built-in code quality checks before publishing automation packages. Developers can proactively run these checks on specific activities or entire projects to detect errors or warnings.
Key Features
- Rule selection and management: RPA admins and release managers choose from a predefined set of rules and can edit attributes such as severity, regular expressions, and activation status within the code quality rule form.
- In-built checks in Desktop Design Studio: Code quality checks are integrated into the development environment, with a results window displaying detailed issues that can be examined and addressed before publishing.
- Severity-based publishing control: The ability to restrict package or bot process publishing based on error or warning severity, configurable via the system property
snrpafdn.restrictpackagebyseverity. - Visibility of quality results: Code quality check outcomes are recorded and viewable in the associated package version form in RPA Hub.
- Configurable timeouts: The system property
snrpafdn.codequalitychecktimeoutallows setting a maximum duration for code quality checks to complete.
Configuration
To enable the code quality check feature in RPA Hub, set the system property snrpafdn.enablecodequalitycheck to true. For controlling publishing restrictions based on severity and setting the check timeout, configure the respective system properties mentioned above. These configurations ensure that quality checks are enforced consistently across development and deployment stages.
Practical Benefits for ServiceNow Customers
- Ensures automation packages meet prescribed quality standards before deployment, reducing runtime errors and maintenance overhead.
- Empowers RPA teams to identify and fix issues early through proactive checks within the Desktop Design Studio.
- Allows administrators to enforce compliance policies by restricting publishing based on severity of code issues.
- Provides transparency into code quality status via the RPA Hub interface, facilitating better release management decisions.
A code quality check refers to the process of evaluating the automation file or script to assess its adherence to coding standards, best practices, maintainability, and overall quality.
Code quality check overview
Code quality checks are essential in RPA development life cycle, to ensure that the automation file is robust, efficient, and free from common issues that could lead to errors or difficulties in the future.
RPA release managers or RPA admins select code quality check rules from a pre-defined set of rules in the RPA Hub instance.
Then, the RPA Desktop Design Studio performs an in-built code quality check before publishing a package. RPA developers can also perform pro-active code quality check on a package in the RPA Desktop Design Studio by inspecting an activity or a complete automation project for any issues, using the Code Quality Check feature.
The issues and their details are displayed in the Code Quality Check Results window. Double-click an individual entry to view the component that has displayed an error or a warning. Troubleshoot the issues before you publish the automation project to RPA Hub. For more information on how to perform Code Quality Check in RPA Desktop Design Studio, see Code quality check in RPA Desktop Design Studio.
If an error or a warning occurs in the automation, a decision is derived if the package can be published successfully or not, based on the system property [sn_rpa_fdn.restrict_package_by_severity] configuration (error, warning, or no restrictions). For more information about compliance rules for RPA Desktop Design Studio, see Code quality check compliance for RPA Desktop Design Studio.
If a package version is marked with code quality result as error or warning, a decision is derived if the bot process can be published successfully or not, based on the system property [sn_rpa_fdn.restrict_package_by_severity] configuration (error, warning, or no restrictions). For more information about compliance rules for RPA Hub, see Code quality check compliance for RPA Hub.
View a list of the pre-defined code quality rules in the RPA Hub instance. For more information, see Code quality rules list in RPA Hub.
View a code quality rule form along with the type and description. For more information, see Code quality rule form in RPA Hub.
In the code quality rule form, RPA release managers and admins can edit the Severity, Regular Expression, Active, and Value fields.
View the result of the code quality check, in the Code Quality Result field of an associated package version in RPA Hub. For more information, see Package Version form in RPA Hub.
Configuration
To enable the code quality check at the instance level, ensure that you mark the new system property sn_rpa_fdn.enable_code_quality_check as true.
- sn_rpa_fdn.restrict_package_by_severity - To set a restriction on publishing a package from RPA Desktop Design Studio and publishing a bot process in RPA Hub.
- sn_rpa_fdn.code_quality_check_timeout - To enter a maximum duration, in minutes, for the completion of the code quality check.