Slide 1

Slide 1 text

Tests for Dummies v2 Sebastian Webber

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

https://golang.org/pkg/testing/

Slide 4

Slide 4 text

Tests What are they?

Slide 5

Slide 5 text

Tests are untested programs that test your programs (and not always are made in the same programming language).

Slide 6

Slide 6 text

Do not test your tests.

Slide 7

Slide 7 text

Why lose waste time writing tests?

Slide 8

Slide 8 text

lets check the DEMO

Slide 9

Slide 9 text

Example function

Slide 10

Slide 10 text

Basic test

Slide 11

Slide 11 text

SubTests

Slide 12

Slide 12 text

Test tables and parallel

Slide 13

Slide 13 text

Running the tests

Slide 14

Slide 14 text

What about the benchmarks?

Slide 15

Slide 15 text

Basic Benchmarks

Slide 16

Slide 16 text

Sub-benchmarks

Slide 17

Slide 17 text

Table Benchmarks

Slide 18

Slide 18 text

Running the benchmarks

Slide 19

Slide 19 text

What about the Setup and TearDown?

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

References 1. http://cs-guy.com/blog/2015/01/test-main/ 2. https://github.com/go-br/estudos/tree/master/testing 3. https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go All examples: https://github.com/sebastianwebber/test4dummies

Slide 22

Slide 22 text

No content