Developement of Automated Tests for native SyncML clients January 27 th , 2009 Andrea Scova
Agenda <ul><li>Introduction
Building an Automated Test for native SyncML clients
Automated Tests Maintenance
Conclusions
Questions & Answers </li></ul>
What do Automated Tests check? The software is not breaking: <ul><li>between a release and another
after a commit of a single piece of code
(e.g. a fix for a synclet) </li></ul>Introduction
Why Automated Tests are useful? They help DEV & QA to discover in a QUICK way errors in the code (tool for regression test...
Introduction Why Automated Tests for native SyncML clients are important? <ul><li>number of devices is huge
costs (devices, QA time)
simulation of native SyncML client based on server's log </li></ul>
How Automated Tests work (THEORY) <ul><li>simulate a Native SyncML client
compare expected behaviour of the server against its actual behaviour </li></ul>simulated environment Building an Automate...
Building an Automated Test for native SyncML clients Automated Tests for SyncML clients logic (THEORY) Structured in 2 ses...
Upcoming SlideShare
Loading in …5
×

Funambol Automated Tests for SyncML Clients

2,242 views

Published on

The presentation shows how an automated test for native SyncML clients works and how to develop it. You'll learn how to get the logs from the devices, assembly the test, run it and check that Funambol server and synclets do not break between a release and another, or after committing a piece of code. Watch this presentation if you want to improve the automated tests for SyncML devices

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,242
On SlideShare
0
From Embeds
0
Number of Embeds
31
Actions
Shares
0
Downloads
61
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Funambol Automated Tests for SyncML Clients

  1. 1. Developement of Automated Tests for native SyncML clients January 27 th , 2009 Andrea Scova
  2. 2. Agenda <ul><li>Introduction
  3. 3. Building an Automated Test for native SyncML clients
  4. 4. Automated Tests Maintenance
  5. 5. Conclusions
  6. 6. Questions & Answers </li></ul>
  7. 7. What do Automated Tests check? The software is not breaking: <ul><li>between a release and another
  8. 8. after a commit of a single piece of code
  9. 9. (e.g. a fix for a synclet) </li></ul>Introduction
  10. 10. Why Automated Tests are useful? They help DEV & QA to discover in a QUICK way errors in the code (tool for regression testing) BUT You cannot get rid of QA <ul>(skipping “manual” regression testing is NOT an option) </ul>Introduction
  11. 11. Introduction Why Automated Tests for native SyncML clients are important? <ul><li>number of devices is huge
  12. 12. costs (devices, QA time)
  13. 13. simulation of native SyncML client based on server's log </li></ul>
  14. 14. How Automated Tests work (THEORY) <ul><li>simulate a Native SyncML client
  15. 15. compare expected behaviour of the server against its actual behaviour </li></ul>simulated environment Building an Automated Test for native SyncML clients =
  16. 16. Building an Automated Test for native SyncML clients Automated Tests for SyncML clients logic (THEORY) Structured in 2 sessions: <ul><li>the client sends its capabilities and all items to the server (the server has no items)
  17. 17. the server sends back the same items to the client (after updating the status)
  18. 18. NOTE: one syncsource per time </li></ul>
  19. 19. Building an Automated Test for native SyncML clients Setting up the environment (PRACTICE) <ul><li>install the test-ds.s4j module
  20. 20. catch the full logs
  21. 21. create the items (single syncsource) on the real device
  22. 22. all available fields on the device should be filled
  23. 23. include symbols and language specific chars (e.g. &, @, $, %, â, ã, ä, å, è, é)
  24. 24. SYNC </li></ul>
  25. 25. Building an Automated Test for native SyncML clients Extracting the log's content (PRACTICE) <ul><li>isolate the SyncML messages before the SYNCLET processing phase
  26. 26. create single .xml files
  27. 27. create header.properties
  28. 28. from HTTP header </li></ul>(e.g. user-agent: Nokia SyncML HTTP Client)
  29. 29. Building an Automated Test for native SyncML clients Editing the SyncML messages replace: <ul><li>deviceID -> syncml-phone
  30. 30. server-URI -> http://localhost:8080/funambol/ds
  31. 31. sessionID </li></ul>
  32. 32. Building an Automated Test for native SyncML clients Editing the SyncML messages
  33. 33. Building an Automated Test for native SyncML clients Documentation What the Automated Tests do (MANDATORY) <ul><li>ReadMe.txt </li></ul>Initial state: Server with no contacts Step performed: 1. (1-4) Slow sync. The mobile (a Nokia N70) sends 5 contacts to the server. Device capabilities are sent as well in this first step. Input synclets are tested in this step: . NokiaXin.bsh a. Processes the incoming vcard items and adds the missing tokens. b. Handles large objects. c. Replace the property X-EPOCSECONDNAME with NICKNAME 2. (5-8) Fast sync: contacts status and last_timestamp are updated. The server sends all the contacts back to the device. Output synclets are tested in this step: . NokiaS60out.bsh a. Moves some TEL properties to the end of the VCARD in a special order because the devices don't behave properly at update time, otherwise. b. Removes TYPE information from PHOTO token because the phones of the series 60 are not able to understand this information rightly. c. Replaces the TEL;CAR;VOICE token into TEL;VOICE;CAR. d. Replace the property NICKNAME with X-EPOCSECONDNAME.
  34. 34. Directory structure naming convention needed to make Automated Tests work [ Manufacturer ]/ [ Model_Syncsource ]/ error / reference / response / Building an Automated Test for native SyncML clients
  35. 35. Automated Tests Maintenance Automated Tests need to be updated after any server modification that involves: <ul><li>synclets
  36. 36. add/modification/deletion of a property (e.g. add a new field in the contacts) </li></ul>If NOT maintained the Automated Tests will systematically fail
  37. 37. Conclusion Automated Tests are a Quality Challenge: <ul><li>help improve quality in our software </li></ul>There's still a lot to do: <ul><li>many manufacturers/devices
  38. 38. for every device 3/4 syncsources to be automatized
  39. 39. maintenance </li></ul>
  40. 40. Questions & Answers ...

×