• 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
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Some kind of test driven development for beginners ?

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that it is good to test one's code before coding (unit testing?) and after (?) finishing coding - unless you make elementary programs. I want to get into the habit of testing my code, not just with silly print statements but with all those frameworks and test cases those developers use.
Is it okay for beginners to think about testing using formal techniques or do it after gaining more experience in coding ? If yes, then where do I begin learning how to test my code formally ?
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can think of writing unit tests, may be start using some unit tests frameworks like JUnit, Mockito. I would recommend to read Test Driven Development book by Kent Beck as it shows you how to get started with TDD in simple ways.
 
Andy Jack
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Mohamed Sanaulla wrote:You can think of writing unit tests, may be start using some unit tests frameworks like JUnit, Mockito. I would recommend to read Test Driven Development book by Kent Beck as it shows you how to get started with TDD in simple ways.



Thanks Mohammed. Is the TDD book based on Java ? I could not get sample pages for the book.
 
Mohamed Sanaulla
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Andy Jack wrote:

Mohamed Sanaulla wrote:You can think of writing unit tests, may be start using some unit tests frameworks like JUnit, Mockito. I would recommend to read Test Driven Development book by Kent Beck as it shows you how to get started with TDD in simple ways.



Thanks Mohammed. Is the TDD book based on Java ? I could not get sample pages for the book.


You can preview the book from Google Books. yes the examples are in Java.
 
Andy Jack
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Mohamed Sanaulla wrote:
You can preview the book from Google Books. yes the examples are in Java.



Thanks for the link. This book was published in 2003, which is quite old. Would that be a problem if I try to use today's tools to learn testing ? If yes, then are there any other books like this
which were written more recently ?
 
Bartender
Posts: 10777
71
Hibernate Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Andy Jack wrote:I want to get into the habit of testing my code, not just with silly print statements but with all those frameworks and test cases those developers use.


Whatever you decide (and there's been a lot of excellent advice), don't abandon those "silly print statements" altogether. While you're actually working on a complicated piece of code, they can be invaluable for making sure you've ironed out all the "silly errors", leaving your test suite to concentrate on business logic. Indeed, some of them may even end up in your test suite...

Winston
 
Bartender
Posts: 825
5
Python Ruby Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're looking for a book, I would recommend "Beginning Algorithms" by Simon Harris and James Ross. It gives a good grasp on Test Driven Development, and as a collateral damage you'll have a chance to learn more about Data Structures and Algorithms.
 
Now I am super curious what sports would be like if we allowed drugs and tiny ads.
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!