test.ical.ly | getting the web by the balls

TAG | Functional Tests

I started to write tests for certain Facebook user stories with Behat before but having to deal with sessions and cookies in any language other than javascript run in a browser seems to be hard at best. So I decided to look for other solutions and found one – Jasmine.

(more…)

· · · ·

Facebook offers a rich interface for applications. However not every part is well documented or in fact working. Also it focusses on single actions (i.e. create an event). A user story usually involves a series of these actions and there are many ways one can take.

After a lot of trying and learning I figured I should make a list of possible flows / combinations and automate them as functional tests.

Using Behat.

(more…)

· · ·

I am currently working on ImageTransform an image manipulation library based loosely on Stuart Lowes sfImageTransformPlugin for symfony.

As I started from scratch I made sure to write unit tests of course and it helped me a great deal so far. But as testing goes unit tests are not the silver bullet. They ensure that each unit works as expected but they can not verify if your use cases are implemented correctly. For that you need functional tests.

Writing a library however means that there is no web interface so tests with Selenium or other web centric tools don’t apply.

(more…)

· · ·

I just wrote two functional tests for the sfBulkUploadPlugin I introduced in yesterdays post.

I haven’t written functional tests in a while so it took me some time to remember what you have to do to be able to run them from within your plugins fixture project. In case you stumble about the same question here’s the answer. (more…)

· · · ·

I’ve got this one question puzzling me for quite some time now and I got to get it off my chest.

An just to make sure there are no misunderstandings: I am not about to question TDD!

I am merely asking for help to find my way to do it properly..

(more…)

· · · · · · ·

Yesterday I wrote a lot of functional tests for a symfony plugin that provides and XML web service interface.

Using symfonys functional testing classes this is actually quite easy to do.

But wouldn’t it be cool if you could integrate these tests into your continuous integration service just like PHPUnit tests? Wouldn’t it be cool to be able to generate PHPUnit coverage reports?

(more…)

· · · · · · ·

sfImageTransformExtraPlugin Logo
Mein sfImageTransformExtraPlugin nähert sich langsam aber sicher dem ersten Stable Release mit der Nummer 1.0.0.

So kurz vor dem Ziel ist eine komische Zeit, denn man weiss ja, dass ein solches Release kein Ende der Entwicklung darstellt, sondern lediglich einen weiteren Milestone.

Was von den vielen offenen Todos gilt es denn nun wirklich noch unbedingt vorher abzuarbeiten und was kann auch in einem späteren Minor Release folgen?

Was sind die Anforderungen eines Major Releases und wie erkenne ich, welches Todo notwendig und welches optional ist?

(more…)

· · · · · ·

Letzte Woche hatte ich ja kurz vom ObjektForum Nord berichtet und von dem Tool Fitnesse, welches es erlaubt Akzeptanz Tests (Functional Tests)  in Wikiform zu schreiben.

Die Vorteile sind klar:

  • Der Kunde oder Produkt Owner wird ohne technische Knowhow in die Lage versetzt, Akzeptanz Tests zu seinen User Stories zu schreiben.
  • Solche Akzeptanz Tests sind sprachlich leicht verständlich und dennoch technisch exakt genug, um für ein gemeinsames Verständnis zwischen Anforderungs- und Umsetzungsseite zu sorgen.
  • Da diese Form der Akzeptanz Tests nicht auf eine bereits vorhandene Implementation angewiesen ist, kann das gemeinsame Verständnis zum frühest möglichen Zeitpunkt erfolgen.
  • Dieses Timing wiederum begünstigt Test getriebene Entwicklung (TDD).

Klingt alles hervorragend. Wir müssen nur zwei Dinge tun..

(more…)

· · ·

Wie ich gestern bereits angekündigt hatte, fand gestern im Magazin-Kino in Hamburg das halbjährliche ObjektForum Nord statt, veranstaltet von it-agile. Dieses mal zum Thema Testgetriebene Entwicklung, was dann auch den Bezug zu diesem Blog herstellt.

Das Ganze teilte sich in zwei Teile. Im ersten gab es TDD als Hand-On Live Demonstration für technisch Versierte, während es sich im zweiten Teil dann eher an Projektmanager und Entscheider richtete.

Den zweiten Teil habe ich leider terminlich nicht mehr mitmachen können und kann daher nur über den ersten Berichten.

(more…)

· · · · · · ·

Ich war gestern Abend nicht gerade mega-produktiv, aber kleinere Änderungen habe ich doch umsetzen können (man beachte bitte, dass dieses Blog ein rein privates Vergnügen ist, ich muss ja schliesslich auch noch einer anstaendigen Arbeit hinterhergehen..).

Auf meiner zukünftigen News-Aggregator-irgendsowasinderart-Seite symfon.ical.ly habe ich bisher eine einfache Liste von News gehabt. Eine News kann einen Tiel, ein Bild, eine Bildunterschrift und einen Text haben.

  • Neuerung Nummer 1: Da ich irgendwann mal mehr als nur 5 Dummy Nachrichten auf der Seite haben will, kann die natürlich recht lang werden. Also brauche ich eine Paginierung!
  • Neuerung Nummer 2: Auf der ersten Seite will ich die allerneueste Nachricht besonders prominent darstellen, während alle nachfolgenden News gleich aussehen können.

Da ich hier garnicht wirklich ein wie-mache-ich-was-mit-symfony-Blog schreiben will und die beiden Anforderungen auch wirklich in sich nicht so spannend sind, werde ich nicht gross darauf eingehen, was ich tatsächlich implementieren musste*.

Viel Interessanter ist doch, wie sich neue Anforderungen auf die bisherigen Tests auswirkt und wie gut sich neue Test hinzufügen lassen.

* Wenn jemand trotzdem an meinem Code Interesse hat, schreibt es einfach in nen Kommentar und ich schau mal, was sich machen lässt.

(more…)

· · · · · · · · ·

Older posts >>

Theme Design by devolux.nh2.me