FlexDeploy is an Enterprise DevOps platform with fully integrated support for Salesforce apps, metadata customizations, integrations, and more. This is the last article in a blog series that will help you understand what makes FlexDeploy a perfect choice to implement DevOps, CI/CD, and release automation with Salesforce.

Here is a summary of the FlexDeploy Loves Salesforce series.

FlexDeploy’s extensive set of features for Salesforce and Test automation with test plugins:

  • Ensure that Salesforce changes work as expected.
  • Provide a suite of regression tests that can be rerun every time so you don’t break existing functionality.
  • Meet code coverage requirements as per your preset thresholds.
  • Ensure high-quality deployment to production and happy business users.

DevOps for Salesforce eBook

Unit Tests

The Apex testing framework enables you to write and execute tests for your Apex classes and triggers. Apex unit tests ensure high quality for your Apex code and let you meet the requirements for deploying Apex. You can configure your test levels at the package level and ensure that tests are executed during deployment.

Test Level options in the Package Details tab

Apex tests will be executed as part of the deploy or validate package and results will be captured. You can view the results in FlexDeploy and also automate deployment promotions based on test results, ensuring your package will get promoted to the next environment only if you have successful results. Users can be confident the required unit tests are executed and have visibility on what got executed.

Project Workflow Execution for FlexDeploy's support for Salesforce

Code Coverage

Define code coverage thresholds in FlexDeploy. For example, you can stipulate that at least 75% of Apex code must be covered, and all those tests must pass. From your Apex Test, the code coverage percentage will return as output. You can look at those results for manual approval or define a gate in your pipeline to act upon. FlexDeploy will notify the developer/team to work on the unit tests to increase the coverage.

Static Code Analysis

Along with Unit testing, most of our customers use static code analysis tools like PMD and SonarQube to increase the quality of the code. These tools help find Bugs, Security Vulnerabilities, and Code Smells. FlexDeploy has support for both of these tools, and you can automate the executions after pulling the code from your Org or before deploying. You can view the results in FlexDeploy and also take automated actions based on the results.

This analysis is normally done after pulling the Apex code from a Salesforce Org or Source Control (like Git). You could also configure your workflow to re-run the analysis before approving the deployment to each environment.

analyzeApexCode option in the Execution Steps tab

FlexDeploy will execute the analysis based on your custom rule file if you have one. Otherwise, it uses the default rules. You can view reports in FlexDeploy for manual approvals or you can configure to fail or auto promote the package based on the results.

The PMD Static Code Analysis Report in the Reports tab

Based on the priority, any issues get a separate report file to view and/or download.

Test Automation

FlexDeploy’s full-grown Test Automation framework can be utilized to configure what tests run in each environment. Test automation tools like Selenium, Tosca, HP UFT, and Automation Anywhere can be used to execute tests. Simply configure FlexDeploy to execute the tests and automate the code promotions based on the test results.

Test Automation for Salesforce Deployments in the Strategy tab

FlexDeploy has a robust pipeline and release automation system. With that, all the results from the same environment or any of the previous environments can be verified prior to promoting the changes.

FlexDeploy's Salesforce deployment pipeline

FlexDeploy provides many capabilities in Test and Code review to achieve high-quality Salesforce deployments. But you don’t need to have all of it on day one. You can mature the process as you go with simple configurations.

Share this:
Rama Rimmalapudi

I have been working as a Integration Architect for the past 10 years, with over 17 years of experience in software Architecture, Design, Development, Performance Tuning and production support of Java/J2EE based applications. I have 8+ years of experience designing enterprise applications using Oracle Fusion Middleware, building custom applications using ADF and System Integrations using SOA Suite & MuleSoft. I have extensive knowledge with DevOps, Release Automation, Application Integrations, WebLogic and Coherence in high volume and highly available deployment configurations.

More posts by Rama Rimmalapudi

Leave a Reply

Your email address will not be published. Required fields are marked *