SlideShare uma empresa Scribd logo
1 de 78
Baixar para ler offline
Quality Assurance
JDeveloper Auditing Framework
About Us
Richard Olrichs
MN
www.olrichs.nl
@richardolrichs

Wilfred van der Deijl
The Future Group
www.redheap.com
@wilfreddeijl
Agenda
●
●
●
●
●
●

Audit Profiles and Preferences
Audit JDeveloper Extension Project
Creating Custom Rules
Creating Custom Fixes
SuppressWarnings
Automated QA
Aborts Compile On Error
● Applies default Fix
● Run analysis with single
(or few) rules
● Example: Generate
unique JSF component ID
Custom Rules
Custom Rules
● Setting up JDeveloper Extension
Project
● Implementing Custom Rule
● Implementing Custom Fix
Setting up JDev Project
Setting up JDev Extension Project
● Install Extension SDK (Help>CheckForUpdates)
● File > New > Applications >
Extension Application
● extension.xml and MANIFEST.MF
● Bundled as .ZIP
● Can be distributed through custom JDeveloper
Update Center
(aka network drive or URL)
Creating Custom Rules
Analyzing Java Code
Analyzing XML Files
Disables Analyzer for current
construct and all children
AuditContext
● Provides Traversal State
● report() for Violations, Metrics,
Suppressions
● Holds State for Analyzer
○ Setting Attributes for Child Constructs
○ Setting Attributes for Parent Construct
○ (Sharing Attributes between Analyzers)
● AuditContext creates Analyzer State Keys
● enter() on root-node (Workspaces) invoked
once, so can initialize keys
Creating Custom Fix
Transform subclass
● apply(context, construct)
○ applies fix by changing source
○ TransformContext argument contains editor location,
violation, etc
○ Construct is the object with the violation (eg. a
JavaMethod or XMLElement)

● isQueryRequired(context, construct)
and query(context, construct)
○ queries the user for additional info when applying fix
Violation Overload
Violation Overload

● Even ADF Sample Application from OTN
has 157 issues
● Too many violations cause developers to
ignore all of them
Violation Overload
SuppressWarnings Java Annotation

@SuppressWarnings annotation introduced in
Java 1.5 and tells Java Compiler to suppress
warnings
SuppressWarnings Java Annotation

JDeveloper 12c now also “listens” to annotation
and suppresses warnings itself (not only javac)
JDeveloper 12c Suppression Schemes
JDeveloper 12c Suppression Scheme

Why not create our own for non-Java (aka XML)?
Suppress Warnings in XML
Suppress Warnings in XML
SuppressWarnings
● JDeveloper 12c natively supports
@SuppressWarning in Java
● JDev extension adds
<!-- SuppressWarning -->
● Extension available today
● JDeveloper 12c only as Suppression
Schemes is new 12c feature
Analyzer - Suppressing violations
Transform - Creating XML Comment
Audit Extension Project
Audit Extension Project
● Project standards
● Company standards
● Community standards
Audit Extension Project
ADF EMG Extension Project
ADF Code Guidelines Extension
● JDeveloper extension available today
● ADF Code Guidelines auditing during
development
● Community project at java.net: adfemgauditrules
● Contribute and discuss at ADF EMG
● JDeveloper 12c only
○ at least for now. No reason why this can’t be
backported to JDeveloper 11g
Automated QA
OJAudit
● Command line auditing
● JDEV_HOME/jdev/bin/ojaudit -help
● Output in XML/text/HTML or custom xsl
Automated QA
● Simple solution: Run ojaudit from CI server
and publish output
● Benefit: Same rules during development and
CI QA
● @SuppressWarnings and
<!--SuppressWarning--> keep list of
violations short and actionable
Automated QA
SonarQube
SonarQube
●
●
●
●
●
●

Tool to manage Code Quality
Rules, Violations, Metrics, Test Coverage, etc
Free Open Source
Initially Java, but now 20+ languages
Historical data, thus trends
Highly extensible through plugins
ADF EMG SonarQube plugin
● SonarQube plugin
○ runs ojaudit
○ converts ojaudit output to SonarQube violations

●
●
●
●

