In this presentation the APEX Quality Assurance Plugin will be demonstrated. It’s a Plugin based on APEX 4.2, which gives every person who works with APEX, an easy and powerful opportunity to define your own Testing rules.
These rules can be defined in SQL-Syntax to support every possibility for a rule defined in the database. On the one hand rules against the apex repository like using no “never condition” or don’t use a help label without a help text can be defined. On the other hand also checks against the whole database dictionary or checking contents of tables are possible.
The Plugin is easy to install and will bring a start set of rules by installation with it. When the Plugin is installed, it can be used on the Global Page to be shown up on every single APEX page to show all problems on that special page which is developed.
Many more Ideas will be shown, like combining the plugin with a scheduler job and/or sending summaries from every page to the developers by mail which can be really helpful.
Overall it’s an easy and fast way to find bugs while you are developing and it’s far more powerful and adjustable tool then the APEX Advisor.
1. |
The APEX QA Plugin
Oliver Lemm
Competence Center Leader APEX
Seattle, 24.06.2014
2. |
MT AG
LEGAL STATUS OWNER MANAGED AG
CITY RATINGEN
FOUNDED IN 1994
EMPLOYEE 190 EMPLOYEE
SUB-COMPANIES MT-IFS GMBH (RATINGEN), MT-IFS SARL (LUXEMBURG)
business by integration
BUSINESS
INTELLIGENCE SOLUTIONS
SOCIAL BUSINESS
SOLUTIONS
MOBILE
SOLUTIONS
APPLICATION
DEVELOPMENT
INTEGRATION
SERVICES
IT SYSTEM
SERVICES
3. |
About me
Oliver Lemm, Competence Center Leader APEX
Born in 1980, married, two daughters
Studied Applience Science 2001-2006
Since 02/2007 employed at MT AG in Ratingen
Working with APEX since its inception back in 2007
Responsible for project-leading and archtitect for APEX projects
- https://apex.mt-ag.com & http://oliverlemm.blogspot.com
- Organizing APEX UserGroup Düsseldorf
You can find me here:
- Online: Xing, LinkedIn, Twitter, Google plus
- Offline: DOAG Conference, DOAG Development Conference, ODTUG
Kaleidoscope, Regional APEX UserGroup (Meetup)
Kscope 2014, Seattle3
4. ||
Agenda
ODTUG KScope 2014
1. The Requirements
2. The Concept
3. Region Plugin vs. Process Plugin
4. Live Demo
5. The Implementation
6. Conclusion & Perspective
4
8. |
The Concept
Every check
a rule
Categories
Objecttypes Message
Comment
Exclude
Activate /
deactivate Layer
Predecessor
ODTUG 20148
9. |
The Concept
Support new Developers
Show the problems in Realtime when developing
Support Developer & Tester
Get the complexity of the application
ODTUG Kscope 20149
13. |
Livedemo - Install the Plugin
1. Download @ Apex-plugin.com
2. Extract
3. Go to your application and Import the plugin
APEXregion_type_plugin_com_mtag_olemm_qa_region.sql
4. Install the Database Objects, using SQL Workshop
plugin_qa_install.sql
5. Import the Rules, using SQL Workshop
DMLplugin_qa_rules.sql
6. Go to Global Page and Region Region Plugin
ODTUG KScope 201413
18. |
The Rule Table – PLUGIN_QA_RULES
PIQA_ID Primary Key
PIQA_NAME Name of the Rule, Unique Key
PIQA_CATEGORY APEX, DDL or DATA
PIQA_OBJECT_TYPES ITEM:REGION:DA:BUTTON:..
PIQA_ERROR_MESSAGE Message which comes up when hitting the rule
PIQA_EXCLUDE_OBJECTS objects which should not be checked
PIQA_ERROR_LEVEL 1=Error, 2=Warning, 4=Information
PIQA_IS_ACTIVE 1=active / 0=deactivated
PIQA_SQL rule based on SQL with maxlength of 32767 char
PIQA_PREDECESSOR_IDS colon delimited ID‘s which has to throw no msg
PIQA_LAYER rule on PAGE or APPLICATION level
ODTUG Kscope 201418
19. |
Example Rule - LOV Extra Values ‚YES‘
piqa_name Display Extra Value is Yes
piqa_category APEX
piqa_object_types ITEM
piqa_error_message Display Extra Value is Yes
piqa_comment Identifiy LOV Items with Extra Values YES
piqa_exclude_objects null
piqa_error_level 2
piqa_is_active 1
piqa_sql <query>
piqa_predecessor_ids null
piqa_layer PAGE
ODTUG 201419
20. |
Example Rule – LOV Extra Values ‚YES‘ - Query
with param as (select :1 piqa_id, :2 app_id, :3 page_id from dual)
select t_plugin_qa_rule( piqa_id => piqa.piqa_id
,piqa_category => piqa.piqa_category
,piqa_error_level => piqa.piqa_error_level
,piqa_object_type => piqa.piqa_object_types
,piqa_error_message => piqa.piqa_error_message
,object_id => aapi.item_id
,object_name => aapi.item_name
,object_value => aapi.lov_display_extra
,object_updated_user => aapi.last_updated_by
,object_updated_date => aapi.last_updated_on
,apex_app_id => aapi.application_id
,apex_page_id => aapi.page_id
,apex_region_id => aapi.region_id)
from plugin_qa_rules piqa
join param p on p.piqa_id = piqa.piqa_id
join apex_application_page_items aapi on aapi.application_id = p.app_id and aapi.page_id = p.page_id
where aapi.display_as = 'Checkbox' and aapi.lov_display_extra = 'Yes'
ODTUG 201420
21. |
Other included rules for Example
Display Dynamic Actions
Help Labels without Help
Label Alignment left
Named LOV
No Never Condition
Page is Public
Page without ALIAS
Page without Pagegroup
ODTUG Kscope 201421
22. |
Using the Plugin
ODTUG Kscope 201422
• Region
Global
Page
• APEX_Application.g_edit_cookie_session_id IS
NOT NULLVisibility
• Mailing
• DBMS_SchedulerJob