The one bit everyone forgets: with JUnit. John Stegeman Xchanging

Similar documents
ADF OAF Who Cares? You Do! Oracle Applications Framework / Application Development Framework - Which way do I go?

Oracle Fusion Middleware 11g: Build Applications with ADF I

Oracle Fusion Middleware 11g: Build Applications with ADF I

Where Do We Go From Here? Why Many IT Staff are Living in the Past

Levels of Testing Testing Methods Test Driven Development JUnit. Testing. ENGI 5895: Software Design. Andrew Vardy

Levels of Testing Testing Methods Test Driven Development JUnit. Testing. ENGI 5895: Software Design. Andrew Vardy

Mobile Application Development: Introducing ADF Mobile Native Client Framework

Overview. Principal Product Manager Oracle JDeveloper & Oracle ADF

Oracle Middleware 12c: Build Rich Client Applications with ADF Ed 1 LVC

Take Your Oracle Forms on the Road Using ADF Mobile. Mia Urman, OraPlayer & Denis Tyrell, Oracle Corporation

Oracle Fusion Middleware 11g: Build Applications with ADF Accel

Best Practices for Testing SOA Suite 11g based systems

Integration Unit Testing on SAP NetWeaver Application Server

3 Continuous Integration 3. Automated system finding bugs is better than people

Oracle ADF: The technology behind project fusion. Lynn Munsinger Principal Product Manager Application Development Tools Oracle Corporation

No Source Code. EEC 521: Software Engineering. Specification-Based Testing. Advantages

Black Box Testing. EEC 521: Software Engineering. Specification-Based Testing. No Source Code. Software Testing

Oracle JDeveloper/Oracle ADF 11g Production Project Experience

Oracle Developer Day

Agenda Birds Do It: Migrating Forms to Java EE Web A Case Study

Just Get it Written: Deploying Applications to WebLogic Server Using JDeveloper and WLS Console. Don t get it right, just get it written.

Note: GIEA is not only a document, it would also have code inside (library/component/template )

Oracle Applications OAF, MSCA, MA and ADF. May 06, 2011

Oracle Developer Day

1 enterprise. Oracle BAM 11gR1 Handbook. Activity Monitoring. Your essential BAM sidekick for monitoring, alerting,

Pick A Winner! In What Tool Should I Develop My Next App?

Just Get it Written: Deploying Applications to WebLogic Server Using JDeveloper and WLS Console. Don t get it right, just get it written.

Don t get it right, just get it written.

If you wish to make an improved product, you must already be engaged in making an inferior one.

Unit Testing and JUnit

AMIS on Fusion Middleware

Application Testing Suite OpenScript Functional Testing Introduction. Yutaka Takatsu Group Product Manager Oracle Enterprise Manager - ATS

Working with the Seagull Framework. By Demian Turner, Seagull Systems

Build Mobile Cloud Apps Effectively Using Oracle Mobile Cloud Services (MCS)

Quick Web Development using JDeveloper 10g

Mobilize Your Users Now with Oracle Mobile Application Framework (MAF)

Oracle 10g: Build J2EE Applications

ADF Code Corner. Oracle JDeveloper OTN Harvest 09 / Abstract: twitter.com/adfcodecorner

Building modern enterprise applications from scratch: lessons learned DOAG 2014 Dr. Clemens Wrzodek

Moving Forward with Oracle Forms

<Insert Picture Here> The Oracle Fusion Development Platform: Oracle JDeveloper and Oracle ADF Overview

EXTENDING YOUR HCM CLOUD SELF SERVICE IS AS SIMPLE AS

Building Multi-Language Portals. Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Contract Information Management System (CIMS) Technical System Architecture

Build a Mobile App in 60 Minutes with MAF

Understanding Oracle ADF and its role in the Oracle Fusion Platform

Copyright 2014, Oracle and/or its affiliates. All rights reserved.

Build a Mobile App in 60 Minutes with MAF