www.sonarqube.com for base product
Watch ADF EMG for availability of plugin
Not specific to ADF, but for any JDev project
Tested with JDeveloper 12c, but should work
with any version
Further Reading
● www.olrichs.nl
● www.redheap.com
● ADF Enterprise Methodology Group
○ Google Groups

● http://docs.oracle.com
JDeveloper Doc (not ADF documentation)
○ Developing Extensions for JDeveloper
○ Java API Reference for Extension SDK
Summary
●
●
●
●
●
●

Audit Profiles and Preferences
Creating Custom Rules
Creating Custom Fixes
SuppressWarnings JDev Extension
ADF Code Guidelines JDev Extension
SonarQube ojaudit plugin
JDeveloper Auditing Framework (UKOUG Tech2013)

Mais conteúdo relacionado

Mais procurados

Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"
Provectus
 
Exactpro Systems for KSTU Students in Kostroma
Exactpro Systems for KSTU Students in KostromaExactpro Systems for KSTU Students in Kostroma
Exactpro Systems for KSTU Students in Kostroma
Iosif Itkin
 
Power shell saturday ravikanth
Power shell saturday  ravikanthPower shell saturday  ravikanth
Power shell saturday ravikanth
Ravikanth Chaganti
 
Gradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypesGradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypes
Strannik_2013
 

Mais procurados (20)

Arquillian & Citrus
Arquillian & CitrusArquillian & Citrus
Arquillian & Citrus
 
Prod-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsProd-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized Applications
 
Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"
 
Java API for JSON Binding - Introduction and update
Java API for JSON Binding - Introduction and updateJava API for JSON Binding - Introduction and update
Java API for JSON Binding - Introduction and update
 
Exactpro Systems for KSTU Students in Kostroma
Exactpro Systems for KSTU Students in KostromaExactpro Systems for KSTU Students in Kostroma
Exactpro Systems for KSTU Students in Kostroma
 
Javantura v4 - Spring Boot and JavaFX - can they play together - Josip Kovaček
Javantura v4 - Spring Boot and JavaFX - can they play together - Josip KovačekJavantura v4 - Spring Boot and JavaFX - can they play together - Josip Kovaček
Javantura v4 - Spring Boot and JavaFX - can they play together - Josip Kovaček
 
Java Desktop 2019
Java Desktop 2019Java Desktop 2019
Java Desktop 2019
 
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
 
PowerShell DSC Partial Configurations and Cross-node Synchronization
PowerShell DSC Partial Configurations and Cross-node SynchronizationPowerShell DSC Partial Configurations and Cross-node Synchronization
PowerShell DSC Partial Configurations and Cross-node Synchronization
 
Continuous Testing using Shippable and Docker
Continuous Testing using Shippable and DockerContinuous Testing using Shippable and Docker
Continuous Testing using Shippable and Docker
 
QA Fest 2015. Сергей Пирогов. Красивые JBehave отчеты
QA Fest 2015. Сергей Пирогов. Красивые JBehave отчетыQA Fest 2015. Сергей Пирогов. Красивые JBehave отчеты
QA Fest 2015. Сергей Пирогов. Красивые JBehave отчеты
 
QA Fest 2015. Владимир Примаков. Автоматизация нестандартной отчетности из JI...
QA Fest 2015. Владимир Примаков. Автоматизация нестандартной отчетности из JI...QA Fest 2015. Владимир Примаков. Автоматизация нестандартной отчетности из JI...
QA Fest 2015. Владимир Примаков. Автоматизация нестандартной отчетности из JI...
 
Power shell saturday ravikanth
Power shell saturday  ravikanthPower shell saturday  ravikanth
Power shell saturday ravikanth
 
Apache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolboxApache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolbox
 
CA Harvest "Private Solutions - State of New Hampshire
CA Harvest "Private Solutions - State of New HampshireCA Harvest "Private Solutions - State of New Hampshire
CA Harvest "Private Solutions - State of New Hampshire
 
Gradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypesGradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypes
 
"Production Driven Development", Serhii Kalinets
"Production Driven Development", Serhii Kalinets"Production Driven Development", Serhii Kalinets
"Production Driven Development", Serhii Kalinets
 
