In my previous post I emphasized the power of the Apex dictionary views.
On this matter, have also a look at the very complete presentation of Patrick Wolf.
In the meanwhile, we further elaborated our idea of building a custom Apex application that should help in doing quality checks on coding standards and guidelines.
We gathered the different checks that we wanted to perform in different groups. For each group, we have built a view consisting of different UNIONed selects as illustrated in my previous blog.
This is a list of groups we distinguish so far:
- APR => Application Page Regions (QA_APEX_APP_PAGE_REGIONS)
- APRC => Application Page Rep Columns (QA_APEX_APP_PAGE_RPT_COLS)
- API => Application Page Items (QA_APEX_APP_PAGE_ITEMS)
- APP => Application Page Processes (QA_APEX_APP_PAGE_PROC)
- APV => Application Page Validations (QA_APEX_APP_PAGE_VAL)
Within each group, we defined one or more checks, corresponding with a specific select against the apex repository. Each check we gave a short identifying code.
- APR-001 = Wrong Reports Region Template
- APR-002 = Wrong no_data_found_message
- APR-003 = Wrong maximum_rows_to_query
- APR-004 = Wrong pagination_scheme
- APR-005 = Wrong enable_csv_output
- APR-006 = Wrong report_null_value_as
- APR-007 = No ORDER BY – No Dflt sort sequence
- API-001 = Wrong date format in Date Picker
- API-002 = Date column NOT based on Date Picker
- APP-001 = Verify (Length) PL SQL Source
- APP-002 = No Process Error Message
- APV-001 = Wrong error_display_location
- APRC-001 = Wrong date format
- APRC-002 = Wrong Heading Alignment
After having defined the different checks and their corresponding query, the only thing we still needed to do was finding a way to give the developer or code reviewer an easy interface to perform those checks for a specific Apex application.
The following figure shows you how we finally visualized those checks:
We also added an export to Csv. Like Carl Backstrom suggested, we could extract easily this data to PDF by using the PDF-Printing facilities available since Apex 3.0.
We have the impression that this QA-application can be extended and ameliorated in different ways. We are convinced that it have a lot of potential. For example, for the Apex project we are currently working on, we needed to present a global Quality Plan for the project. In that document we could refer to this QA-application as one of the ways to guarantee the quality of the application that we have to deliver within a few months.
(to be continued…)