testing javascript

22

Upload: vytautas-butkus

Post on 02-Jul-2015

426 views

Category:

Technology


0 download

DESCRIPTION

Writing maintainable code is usually a difficult task. One of possible ways to do so is to start unit testing your code. If you are at least able to test your code then you might be on the right path. During discussion speaker will share his knowledge about code design improvements while writing unit test, what kind of changes should you make in order to start writing test for your code, how unit tests help to maintain the code and why is it worth doing at all.

TRANSCRIPT

Page 2: Testing javascript

● What is unit testing?● Approaches● Why is it needed?● Downside of unit testing● Testing reasons● How do we do testing?

Page 3: Testing javascript

● Unit○

● Testing○

Page 4: Testing javascript
Page 5: Testing javascript

● What is unit testing?● Approaches● Why is it needed?● Downside of unit testing● Testing reasons● How do we do testing?

Page 6: Testing javascript

Test Driven Development (TDD)Code CoverageTest Driven Bug Fixing

Page 7: Testing javascript

● What is unit testing?● Approaches● Why is it needed?● Downside of unit testing● Testing reasons● How do we do testing?

Page 8: Testing javascript

● Code design (When doing TDD)○

● Maintainability○

● Provides documentation○

● Allows to “share” development (with less fear)○

Page 9: Testing javascript
Page 10: Testing javascript

● What is unit testing?● Approaches● Why is it needed?● Downside of unit testing● Testing reasons● How do we do testing?

Page 11: Testing javascript

● Increased development time● Maintain and fix unit tests● Increased development costs● Steep learning curve

What else?..

Page 12: Testing javascript

● What is unit testing?● Approaches● Why is it needed?● Downside of unit testing● Testing reasons● How do we do testing?

Page 13: Testing javascript

● If code has to do something…○

● If it is difficult to understand how it works…○

● If I allow others to modify my code base…○

● If I find a bug…○

● If I want to have better code quality…○

Page 14: Testing javascript

● What is unit testing?● Approaches● Why is it needed?● Downside of unit testing● Testing reasons● How do we do testing?

Page 16: Testing javascript
Page 17: Testing javascript
Page 18: Testing javascript
Page 19: Testing javascript
Page 20: Testing javascript
Page 21: Testing javascript

...to add some test

Page 22: Testing javascript