SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
Based on real tests.
… Hauptsache, wir haben überhaupt Tests!
Tobias Schlitt, Qafoo GmbH

Dominik Jungowski, inovex GmbH
Die Assertion-
Hölle
✓ Optimiert fürs Lesen
✓ Kaputte Tests schneller finden
Tests auch mal
anfassen
✓ Nicht nur den produktiven Code
refactoren
Assertion-
Recycling
✓ Optimiert fürs Lesen (siehe Punkt 1)
✓ Alle Vorteile von Abstraktion
Nicht durchgreifen!
✓ Keine Mocks in Mocks packen
✓ Besser Integrationstests als Mocking-
Babuschka
✓ Law of Demeter
Shared state
✓ Mindestens Reset zwischen Tests
✓ Besser: Abhängigkeit explizit machen
Die Mocking-Hölle
✓ Black-Box-Testing
✓ Mocks maintainen macht keinen Spaß
✓ Pure Stubs/Mocks
SUT mocken
✓ Du machst da was in Produktion falsch
✓ Niemals das SUT zum Testen anfassen
jquery Tests
✓ Tests nicht von Seiteninhalt abhängig
machen
✓ jasmine-jquery verwenden
✓ Fixtures verwenden
Einfach einfacher
✓ Auch Test-Technik entwickelt sich
weiter
✓ Pfadfinder-Regel
Dateien und andere
Monster
✓ Dateisystem-Tests saugen
✓ VFS-Stream zur Rettung!
Er ist tot, Jim!
✓ Nicht nur den produktiven Code
refactoren
KISS
✓ Magic vermeiden
✓ Effekte explizit machen
✓ Tests, die Tests benötigen sind doof*
* außer man entwickelt ein Test-Framework
Fazit:
Nicht nur den produktiven Code refactoren
exit();
Tobias Schlitt
@tobySen
Dominik Jungowski
@djungowski
https://github.com/QafooLabs/just-test

Más contenido relacionado

Más de inovex GmbH

Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systems
inovex GmbH
 
Representation Learning von Zeitreihen
Representation Learning von ZeitreihenRepresentation Learning von Zeitreihen
Representation Learning von Zeitreihen
inovex GmbH
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
inovex GmbH
 
Down the event-driven road: Experiences of integrating streaming into analyti...
Down the event-driven road: Experiences of integrating streaming into analyti...Down the event-driven road: Experiences of integrating streaming into analyti...
Down the event-driven road: Experiences of integrating streaming into analyti...
inovex GmbH
 

Más de inovex GmbH (20)

AI auf Edge-Geraeten
AI auf Edge-GeraetenAI auf Edge-Geraeten
AI auf Edge-Geraeten
 
Prometheus on Kubernetes
Prometheus on KubernetesPrometheus on Kubernetes
Prometheus on Kubernetes
 
Deep Learning for Recommender Systems
Deep Learning for Recommender SystemsDeep Learning for Recommender Systems
Deep Learning for Recommender Systems
 
Azure IoT Edge
Azure IoT EdgeAzure IoT Edge
Azure IoT Edge
 
Representation Learning von Zeitreihen
Representation Learning von ZeitreihenRepresentation Learning von Zeitreihen
Representation Learning von Zeitreihen
 
Talk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale AssistentenTalk to me – Chatbots und digitale Assistenten
Talk to me – Chatbots und digitale Assistenten
 
Künstlich intelligent?
Künstlich intelligent?Künstlich intelligent?
Künstlich intelligent?
 
Dev + Ops = Go
Dev + Ops = GoDev + Ops = Go
Dev + Ops = Go
 
Das Android Open Source Project
Das Android Open Source ProjectDas Android Open Source Project
Das Android Open Source Project
 
Machine Learning Interpretability
Machine Learning InterpretabilityMachine Learning Interpretability
Machine Learning Interpretability
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
 
People & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madnessPeople & Products – Lessons learned from the daily IT madness
People & Products – Lessons learned from the daily IT madness
 
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with PulumiInfrastructure as (real) Code – Manage your K8s resources with Pulumi
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
 
Remote First – Der Arbeitsplatz in der Cloud
Remote First – Der Arbeitsplatz in der CloudRemote First – Der Arbeitsplatz in der Cloud
Remote First – Der Arbeitsplatz in der Cloud
 
Data Science und Machine Learning im Kubernetes-Ökosystem
Data Science und Machine Learning im Kubernetes-ÖkosystemData Science und Machine Learning im Kubernetes-Ökosystem
Data Science und Machine Learning im Kubernetes-Ökosystem
 
TTD Tatort-driven Development
TTD Tatort-driven DevelopmentTTD Tatort-driven Development
TTD Tatort-driven Development
 
Down the event-driven road: Experiences of integrating streaming into analyti...
Down the event-driven road: Experiences of integrating streaming into analyti...Down the event-driven road: Experiences of integrating streaming into analyti...
Down the event-driven road: Experiences of integrating streaming into analyti...
 
React mit TypeScript – eine glückliche Ehe
React mit TypeScript – eine glückliche EheReact mit TypeScript – eine glückliche Ehe
React mit TypeScript – eine glückliche Ehe
 
Manage your bare-metal infrastructure with a CI/CD-driven approach
Manage your bare-metal infrastructure with a CI/CD-driven approachManage your bare-metal infrastructure with a CI/CD-driven approach
Manage your bare-metal infrastructure with a CI/CD-driven approach
 
Connected Cooking powered by MQTT
Connected Cooking powered by MQTTConnected Cooking powered by MQTT
Connected Cooking powered by MQTT
 

...Hauptsache, wir haben überhaupt Tests