HowTo add a Data Provider: example with DB/IQ
Infoscope is a Smart Dashboard to monitor the quality of IT projects.
The Data Provider framework makes it possible to import any kind of data and thus enrich your quality model.
What is a Data Provider?
A Data Provider (or DP), in the Infoscope terminology, is module executed during an analysis, which delivers measurement data (metrics, violations etc.). It can also import any field-specific data, as for instance the CPU consumption for embedded software or tickets from a Bug Tracker. Basically, a Data Provider collects results from static code analysis tools, code coverage and test framework or lints and transform into an “Infoscope compliant” format.
From a technical point of view, it can operate in different ways: read data from a CSV file, parse a HTML file, process XML file or call services (REST, OSLC etc.). “Squan Sources”, Infoscope’s engine, contains a Data Provider and offers many possibilities like the programming language selection. Infoscope supports more than 50 Data Providers and new ones are regularly added to support new technologies. Some of them have a “plugin” version, which means their execution will be entirely taken over by Infoscope.
Create a Data Provider: example with DB/IQ
Before creating a DP, we recommend to look at the Built-in Data Provider Framework, which allows import findings and metrics from a CSV or XML file. This framework covers most of the cases. Nevertheless, it may happen you need to create your own DP, which is one of the strengths of Infoscope. The example below illustrates such an implementation.
DB/IQ: Quality Assurance for SQL
DB/IQ is a software suite, which offers a wide range of solutions to maintain a good performance of DB2 SQL applications on z/OS systems [https://insoft-software.com/en/products/dbiq/]. It contains a module to check and EXPLAIN SQL statements. The objective here is to integrate results from the DB/IQ analysis into Infoscope to provide a complete monitoring of DB2 applications on the Mainframe. For this, we developed a Data Provider for DB/IQ.
Data Provider step by step
The first step is to define the Data Provider by giving a name, a description and declare the required parameters as well as the rules and the corresponding help. The 300+ rules from DB/IQ-QA have been extracted and converted to create the ruleset file in XML format. This was the opportunity to specify which characteristic they belong to; e.g., “OBJECT Coded without CREATOR.name” is related to the portability. The help text has been exported and could be easily converted into the target format with help of regular expressions. English, French and German versions, available in the product, were generated.
We recommend running the Validator to verify everything has been specified correctly. If not, an error message will indicate what needs to be fixed. Otherwise, the Data Provider is already available in the UI and the corresponding rules accessible from the Model Editor.
Figure 1 DB/IQ rules displayed from the Analysis Model Editor
It is even possible to develop scenarios that are more complex, for instance to first retrieve the tickets from a Bug Tracker and process them to prepare metrics to be imported into Infoscope.
Once the Data Provider is ready, you can create a new project or edit an existing DB2 application analysis. On the second page of the wizard, check the DB/IQ checkbox and set the result file location. After this, the Analysis Model can be modified, here DB/IQ rules can be edited and the analysis can be run. As a result, the analysis will contain findings detected in the source code (here a COBOL program) and the violations reported by DB/IQ.
From now on, DB2 applications on the Mainframe can be analysed better. The host programming language (ASM, COBOL, PL/1, C or C++ etc.) as well as the SQL queries are both analysed. As you can see, Infoscope is open and flexible and, using the Data Provider framework, aggregates any data to have a better overview of the software quality of IT projects. If you would like to have more information, please contact us through our website: www.infoscope.com. Our experts will contact you.