Home » Core Java

Core Java

JUnit Quickcheck Example

In this example we shall show users the usage of property based testing. JUnit quickcheck example will demonstrates the way to test the methods with the help of property based testing. There are cases when you want to test your methods with some constraints and with random parameter values. We can achieve the same with manual process also, but in ...

Read More »

JUnit RunListener Example

In JUnit RunListener Example, we shall show users how they can add RunListener to the test cases. There are cases when we want to respond to the events during a test case run. Here we can extend the RunListener class and override the methods according to our implementation. The JUnit RunListener can listen to the events of the JUnit lifecycle. ...

Read More »

JUnit Group Tests Example

In this example we shall show users, how they can group and run their JUnit test cases. JUnit group tests example, will try to resolve issue of running multiple group tests all together. This is not a big deal in JUnit. This can be achieved in different ways in JUnit. It’s wide API, helps developers all around the world to ...

Read More »

JUnit MultiThreaded Test Example

In this post we shall show users how to test the multi threaded java application with the help of JUnit. JUnit MultiThread example clears users mind to understand the basic usage of testing the multi threading application. Users are advised to visit the JUnit Hello World example for basic understanding of the JUnit. For testing the methods by passing value ...

Read More »

JUnit Keyboard Input Example

In this post we shall show users the usage of JUnit keyboard input working. This example is very useful in case users want to enter data from keyboard for testing of their methods. Do not worry, we will the same in the post. Users are advised to see the JUnit Hello World example where they can see the basic usage ...

Read More »

JUnit FixMethodOrder Example

With this example, we are going to demonstrate users when, how and why JUnit FixMethodOrder annotation is used. In previous example JUnit Hello World, users have seen how they can start using JUnit. Users are advised to see the setup of project in JUnit Hello World example, if they want to continue with Maven. This example is useful in cases ...

Read More »

JUnit Hello World Example

In this example we shall show you how to start with JUnit hello world. JUnit is an open-source testing framework used by Java programmers. It contains various methods to include in class to make your test cases run smoothly. Currently latest stable version is 4.x and 5.x is coming most probably in Q1 of 2017. JUnit contains many annotations that ...

Read More »

Java XPath Performance Tips

1. Introduction This is the third article in a series dealing with using XPath within a Java application. This article focuses attention on tips for improving XPath performance. The first two articles were: A Java XPath Best Practices Tutorial https://examples.javacodegeeks.com/core-java/xpath-best-practices-tutorial/ Which showed how to setup and evaluate XPath expressions using Java. Java XPath Examples https://examples.javacodegeeks.com/core-java/xml/xpath/java-xpath-examples/ Which explored XPath syntax and ...

Read More »

Selenium Grid Docker Tutorial

1. Introduction In this example set, we will be exploring the functionality of selenium grid on Docker container. We will be deploying the hub and nodes of Selenium Grid on the Docker container and will be linking together so that we could run test cases on the docker container. Environment of the Project: 1. Selenium Grid 3.0.1 2. Maven 4.0 3. TestNG ...

Read More »

Java XPath Examples

1. Introduction The previous article, Java XPath Best Practices Tutorial (https://examples.javacodegeeks.com/core-java/xpath-best-practices-tutorial/), explored how to set up a Java application to create a DOM (Document Object Model) document using a DOM parser to read an XML file; and an XPath object to evaluate XPath expressions as applied to the DOM. This article dives into how to construct XPath expressions. Starting with ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns