Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Akzeptanztests mit Codeception

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

Akzeptanztests mit Codeception

Avatar for Marcel Führer

Marcel Führer

May 25, 2016
Tweet

More Decks by Marcel Führer

Other Decks in Programming

Transcript

  1. WER BIN ICH - UND WENN JA WIE VIELE ▸

    Marcel Führer, 34 ▸ PHP Developer seit ca. 10 Jahren ▸ Entwickler im Business Solution Team bei move:elevator ▸ PHP, TYPO3, WordPress, (React Native) ▸ Gärtner 2 AKZEPTANZTESTS MIT CODECEPTION
  2. AKZEPTANZTESTS MIT CODECEPTION AGENDA ▸ WAS SIND AKZEPTANZTESTS ? ▸

    WARUM CODECEPTION ? ▸ CODECEPTION ▸ INSTALLATION ▸ KONFIGURATION ▸ RUN AND FAIL ▸ BEST PRACTICE ▸ ASK YOURSELF 3
  3. AKZEPTANZTESTS MIT CODECEPTION WAS SIND AKZEPTANZTESTS ? ▸ Sind BlackBox

    Tests. ▸ Beschreiben das Verhalten aus Anwendersicht ▸ Deckt Abweichungen von der Spezifikation auf ▸ Können von non-technical persons erstellt werden ▸ Einfach automatisierbar z.B. mit Selenium ▸ Sie sind langsam 4
  4. WARUM CODECEPTION ? ▸ Full-stack testing framework ▸ PHP basierend

    ▸ Unit, Functional and Acceptance Tests ▸ TDD und BDD unter einem Dach ▸ Unterstützt PHPUnit 5.x / PHP7 ▸ Unterstützt viele Frameworks und Module 6 AKZEPTANZTESTS MIT CODECEPTION
  5. CODECEPTION VS MINK 7 AKZEPTANZTESTS MIT CODECEPTION Mink is a

    php 5.3 library Codeception is a php testing framework Quelle: https://php.libhunt.com/project/codeception/vs/docs
  6. ▸ Werden nicht geschrieben sondern generiert ▸ Ergibt sich aus

    Modulen ▸ Je Scope ein Actor ▸ Injected into Cest file ▸ AcceptanceTester use Trait AcceptanceTesterActions 10 CODECEPTION - ACTOR AKZEPTANZTESTS MIT CODECEPTION
  7. ▸ Stellen vordefinierte Funktionen ▸ Werden in suite file kombiniert

    11 CODECEPTION - MODULE AKZEPTANZTESTS MIT CODECEPTION
  8. CODECEPTION - INSTALLATION ▸ Natürlich über composer ▸ Oder die

    PHAR ▸ Erstellt codeception.yml und Testverzeichnis ▸ Erstellt 3 default suite ▸ Siehe http://codeception.com/quickstart 13 AKZEPTANZTESTS MIT CODECEPTION
  9. CODECEPTION - KONFIGURATION ▸ Erzeugt cest file in app suite

    ▸ Siehe einzelne Module zwecks Konfiguration 15 AKZEPTANZTESTS MIT CODECEPTION
  10. CODECEPTION - RUN ▸ ateam.jpgateam.jpg 16 AKZEPTANZTESTS MIT CODECEPTION Quelle:

    http://finanzdiskurs.de/altersvorsorge/riester-und-aepfel-und-pflaumen/
  11. ▸ Ein Actor pro Scope ▸ Verwendet environments ▸ Verwendet

    PageObjects ▸ Verwendet PHPStorm ▸ $I->can statt $I->do ▸ Docker ? ▸ what else ? 17 CODECEPTION - BEST PRACTICE AKZEPTANZTESTS MIT CODECEPTION