Overview of JSF 2.0
Overview of JSF 2.0Overview of JSF 2.0
Overview of JSF 2.0
 
Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)
 
2015 Java update and roadmap, JUG sevilla
2015  Java update and roadmap, JUG sevilla2015  Java update and roadmap, JUG sevilla
2015 Java update and roadmap, JUG sevilla
 

Destaque (6)

Custom audit rules in Jdeveloper extension
Custom audit rules in Jdeveloper extensionCustom audit rules in Jdeveloper extension
Custom audit rules in Jdeveloper extension
 
ADF Worst Practices (UKOUG Tech2013)
ADF Worst Practices (UKOUG Tech2013)ADF Worst Practices (UKOUG Tech2013)
ADF Worst Practices (UKOUG Tech2013)
 
Jdev Extensions & Custom Audit Rules
Jdev Extensions & Custom Audit RulesJdev Extensions & Custom Audit Rules
Jdev Extensions & Custom Audit Rules
 
Sonar technology ppt
Sonar technology pptSonar technology ppt
Sonar technology ppt
 
Sonar
SonarSonar
Sonar
 
SONAR
SONAR SONAR
SONAR
 

Semelhante a JDeveloper Auditing Framework (UKOUG Tech2013)

Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
SpiritsoftsTraining
 
Arm html5 presentation
Arm html5 presentationArm html5 presentation
Arm html5 presentation
Ian Renyard
 

Semelhante a JDeveloper Auditing Framework (UKOUG Tech2013) (20)

Enforcing code guidelines by extending JDeveloper’s auditing framework @OOW14
Enforcing code guidelines by extending JDeveloper’s auditing framework @OOW14Enforcing code guidelines by extending JDeveloper’s auditing framework @OOW14
Enforcing code guidelines by extending JDeveloper’s auditing framework @OOW14
 
Enforcing code guidelines by extending j developer’s auditing framework - Ora...
Enforcing code guidelines by extending j developer’s auditing framework - Ora...Enforcing code guidelines by extending j developer’s auditing framework - Ora...
Enforcing code guidelines by extending j developer’s auditing framework - Ora...
 
Code review automation and functional tests on Carrefour
Code review automation and functional tests on CarrefourCode review automation and functional tests on Carrefour
Code review automation and functional tests on Carrefour
 
Continuous testing
Continuous testingContinuous testing
Continuous testing
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplate
 
DevOps Pipeline for Liferay Application
DevOps Pipeline for Liferay ApplicationDevOps Pipeline for Liferay Application
DevOps Pipeline for Liferay Application
 
The Readiness of ADF Essentials for Public-facing Web Applications
The Readiness of ADF Essentials for Public-facing Web ApplicationsThe Readiness of ADF Essentials for Public-facing Web Applications
The Readiness of ADF Essentials for Public-facing Web Applications
 
Agile DevOps Implementation
Agile DevOps ImplementationAgile DevOps Implementation
Agile DevOps Implementation
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Best Practices for Upgrading your JD Edwards Software from Oracle
Best Practices for Upgrading your JD Edwards Software from OracleBest Practices for Upgrading your JD Edwards Software from Oracle
Best Practices for Upgrading your JD Edwards Software from Oracle
 
Whats new in microsoft desktop optimization package
Whats new in microsoft desktop optimization packageWhats new in microsoft desktop optimization package
Whats new in microsoft desktop optimization package
 
Denodo Solution Manager: Best Practices for Promotion
Denodo Solution Manager: Best Practices for PromotionDenodo Solution Manager: Best Practices for Promotion
Denodo Solution Manager: Best Practices for Promotion
 
Continuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applicationsContinuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applications
 
Arm html5 presentation
Arm html5 presentationArm html5 presentation
Arm html5 presentation
 
Implementing Quality on Java projects (Short version)
Implementing Quality on Java projects (Short version)Implementing Quality on Java projects (Short version)
Implementing Quality on Java projects (Short version)
 
Continuous Development Pipeline
Continuous Development PipelineContinuous Development Pipeline
Continuous Development Pipeline
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

JDeveloper Auditing Framework (UKOUG Tech2013)