Lecture 15 Software Testing

Oracle Developer Day

User experience for the enterprise: Fusion apps. Lonneke Dikmans November 2011 Nuremberg, Germany

The End of the Beginning: Deploying Applications to WebLogic Server Using JDeveloper and WLS Console. Don t get it right, just get it written.

JUnit on Eclipse. Chien-Tsun Chen Sep. 23, 2003

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Using Automated Network Management at Fiserv. June 2012

<Insert Picture Here> Forms Strategies: Modernizing Your Oracle Forms Investment

Static & Dynamic Testing using Tools. Created by Kudakwashe K. Chambwe

Manuel Oriol, CHCRC-C, Software Testing ABB

Diagram Based UIs in Oracle ADF

Prototype 1.0 Specification

Angels in the Architecture

Oracle SOA Suite 11g: Build Composite Applications

FILE XML DATABASE DEVELOPERS ORACLE 11G MANUAL EBOOK

<Insert Picture Here> Accelerated Java EE Development: The Oracle Way

<Insert Picture Here> JDeveloper Treasure Hunt

Essbase Installation Tutorial Tim Tow, President and Oracle ACE Director. Applied OLAP, Inc

This presentation is for informational purposes only and may not be incorporated into a contract or agreement.

Safe Harbor Statement

THIS IS ONLY SAMPLE RESUME - DO NOT COPY AND PASTE INTO YOUR RESUME. WE ARE NOT RESPONSIBLE Name: xxxxxx

B. Pack -domain=c:\oracle\user_projects\domains\mydomain.jar -template=c:\oracle\userj:emplates\mydomain -template_name=nmy WebLogic Domain"

Test Automation. Fundamentals. Mikó Szilárd

Best Practices Implementing Oracle Mobile Cloud Service

5/31/18 AGENDA AIS OVERVIEW APPLICATION INTERFACE SERVICES. REST and JSON Example AIS EXPLAINED. Using AIS you can perform actions such as:

Road to SOA Suite 12c. Upgrading SOA / BPM Suite from 11g to 12c

TIA Academy Catalog. TIA Academy Catalog

<Insert Picture Here> Oracle Application Framework (OAF): Architecture, Personalization, and Extensibility in Oracle E-Business Suite Release 12

<Insert Picture Here> The Latest E-Business Suite R12.x OA Framework Rich User Interface Enhancements

Test Driven Development

Test Driven Development TDD

Test suites Obviously you have to test your code to get it working in the first place You can do ad hoc testing (testing whatever occurs to you at

PeeringDB and why everyone should use it

ADF Namings Conventions

Chapter 8 Software Testing. Chapter 8 Software testing

Oracle 1Z Oracle Application Development Framework 12c Essentials. Download Full Version :

Contents. 1. JSF overview. 2. JSF example

Enabling Application Lifecycle Development in JDeveloper

Developing Applications with Business Intelligence Beans and Oracle9i JDeveloper: Our Experience. IOUG 2003 Paper 406

Oracle Applications in a Changing Business World. Legacy Oracle Applications Won't Be Around Forever. Will You?

J2EE Development Best Practices: Improving Code Quality

Using JNDI from J2EE components

Oracle 10g and IPv6 IPv6 Summit 11 December 2003

Developing an ADF 11g client for Agile PLM. Developing an ADF 11g client for Agile PLM

Oracle Application Development Framework Overview

Mastering Oracle ADF Task Flows. Frank Nimphius Principal Product Manager Oracle JDeveloper / ADF

Strategies for Running Oracle Forms from Mobile Devices and Tablets.

CSE 15L Winter Midterm :) Review

JUnit in EDA Introduction. 2 JUnit 4.3

CS354 gdb Tutorial Written by Chris Feilbach

Welcome to the Oracle Enterprise Manager Technical Webcast Series

Properties of High Quality Software. CSE219, Computer Science III Stony Brook University

