Author: Sergey Kargopolov

I’m a software developer with a passion for teaching. I’ve written lots of articles for AppsDeveloperBlog.com and made plenty of video tutorials on my YouTube channel(https://youtube.com/@SergeyKargopolov). If you want to dive deeper, I’ve also got some courses on Udemy(https://www.udemy.com/user/sergeykargopolov/) you might like.

When I’m not coding, I love to travel. I also share my travel adventures over at TravelLocalCanada.com. Hope to see you around on one of these platforms!

Web: www.appsdeveloperblog.com

HATEOAS is a way to make your RESTful Web Service endpoint, automatically include links to other Resources of your API, in the response that it sends back to a calling client application.  The client application that consumes your web service endpoint, can then use those links, to consume other RESTful Resources that your Web Service…

Read More Add HATEOAS to Spring Boot RESTful Web Service

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

There are different ways to load UIViewController in a Unit Test and in this tutorial you will learn three of them. Loading UIViewController from Main.storyboard, Loading UIViewController from XIB, Loading UIViewController that is not on the Main.storyboard and does have an interface XIB file. This is a type of UIViewController that creates views programmatically. Loading…

Read More Ways to Load UIViewController in a Unit Test

There are times when we need our UI Test code to pass some information to our mobile app, not by typing it into a Text Field or a Text View but by sending it as a command-line argument or as a launch environment property. To pass a command-line launch argument or an environment key-value pair…

Read More UI Testing. Launch Arguments & Launch Environment

By default, Xcode will automatically create a screenshot of the app if UI Test fails. If needed, we can also create a screenshot programmatically and include it in a Test Report with the help of the XCTAttachment class. In this tutorial, you will learn how to create a screenshot of a specific UI element as well…

Read More XCUIScreenshot – Creating Screenshots in UI Test

When writing unit tests, developers try to follow the F.I.R.S.T principle as much as possible. F.I.R.S.T is a combination of multiple principles. Let’s learn what these are. Fast The first letter in the F.I.R.S.T principle stands for – Fast. Unit tests are small pieces of code that perform one, specific task. Because unit tests are…

Read More The F.I.R.S.T. Principle in Unit Testing

The addTeardownBlock(_:) runs right after the test method ends and before the instance’s tearDownWithError() method is called. Below is an example of a TestCase class that does not test anything and only demonstrates the order in which the setUp() and tearDown() methods are called. When will the addTeardownBlock(_:) run? The addTeardownBlock will run after the test method is…

Read More addTeardownBlock Example in XCTestCase