1 of 18

Testing

“Utvecklare på Tradera pratar om testautomatisering på ert företag”

2 of 18

Content

Theory:

  • Test-Driven Development
  • Behavior-Driven Development
  • Specification By Example
  • Requirements

Practice:

  • Frameworks
  • Auto-Mocking
  • Should
  • Browser

Bonus:

  • My Projects
  • Tradera

3 of 18

Test-Driven Development

4 of 18

Behavior-Driven Development

5 of 18

Stack� When empty� should have no elements� should throw an exception when calling peek� should throw an exception when calling pop� When not empty� should not remove the top element when calling peek� should remove the top element when calling pop� should return the top element when calling peek� should return the top element when calling pop

6 of 18

Specification By Example

7 of 18

Empty stack� Given an empty stack� Then it has no elements� And it throws an exception when calling pop� And it throws an exception when calling peek�Non empty stack� Given a non empty stack� When calling peek� Then it returns the top element� But it does not remove the top element� When calling pop� Then it returns the top element� And it removes the top element

8 of 18

Requirements

9 of 18

Frameworks

10 of 18

Auto-Mocking

11 of 18

Should

12 of 18

Browser

13 of 18

My Projects

14 of 18

Tradera

15 of 18

Thanks!

16 of 18

Questions?

17 of 18

18 of 18

Resources