Tuesday, 3 March 2015

Java For Testers ebook Done and Released to Leanpub

Buy Java For Testers ebook on leanpub.com
At the end of February 2015 I released the 100% version of Java For Testers on leanpub.

If you ever wanted to learn how to code in Java, but found other beginner books hard to read or work through then this tutorial guide should help.

I focus on the core features of Java to help you achieve a lot, without overloading you, and I concentrate on the main language constructs and core libraries that I use when writing automation code.

Most Java books will have your writing manifest files, writing 'main' methods, and using the javac compiler from the command line. All of which adds extra complexity when you are trying to learn the basics.

With Java For Testers, you write and run all your code from the IDE. You will learn to write code test first with 'JUnit @Test' methods, and you'll run them from the IDE. This makes learning a lot easier.

Most Java books will have you writing Swing or JavaFX GUIs. You won't learn that in Java For Testers, because you won't need it. The IDE or the Continuous Integration system will be the GUI you use for executing automation.

After 10+ years of writing Java, I've only just written my first piece of GUI code, and that's because I'm writing an application to help my testing. Once you've followed Java For Testers, learning how to write a 'main' method and create an application will not take you long to learn. But I don't think you need it as one of the first things you learn.

The book now has:

  • 23 chapters
  • more exercises
  • more explanations
  • a Large Appendix with code for all the exercise answers
Because of all the easy to follow code examples in the body of the text, it is fairly fast to read, but you do need to spend the time working on the examples and exercises so that you gain practical experience of writing Java JUnit @Test code.


  •     Introduction
  •     Chapter One - Basics of Java Revealed
  •     Chapter Two - Install the Necessary Software
  •     Chapter Three - Writing Your First Java Code
  •     Chapter Four - Work with Other Classes
  •     Chapter Five - Working with Our Own Classes
  •     Chapter Six - Java Classes Revisited- Constructors, Fields, Getter & Setter Methods
  •     Chapter Seven - Basics of Java Revisited
  •     Chapter Eight - Selections and Decisions
  •     Chapter Nine - Arrays and For Loop Iteration
  •     Chapter Ten - Introducing Collections
  •     Chapter Eleven - Introducing Exceptions
  •     Chapter Twelve - Introducing Inheritance
  •     Chapter Thirteen - More About Exceptions
  •     Chapter Fourteen - JUnit Explored
  •     Chapter Fifteen - Strings Revisited
  •     Chapter Sixteen - Random Data
  •     Chapter Seventeen - Dates and Times
  •     Chapter Eighteen - Properties and Property Files
  •     Chapter Nineteen - Files
  •     Chapter Twenty - Math and BigDecimal
  •     Chapter Twenty One - Collections Revisited
  •     Chapter Twenty Two - Advancing Concepts
  •     Chapter Twenty Three - Next Steps
  •     Appendix - IntelliJ Hints and Tips
  •     Appendix - Exercise Answers


Full contents are available on the leanpub site :  leanpub.com/javaForTesters

You can read or download a sample of the book containing:


  •     Introduction
  •     Chapter One - Basics of Java Revealed
  •     Chapter Two - Install the Necessary Software
  •     Chapter Three - Writing Your First Java Code
  •     Chapter Four - Work with Other Classes
  •     Chapter Twenty Three - Next Steps
  •     Appendix - IntelliJ Hints and Tips


This should be good enough to get you started, for free.

The downloadable source code: [github.com/eviltester/javaForTestersCode]

  • structured into packages for each chapter
  • packages for 'examples' and 'exercises'
  • all code runs clean from 'mvn test'
  • you could add to a CI system if you wanted


All the code in the book is extracted from the downloadable source code, so there should be no code typos in the book.

All code is executed using the JUnit Test Runner, by annotating methods with @Test. So there is no need to build an executable or fiddle with manifest files.

This is the book I wanted to give people working for me when they started out learning to code for automation. And it covers the basics that I expect people to know in interviews when they say they can write automation code in Java.

Full details are over on the  leanpub.com/javaForTesters page.

No comments:

Post a Comment