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; 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)
- 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)
- 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)
- 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)
- 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)
- Switching between Java versions on a Mac (2015-01-21)
- FAQ: Should I use JUnit or TestNG, which is better? (2014-09-04)
- FAQ: Why do I only see test that fail in IntelliJ and not the tests that pass? (2013-09-20)
- 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)
- Maven Troubleshooting FAQs and Tips (2013-08-22)
- Some Handy IntelliJ Code Completion Keyboard Short Cut Tips (2013-06-20)
- How do I get started installing what I need to write Java? (2013-06-12)
- Which IDE should you use for Java? (2013-06-07)