Subscribe to the full blog feed using RSS
Recent Posts for Java For Testers and Test Automation Blog
TLDR; Getting started with programming is the hardest part. Installing the IDE, adding dependencies, writing your first test. Pick whichever language you have someone to help you with, or you have a tutorial to work through. Switching languages when you know one is not too hard so do not worry about being stuck with a language, focus on getting started.
TLDR; Downloading a file with RestAssured is as simple as taking the body of a request as a byte array and writing it to a file.
When automating I often have to download files. One very common FAQ for WebDriver is “How do I download a file with WebDriver?".
TLDR; Using Visual SVN, svnserve and local SVN repositories I was able to easily convert SVN to Git on Windows.
I hit every error possible when converting SVN to GIT. I eventually figured out the simplest way to avoid errors during the conversion process.
TLDR; Bonobo is a free and simple to install Git Server for windows.
The Bonobo git server install page instructions don’t fully match the process I had to use to install, so I’ve documented the process here.
TLDR; Coding Tips for beginners.Write your code as temporary comments, remove syntax errors as soon as you see them.
Here are a few tips I’ve been verbally passing on when teaching people on my Java For Testers face to face training.
TLDR; Rather than migration your assertions line by line, create an abstraction class to represent the new implementation and then perform inline refactoring.
I’m experimenting with migrating my projects to JUnit 5.
Many of the “how to migrate to JUnit 5” blog posts show differences, but not a lot of strategies. I used a Branch By Abstraction strategy to migrate JUnit 4 Assertions. This allowed me to experiment with using JUnit5 assertions or AssertJ assertions.
TLDR; Apply MVP principles when coding. Code to the API first. The API is internal before it is external. Unit tests with classes. In code testing with classes in combination. In code API testing. External HTTP API Testing. And then if necessary -In memory and process HTTP API testing. GUI.
A long time ago, in a town which I no longer live in, I wrote a tool called Compendium-TA
Commercially that was a disaster: it was self funded, it took a long time to write and I made some poor technology decisions.
I learned MVP and API First Thinking the hard way. I’ll try and explain within.
Older Posts for Java For Testers and Test Automation Blog
- Overview of Spark and HTTP Testing with JUnit (2018-04-26)
- When would I choose basic HTTP libraries rather than using RestAssured? (2018-04-25)
- Migrating from JAXB XML processing to XStream (2018-04-24)
- Changes to Automating a REST API code base for Java 1.9 (2018-04-09)
- How to learn Java with Exploratory Programming (2018-04-08)
- How to organise resource files for tests using Maven and Java (2017-12-07)
- Simple ways to add and work with a `.jar` file in your local maven setup (2017-10-13)
- How to Diff Java Code in IntelliJ - 3 ways to use the Compare Tool (2017-10-12)
- Java 1.9 Reflection and Package Access Changes (2017-10-05)
- Why does my code throw a null pointer exception? - common reason (2017-08-29)
- Implementing PATCH Verbs with Gson Jaxb and Spark Framework (2017-07-06)
- Architecting a Testable Web Service in Spark Framework (2017-07-05)
- An introduction to Refactoring Java in IntelliJ using RestMud as an Example (2017-06-14)
- JSoup Tip How to get raw element text with newlines in Java - Parsing HTML and XML with JSoup (2017-04-13)
- Mistakes using Java main and examples of coding without main (2017-03-17)
- Let's Code - Binary Chopifier - Just Enough Code and Tooling to Start (2016-12-05)
- How to create and release a jar to maven central (2016-10-21)
- New Java For Testers Install Videos and Checklist for Windows and Mac Released (2016-10-05)
- How to fix IntelliJ issues by looking in the IntelliJ log (2016-09-27)
- How to convert a breakpoint into a conditional breakpoint in IntelliJ (2016-08-08)
- Is JUnit only for unit testing? What about system testing or UAT? (2016-08-02)
- How to debug Java with IntelliJ: breakpoints, evaluate expression, watches and variable view (2016-07-19)
- Does dependency between test execution imply lack of abstraction layers? (2016-06-02)
- Source Code for House Of Test Java Technical Testing Case Study Videos Released (2016-04-21)
- An example of creating a 'tool' using @Test methods without building a Java application (2016-04-14)
- What is a Java `main` method - simple example (2016-03-22)
- Use of Java for Technical Testing Case Study (2016-03-08)
- Java Magazine Sept/Oct/Nov/Dec 2015 Subscribe For Free (2015-12-07)
- Using FindBugs, CheckStyle and PMD from IntelliJ with QAplug to improve your Java Coding (2015-10-23)
- One Day Public Training Course on 5th October in Amsterdam (2015-09-08)
- Updates to Java For Testers ebook and Notes on File Path construction in Java (2015-08-26)
- Using travis-ci.org for checking code on github (2015-07-17)
- How to learn to code Java without using a 'main' method (2015-03-06)
- Java For Testers ebook now on Amazon (2015-03-04)
- Java For Testers ebook Done and Released to Leanpub (2015-03-03)
- Switching between Java versions on a Mac (2015-01-21)
- FAQ: Should I use JUnit or TestNG, which is better? (2014-09-04)
- Getting mvn setup to persist on a Mac (2014-06-17)
- Source code for Java For Testers Book Available on GitHub (2014-06-13)
- How to fix Java Language Level Issues (2014-03-03)
- FAQ: Why do I only see test that fail in IntelliJ and not the tests that pass? (2013-09-20)
- Maven settings.xml - global and user-specific (2013-09-19)
- Do "Enable Auto-Import" in IntelliJ for "Maven projects need to be imported" (2013-09-18)
- Chapter on Date and Time added to Java For Testers (2013-09-17)
- Support Page for Install Chapter on JDK, Maven and IntelliJ (2013-09-13)
- Maven Troubleshooting FAQs and Tips (2013-08-22)
- Some Handy IntelliJ Code Completion Keyboard Short Cut Tips (2013-06-14)
- How do I get started installing what I need to write Java? (2013-06-12)
- JUnit ExpectedException Rule (2013-06-10)
- Which IDE should you use for Java? (2013-06-07)