37
Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications David Maroshi Technical Sales Eng

Embed Size (px)

Citation preview

Page 1: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

David Maroshi

Technical Sales Eng

Page 2: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

תוכן

,בעיות במצב הקיים ? או למה צריך בדיקות רגרסיה

איך להצליח בבדיקות אוטומטיות

? ומה הצעד הבא

סכום, שאלות ותשובות

Page 3: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

The importance of complete testing: Hidden bugs

xx

xx

change

change

change

fix

Build 1 Build 2 Build 3Design

Build 4

Pass Fail

7 0

Results

Test Total:

G

A

D

C

B

F

E

Fail

Page 4: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

xx

xx

fix

change

change

change

fix

Perception

Pass Fail

7 0

Results

Reality 5 2

But it used to work...

The importance of complete testing: Hidden bugs

G

A

D

C

B

F

E

Build 1 Build 2 Build 3Design Build 4

Page 5: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

The challenge of manual testing with short test cycles

Build 1

Manual testing

Rerun the first tests and...

Time

Tests

Page 6: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Build 1 Build 2 Build 3, 4, 5, 6, 7, 8 Build 9 Build 10

Manual testing can’t keep pace!

Manual testing

...take more time

...the new tests...

Time

Tests

The challenge of manual testing with short test cycles

Page 7: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

? מה הבעיות מהמצב

.דחיית שחרור מוצר או צמצום היקף הבדיקות

,לעיתים עד אמינות המוצר והחברה נפגעיםכדי כשלון מסחרי.

.הבדיקות אינן מכסות את המערכת הנבדקת

Page 8: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

,בעיות במצב הקיים ? או למה צריך בדיקות רגרסיה

איך להצליח בבדיקות אוטומטיות

? ומה הצעד הבא

סכום, שאלות ותשובות

תוכן

Page 9: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Test automation with IBM Rational XDE Tester

באוטומציה שלושה קריטריונים להצלחה–

שפת תכנות חזקה

תסריטים גמישים ועמידים לשינוייםביישום

סביבת פיתוח עשירה פתוחה ונוחה

Page 10: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

הכלים הקיימים היום בשוק

תסריטים עמידים לשנויים

סביבת פיתוח

שפת תכנות הכלי

++ קנייני קנייני Mercury Winrunner

+ קנייני SQA Basic IBM Rational Robot

+++ קנייני VB script Mercury QuickTest

++++ Eclipse Java IBM Rational

XDE Tester

Page 11: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Powerful script development environment

סביבה משותפת ומשאבים משותפים ע"י שמוש בEclipse IDE הבודקים משתמשים באותה הסביבה בה

משתמשים המפתחים

הסביבה המשותפת יוצרת תקשורת טובה יותר בין הקבוצות

הסביבה המשותפת מאפשרת שיתוף משאבים

-בודקים יכולים להריץ סקריפטים שנכתבו ע"י המפתחים בJUnit

מפתחים יכולים להשתמש בסקריפטים של הבודקים לבדיקות יחידה

שתי הקבוצות יכולות לנצל קוד משותף

XDE Tester :מותקן לתוך

Eclipse shell

IBM WebSphere Studio shell

IBM Rational XDE Developer shell

Page 12: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Integrations: XDE Developer/WebSphere Studio/Eclipse

Multiple Views totrack all test assets

ClearCaseSource Control

Integration

Code AssistTechnology

PowerfulDebugging

Page 13: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Extensible development

