Keine Angst vor dem eigenen Quellcode .NETDAY Mai, 2017 Thomas - - PowerPoint PPT Presentation

keine angst vor dem eigenen quellcode
SMART_READER_LITE
LIVE PREVIEW

Keine Angst vor dem eigenen Quellcode .NETDAY Mai, 2017 Thomas - - PowerPoint PPT Presentation

Keine Angst vor dem eigenen Quellcode .NETDAY Mai, 2017 Thomas Bandixen (@tbandixen) Thomas Gassmann (@gassmannT) @gassmannT @tbandixen BASEL BERN BRUGG DSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF HAMBURG KOPENHAGEN LAUSANNE


slide-1
SLIDE 1

BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH

Keine Angst vor dem eigenen Quellcode

.NETDAY Mai, 2017 Thomas Bandixen (@tbandixen) Thomas Gassmann (@gassmannT)

@gassmannT @tbandixen

slide-2
SLIDE 2

Who are we?

Thomas Bandixen

Senior Consultant & Trainer Trivadis AG thomas.bandixen@trivadis.com @tbandixen

23.05.2017 .NETDAY Mai 2017 2

slide-3
SLIDE 3

Who are we?

Thomas Gassmann

Senior Consultant & Trainer Trivadis AG thomas.gassmann@trivadis.com @gassmannT

23.05.2017 .NETDAY Mai 2017 3

slide-4
SLIDE 4

Content

  • 1. Introduction
  • 2. Unit Test
  • 3. Outro

23.05.2017 .NETDAY Mai 2017 4

slide-5
SLIDE 5

What kind of tests exists?

.NETDAY Mai 2017 7 23.05.2017

Unit Tests

  • Test certain functions or units
  • f code
  • Super fast
  • Easy to write

e2e Tests

  • Runs the real application and

simulate the users behavior

  • Very slow
  • Very fragile
slide-6
SLIDE 6

Test Strategy

.NETDAY Mai 2017 8 23.05.2017

  • Use the smallest test type possible
  • Write readable tests
  • Make tests fail
  • Test all the time
slide-7
SLIDE 7

.NETDAY Mai 2017 9 23.05.2017

Tools & Setup

slide-8
SLIDE 8

Tools

23.05.2017 .NETDAY Mai 2017 10

slide-9
SLIDE 9
  • Test runner
  • Test code on various browsers
  • Integrate with various continuous integration services like Jenkins

23.05.2017 .NETDAY Mai 2017 13

slide-10
SLIDE 10
  • Behavior-driven development framework
  • Fast
  • Dependency free

23.05.2017 .NETDAY Mai 2017 14

slide-11
SLIDE 11
  • End-to-end test framework
  • Built on top of Selenium WebDriverJS
  • Runs in a real browser
  • Test like a user

23.05.2017 .NETDAY Mai 2017 15

slide-12
SLIDE 12

Insiders' tip

.NETDAY Mai 2017 16 23.05.2017

Wallaby.js

  • Integrated Continuous Testing

Tool for JavaScript

slide-13
SLIDE 13

.NETDAY Mai 2017 17 23.05.2017

Demo

slide-14
SLIDE 14

.NETDAY Mai 2017 18 23.05.2017

Unit Tests

slide-15
SLIDE 15

Definition

.NETDAY Mai 2017 19 23.05.2017

Unit Testing is a level of software testing where individual functions of a sofware are tested. The purpose is to validate that each function of the software performs as designed.

slide-16
SLIDE 16

Unit Test vs. Integration Test

.NETDAY Mai 2017 20 23.05.2017

Unit Test

  • Test in isolation, without

external resources (e.g. templates)

  • Just a simple function

Integration Test

  • Test with external resources

(e.g. templates)

slide-17
SLIDE 17

Component Template Service

23.05.2017 .NETDAY Mai 2017 21

slide-18
SLIDE 18

Component Template FakeService

23.05.2017 .NETDAY Mai 2017 22

slide-19
SLIDE 19

.NETDAY Mai 2017 23 23.05.2017

It helps you catch defects before releasing software

slide-20
SLIDE 20

Basics

.NETDAY Mai 2017 24 23.05.2017

slide-21
SLIDE 21

Basics

.NETDAY Mai 2017 25 23.05.2017

slide-22
SLIDE 22

.NETDAY Mai 2017 26 23.05.2017

Demo

slide-23
SLIDE 23

How to start

.NETDAY Mai 2017 27 23.05.2017

  • Angular CLI
  • Our Demos
  • Documentation on Angular Docs
  • Ask us 
slide-24
SLIDE 24

.NETDAY Mai 2017 28 23.05.2017

Demos and slides

github.com/gassmannT/Angular-Testing-DOTNETDAY/

slide-25
SLIDE 25

Thank you – Besten Dank

Thomas Bandixen thomas.bandixen@trivadis.com @tbandixen

  • Tel. +41 58 459 52 78

23.05.2017 .NETDAY Mai 2017 29

Thomas Gassmann thomas.gassmann@trivadis.com @gassmannT

  • Tel. +41 58 459 52 81