Unit Test

This tutorial will guide you through the process of running Unit Tests and Integration Tests separately in a Maven-based Spring Boot application. We will use the JUnit Tag feature to group our test cases and separate Unit Tests from Integration Tests. To learn more, check out the Test Java code tutorials page. Create your tests…

Read More Running Unit Tests and Integration Tests Separately in Spring Boot

There are a few different ways to Unit test code that throws an Error in Swift and my preferred way is to use the XCTAssertThrowError and XCTAssertNoThrows. I will also share with you how to use the traditional way of handling an error with the do-try-catch. Error To Be Thrown Let’s assume that we have…

Read More Unit Testing Code That Throws Error in Swift

In this XCTest tutorial, you will learn how to write a unit test that will test if UIButton is connected to @IBOutlet and has @IBAction assigned. For this tutorial, I will create a Single View application project. I will use the default View Controller that XCode creates for all new projects and I will position…

Read More XCTest. Test if UIButton is Connected And Has Action

When we take the Test Driven Development(TDD) approach to write code we eventually ask ourselves a couple of questions: Have I covered all possible use cases? Have I written enough unit tests? What helps me is writing a bulleted list of functional requirements for the feature I am developing. Having a clear list of things…

Read More Swift TDD. How Many Unit Tests to Write?

This blog post will give you a brief introduction to a Test-Driven Development(TDD) in Swift and will demonstrate how you can create a very basic Unit test in Swift to test a User Model Struct that holds the details of the Account Registration form. Assume that you need to follow the Test-Driven development approach to…

Read More Swift Unit Test of User Registration Model

In this tutorial on Rest Assured, I am going to share with you how to create a test case which sends HTTP Get Request and includes two Query String Request Parameters. Let’s assume we need to test a RESTful Web Service Endpoint which returns a list of users. The URL to our RESTful Web Service…

Read More Rest Assured HTTP Request with Query Parameters