`

Eclipse Community

More then 300 Plug-Ins

20 Test related

Some Testing related Plug-Ins

Junit (installed by default)

Test Metrics

Hyades

Page 14: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Addressing script maintenance

הצלחה בבדיקות אוטומטיות מותניתבתחזוקה נמוכה של סקריפטים

שינויים בזיהוי אובייקטים

ביטול הצורך בקידוד עבור נתונים דינמיים

השקעת זמן בתחזוקה מצמצמת את זמןהבדיקות

ניהול שינויים בסקריפט, אחרי שינויים ביישום

Page 15: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Script AssureTM מפחית את התחזוקה

חוסך שינויי קוד כאשר האוביקט משתנה

מסתמך על מספר מאפיינים

שינוי מאפיין יחיד אינו מונע המשך תפעול

–Object Name

–Object Location

–Any object identifier

בודק נתונים דינמיים ללא צורך בקידודעושה שימוש בתבניות לבדיקת נתונים דינמיים

הבודקים לא נדרשים לעדכן את קוד התסריטים

ScriptAssure ensures resilient scripts

Page 16: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

ScriptAssure: Lowers script maintenance

Version 1.0 Version 2.0

TesterSees

Determines Match

Determines Match

XDE TesterSees

No User Intervention

Required

Page 17: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Order ID changes with each order placed

Test Fails when

comparing static

baseline to dynamic data

Test Fails when

comparing static

baseline to dynamic data

Test Passes when

comparing pattern

baseline to dynamic data

Test Passes when

comparing pattern

baseline to dynamic data

Instead of validating “Order ID 230”, validate “Order ID ###” This allows for a wide variety of acceptable responses and pattern matching when

validating the application’s behavior

ScriptAssure: Dynamic data testing

Dynamic data/content matching Use pattern matching technique to verify dynamic data

Page 18: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

ClearCase Integration - Version History

Show History View מציג את פרטי האובייקט : סוג, שם, תאריך השינוי ושם המשנה

Right click on a test script then select Team Show History

Page 19: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

ClearCase Compare ניהול גרסאות של תסריטים – בדיקת השינויים בין גירסה נוכחית לגירסה כלשהיא

(סקריפט או אובייקט)

To access:

From Show History view, select elements to compare, then right click and select Compare Selected Versions

or

Right click test script in Datastore Explorer then select Team Compare with Previous

Page 20: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Object Map

מפות פרטיות ו\או מפות משותפות

עדכון והוספה של "זיהוי מאפייני אובייקט" בקלות

באמצעות אשף.

איתור תסריטים הקשורים לאובייקט מסוים

ניתן לאחד מפות אובייקטים

ותסריטים קיימים למפה אחת משותפת

Page 21: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Object Map – find associated scripts

איתור כל התסריטים בהם נמצא אובייקט מסוים

Open map and select Test Object Associated Scripts

User will see list of all script associated with the map

Page 22: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Object Map Mergingיצירת מפה חדשה ואיחוד מפות

1. Select File New Test Object Map then enter new map name and click Next

2. Click Select Test Object Maps….. to create new map from existing scripts and maps

3. Select scripts and maps to merge

4. Click Connect selected XDE Tester scripts… to update script sources to use new merged map

To merge into an existing map

Right click on the shared map in the Datastore Explorer that you would like to merge into. The above dialog will then display and you can select the scripts and other shared maps that you would like to merge into the selected map

Page 23: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Updating Recognition Propertiesעדכון המאפיינים המזהים אובייקט במפת האובייקטים

1. Click on object to update (Object map will open with object highlighted)

2. Start AUT from Application menu and navigate to window with object to update

3. Select Test Object Update Recognition Properties

4. Object will automatically be highlighted and the wizard on the next slide will display

1 2

3 4

Page 24: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Updating Recognition Properties

תבניות של מאפיינים – המקורי, כל 3האשף מציג הפעילים והמעודכן

5. Can add additional recognition properties from the “All Active Properties” panel (double-click or right click on recognition property then select Add to….)

6. Select Finish to accept properties in the Updated Test Object Properties panel

5

6

Page 25: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Regular Expresion) קבוע ב- Valueהחלף ערך (

Page 26: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Regular Expression Evaluator

1. Convert value to a regular expression as normal

2. Right click on the regular expression in a VP or in an object map property value and select Evaluate Regular Expression

3. Enter pattern to match in Match Against Value field and click Evaluate

Examples are available through the Examples button

Right click to access common insertion sequences for expressions

-בדיקה אם התבנית שנכתבה בRE אכן תואמת את הערך שהתקבל בהקלטה

Page 27: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

מאפשרת פיתוח תסריטי בדיקה Javaשפת מתקדמים

תקן תעשייתי לפיתוח מבדקים אוטומטיים סקריפטים נוצרים בהקלטה (לא בקידוד) הנם קלים להבנה וגם מתחילים

יכולים לערוך ולשנות אותם

השפה התקנית מהווה מנוף להרחבות : קיימים ספרים, קורסים, מקורותידע באינטרנט, דוגמאות קוד, קבוצות דיון ועוד.

חיזוק הקשר בין קבוצות המפתחים והבודקים שכן שניהם עובדים באותה.שפה פיתוח

הזדמנות לבודקים להתעדכן בטכנולוגיה

Page 28: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

-התסריטים בRational XDE Tester :הינם

קלים לקריאה והבנה

ניתנים להרחבה בקלות ע"י קידודJava

Java language enables powerful test scripting

Page 29: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Leveraging existing Java assets

Rational XDE Tester can test against the Java JDK database utility

Enable complete database testing

Page 30: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

תוכן

,בעיות במצב הקיים ? או למה צריך בדיקות רגרסיה

איך להצליח בבדיקות אוטומטיות

? ומה הצעד הבא

סכום, שאלות ותשובות

Page 31: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Moving forward

אוטומטיות דנו בצורך לקיים בדיקות רגרסיה

דנו במרכיבים החיוניים להצלחה

בבדיקות אוטומטיות

ראיתם כיצדXDE-Tester

עונה בצורה מצוינת לקריטריונים

ומה עתה?

Page 32: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

The evaluation process

פנה לאיש מכירות וקבל עותק של המוצר

התקן והתאם לסביבהHelp Welcome…Rational XDE Tester

Help Getting Started with XDE Tester

התחל בבדיקותHelp XDE Tester Quick Tour

חומר רקע וחומר מקצועי נוסףDeveloperWroks Rational XDE Tester

http://www.ibm.com/developerWorks

Page 33: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

שלוש רמות התקדמות

Web-based

Getting Started With Java and Web-Based Testing

Web-based and on-site

Essentials of IBM Rational XDE Tester

On-site

Principles of Test Automation for GUI Testing

Principles of Software Testing for Testers

הדרכה והשתלמויות

Page 34: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

תוכן

,בעיות במצב הקיים ? או למה צריך בדיקות רגרסיה

איך להצליח בבדיקות אוטומטיות

? ומה הצעד הבא

סכום, שאלות ותשובות

Page 35: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Test automation with IBM Rational XDE Tester

סביבת פיתוח עשירה ונוחה

שלושה קריטריונים להצלחה בבדיקותאוטומטיות

שפת תכנות חזקה

תסריטים גמישים ועמידיםלשינויים ביישום

Eclipse

Java

Script Assure

Page 36: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

Page 37: Functional testing of Java applications David Maroshi Technical Sales Eng

Functional testing of Java applications

David Maroshi

[email protected]