Scalability testing is the testing of a software application to measure its capability to scale up or scale out. Scalability testing is generally based on the amount of data being managed by the application at runtime in comparison to the resource constraints of the environment. A classic example is if the application is managing a large amount of data but the environment has a limited amount of memory, the application may exhibit scalability issues.
One of the traditional challenges of performing scalability testing on an application is creating an environment with a large amount of data. This is especially true in environments where the data may contain personally identifiable information (PII) or there are regulatory compliance restrictions such as in healthcare. In these cases you need to either develop a process for obfuscating the data when it is utilized in lower environments, or generate the data synthetically.
One of the unique capabilities in Oqtane which is beneficial for scalability testing is Site Templates. Site Templates are based on a Configuration-as-Code (CaC) approach which allows you to automate the configuration of an Oqtane site. By utilizing Configuration-as-Code, a developer has complete flexibility to orchestrate the environment. This is very similar to the approach used in .NET Aspire, the new tools from Microsoft designed to improve the experience of building cloud-native applications.
Site Templates need to implement the ISiteTemplate interface which contains a single method:
public List<PageTemplate> CreateSite(Site site)
As a developer you have total freedom to implement the CreateSite method however you want, which means that you can customize any aspect of the environment. This is very useful for scalability testing, as the main requirement is that you need to generate a large amount of data.
The Site Template at the following link can be copied into the Oqtane.Server\Infrastructure\SiteTemplates folder in your local installation (or added to the Server project in a custom Oqtane module).
It contains local properties which can be customized to generate data:
- int _pages = 5; // root level navigation items
- int _children = 10; // submenu items
- int _hidden = 150; // hidden pages not part of navigation
- int _modules = 10; // module instances per page
- int _panes = 10; // panes utilized per page (22 max in default theme)
It also contains 5 different "lorem ipsum" phrases which will be used to randomly insert content into HtmlText modules. The default properties will generate 200 pages with 10 modules per page, which is a generous amount of content.
To use this Site Template, you need to create a new Oqtane installation and select the "Load Testing Site Template" from the list of templates in the installation wizard. The installation can take a few minutes (depending on the property values specified above) however once it is completed, you will have a site which is populated with content. The code can obviously be customized to include different modules, add folders and files, etc... depending on your specific requirements.