Functional testing of Java applications David Maroshi Technical Sales Eng.

Post on 23-Dec-2015

223 views 5 download

Transcript of Functional testing of Java applications David Maroshi Technical Sales Eng.

Functional testing of Java applications

David Maroshi

Technical Sales Eng

Functional testing of Java applications

תוכן

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

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

? ומה הצעד הבא

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

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

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

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

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

Functional testing of Java applications

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

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

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

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

Functional testing of Java applications

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

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

? ומה הצעד הבא

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

תוכן

Functional testing of Java applications

Test automation with IBM Rational XDE Tester

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

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

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

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

Functional testing of Java applications

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

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

סביבת פיתוח

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

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

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

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

++++ Eclipse Java IBM Rational

XDE Tester

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

Functional testing of Java applications

Integrations: XDE Developer/WebSphere Studio/Eclipse

Multiple Views totrack all test assets

ClearCaseSource Control

Integration

Code AssistTechnology

PowerfulDebugging

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

Functional testing of Java applications

Addressing script maintenance

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

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

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

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

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

Functional testing of Java applications

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

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

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

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

–Object Name

–Object Location

–Any object identifier

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

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

ScriptAssure ensures resilient scripts

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

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

Functional testing of Java applications

ClearCase Integration - Version History

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

Right click on a test script then select Team Show History

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

Functional testing of Java applications

Object Map

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

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

באמצעות אשף.

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

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

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

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

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

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

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

Functional testing of Java applications

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

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 אכן תואמת את הערך שהתקבל בהקלטה

Functional testing of Java applications

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

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

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

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

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

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

Functional testing of Java applications

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

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

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

Java language enables powerful test scripting

Functional testing of Java applications

Leveraging existing Java assets

Rational XDE Tester can test against the Java JDK database utility

Enable complete database testing

Functional testing of Java applications

תוכן

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

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

? ומה הצעד הבא

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

Functional testing of Java applications

Moving forward

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

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

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

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

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

ומה עתה?

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

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

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

Functional testing of Java applications

תוכן

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

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

? ומה הצעד הבא

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

Functional testing of Java applications

Test automation with IBM Rational XDE Tester

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

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

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

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

Eclipse

Java

Script Assure

Functional testing of Java applications

Functional testing of Java applications

David Maroshi

Maroshi@il.ibm.com