Transcription:

The one bit everyone forgets: Testing your ADF application with JUnit

http://groups.google.com/group/adf-methodology ADF EMG A place to discuss best practices and methodologies for JDeveloper ADF enterprise applications Founded mid-2008 by Chris Muir, now 600+ members Focus is Fusion Tech Stack (ADF Faces, ADF BC) Online forum plus sessions at major Oracle conferences (OOW, ODTUG, UKOUG, DOAG ) <presenter, organisation>

About me 12 years using JDeveloper (since v3) 21 years using Oracle DB + tools Oracle ACE Director (Fusion Middleware)

Agenda Testing / JUnit concepts Using JUnit with JDeveloper a simple example Testing ADF applications with JUnit What tto test tand what t* *not* t*to test t Resources

TESTING AND JUNIT CONCEPTS

Why test?

Some types of software testing Unit Integration System System Integration Non-Functional (performance, scalability, usability, etc.)

The importance of early testing Cost to fix a defect Time introduced Requirem ents Architect ure Construct ion Time detected Req ments Architecture Constr ion System test Post- release 1 3 5 10 10 10 100-1 10 15 25 100 - - 1 10 10 25 Source: http://en.wikipedia.org/wiki/software_testing

Early testing is important, so why don t we do it well? It takes too much time Too much manual work Unit testing treated as a one-off process No experience with tools Never taught how Hard to get started Fill in your reason here:

Test-Driven Development (TDD)* * Can be challenging with ADF apps!

What is JUnit? One of the so-called xunit frameworks Framework for writing and running automated unit tests in Java Can be part of a plan to overcome unit testing challenges Can help enable TDD

Some JUnit Terminology Test Method Test Class Assertion Test Fixture Test Suite

USING JUNIT WITH JDEVELOPER

Demonstration Enabling JUnit for JDeveloper TDD for a factorial class

Factorial specifications 0! = 1 For any positive integer N, return N! (the product of all positive integers less than or equal to N) For any negative integer, throw an ArithmeticException

TESTING ADF APPLICATIONS

Testing ADF Applications Classic unit tests are difficult to achieve External dependencies (such as databases) Code cannot easily be executed in isolation (JSF, EO, VO) This doesn t mean you should give up! JDeveloper Extension for BC testing useful for generating boilerplate

Testing ADF Business Components Create AM configurations to use specifically for your tests Tests will start from an AM use the extension Difficult to directly test EOs

Testing JSF (ADF Faces) apps Impossible (or nearly so) to unit test in the classic sense Lots of bits of code that don t stand alone Dependent on container (or extensive set of mock objects ) Dynamically instantiated classes from ADF Page Definitions Usually require external resources (such as databases)

Testing JSF (ADF Faces) apps Instead of unit tests,,you can do integration or system tests JUnit-compatible frameworks/tools: Selenium (create UI-level tests) JSFUnit (can test internal JSF state as well not personally tested with ADF) Will generally require deploying your app to an application server

WHAT TO TEST AND WHAT *NOT* TO TEST

What to (and not to) test? Test code that you write (this includes code that isn t really code ) Don t test code that Oracle writes, except: when you implement a workaround for an Oracle bug when you expect behaviour might change in the future (release notes, etc.)

Practical suggestions ADF Business Components Validation rules Default values Framework Extension classes (test by checking the behaviour of classes that inherit) Application Module service methods Any code that you write in EO/VO Java classes

Practical suggestions ADF Faces Use Selenium to test the UI Focus on the displayed output and navigation Test database interaction that you haven t already tested in the ADF BC tests

Resources JUnit homepage: http://junit.org Some basic docs: http://junit.sourceforge.net net ADF Development Essentials (parts 5,6): http://www.oracle.com/technetwork/articles com/technetwork/articles /adf/adf-essentials-098792.html EMG: http://groups.google.com/group/adf- / / methodology

Thank you for listening!