Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Custom configuration


#1

Hi Tobias,

another idea… you can put in TSmartInspect class an event

OnConfigure(AConfiguration: TSiConfiguration)

so user can handle custom configuration.

In configuration builder you add a "custom section"
where user can add custom entry in an easy way to condifuration file.

Regards
Ing Giuseppe Monteleone


#2

Hi Giuseppe,

You can already do this without an OnConfigure event or the Configuration Builder support. You could simply create a TSiConfiguration instance yourself, load the contents of a configuration file via LoadFromFile and then process the individual items. A SmartInspect configuration file is a simple (UTF-8 encoded) text file with key/value pairs. The SmartInspect libraries ignore and skip all unknown or invalid lines in a given files, so it’s no problem to add custom items.