This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

TDD on System that are already working

 
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Christian,

I have heard about TDD but haven't tried it really and I could still say that I haven't mastered javascript fully.

I have a question here, can I still apply TDD on systems that are already working and I just need to add some enhancements and does your book mention about this?
The only test that I am doing is to test the whole system one by one on IE6/IE7/IE8 and FF since they are our targetted browser

Also, does your book mention how to do TDD when a Javascript Library is involved?

Thanks.
 
author
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,

Sure, you can start testing even if you already have existing code without automated tests. As you improve your test coverage, you will experience a rise in productivity as the need for manual testing is reduced.

The book doesn't use any existing libraries for examples mainly because I didn't want to tie it to a specific library. However, through the book's second part (which teaches advanced JavaScript topics using unit tests to illustrate behavior) I build a small library which is used for the real world sample projects in part 3. So, yes, I show TDD-ing when using _a_ library, but really your choice of library doesn't really matter much. They're just APIs
 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Christian!

On a lighter note, I have a followup question regarding this TDD approach on TDD.

Most of the guru's here advocates the use of a Javascript Library Jquery in particular. True enough, I didnt have to worry about Browser Differences.

Question though, aren't TDD duplicates the Job that Jquery Library brings?

Thanks
 
Christian Johansen
author
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. jQuery can help you solve/smooth over cross browser issues, unit tests can help you verify that your code works across browsers. Also, unit tests can help you verify that your logic is correct and that the code behaves as expected. Simply using jQuery cannot guarantee that you won't run into cross-browser issues or that your code does what it should. They are completely different. Also, TDD is a matter of helping you design and implement code.
 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! I think i got your point there. Good luck on your book..
 
You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!