• Non ci sono risultati.

Méthodes de Test TP 3 — Mock Objects

N/A
N/A
Protected

Academic year: 2021

Condividi "Méthodes de Test TP 3 — Mock Objects"

Copied!
5
0
0

Testo completo

(1)

Méthodes de Test TP 3 — Mock Objects

Stefano Zacchiroli

zack@pps.univ-paris-diderot.fr

Laboratoire PPS, Université Paris Diderot

2013–2014

URL http://upsilon.cc/zack/teaching/1314/methtest/

Copyright © 2013 Stefano Zacchiroli

License Creative Commons Attribution-ShareAlike 3.0 Unported License http://creativecommons.org/licenses/by-sa/3.0/

(2)

Challenge #1 — design pattern testing

1 pick2 or moredesign patternsfrom the “Gang of Four” book, preferring patterns that implement reasonably complex communication protocols between objects

ñ mostbehavioral patternsare good choices

Gamma, Helm, Johnson, Vlissides

Design Patterns: Elements of Reusable Object-Oriented Software.

Addison-Wesley, 1995.

2 ask me tovalidate your choicesof design pattern

3 implementthe patterns

ñ using TDD or not, that’s up to you

4 provide aconvincing test suitethat usesobject mockingto show that your pattern implementations adheres to the expectedcommunication protocolsfor the chosen patterns

(3)

Challenge #2a — network service testing

Either:

1 pick anInternet application layer protocol, see for example the list at http://en.wikipedia.org/wiki/Application_layer

2 ask me tovalidate your choiceof protocol

3 [if you don’t know about them]learnthe basics about it and its messages

4 model, in an object-oriented language,clients and serversfor the chosen service

5 provide aconvincing test suitethat usesobject mockingto show the expected behavior of client/server implementations

6 implement some client/server functionalities, just enough to make some tests pass

(4)

Challenge #2b — network service testing (cont.)

Or:

1 choose a network service used for communication, e.g.:

ñ Twitter / status.net / pump.io

ñ Jabber / XMPP

ñ Gtalk / Facebook chats / IRC

ñ Google Hangout / Skype / SIP

ñ Titanpad / Etherpad / Google Drive

ñ . . .

2 model, in an object-oriented language,clients and serversfor the chosen service

3 provide aconvincing test suitethat usesobject mockingto show the expected behavior of client/server implementations

4 implement some client/server functionalities, just enough to make some tests pass

(5)

Homework 2 — description and submission

Description work in pairs

win against challenges(#1 ∧(#2a ∨#2b)) Submission

submit a tar.gz archive containing

ñ a README documenting

« the chosen exercises

« the members of the pair

« instructions to: compile and run the test suite

ñ the source code of your work

submissions must be made via DidEL at:

http://didel.script.univ-paris-diderot.fr/

claroline/course/index.php?cid=METHTEST Section: Travaux > TP3 — mock objects

deadline: 18 November 2013 (2 weeks from now)

Riferimenti

Documenti correlati

X is the amount won or lost and Y is the outcome of the

Some topics on modular functions, elliptic functions and transcendence theory. Sheet of

Dipartimento di Metodi e Modelli, Matematici per le Scienze Applicate, Universit` a di Roma “La Sapienza”,

[r]

[r]

Let E be the midpoint of AC, and let F be the midpoint

[r]

Motivate (briefly) your choices. 2) The ECHA (European Chemical Agency) has provided recently a Candidate List of 173 substances of very high concern