Best practices for testing

RECOMMENDATION: We recommend a development process that includes all major types of testing – unit, integration, UI automation, performance and security. 

Following is a list of all major types of testing and the recommended best practices in the context of add-on development:

Unit testing

We recommend using a powerful mocking framework when testing custom code that has Sitefinity CMS dependencies. JustMock provides for unrestricted mocking of dependent objects, including non-virtual methods, sealed classes, static methods and classes, as well as non-public members and types.

Integration testing

When developing for Sitefinity CMS, you need to cover your custom code with integration tests that use the Sitefinity CMS context in order to test your custom logic in an actual environment. The Sitefinity CMS web test runner connects to the Sitefinity CMS application and queries all of the tests available. For more information, see Tutorial: Create integration tests with Sitefinity CMS web test runner.

UI automation testing

When testing the developed add-on, we recommend using a setup with an empty Sitefinity CMS application with the add-on installed on it. This environment can be used for the execution of GUI automation tests that verify that the add-on works as expected from an end-user perspective. We recommend ensuring that the test cases cover all steps of the installation, import of content, and use of the given add-on.

Security testing

In addition to the Basic Security Practices for Web Applications, we recommend using static application security testing (SAST) and dynamic application security testing (DAST) tools.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?