Repository to help people learning testing

Overview

Testing Training

The purpose of this repository is to help people learn the basics of testing in Swift. I decided to prepare this repository because many people reached out to ask for advice and guidance on testing their code. I think that this is the fastest way to help as many people as I can.

The idea is to read the theory and the examples in the repository, execute the exercises and ask for a code review. See the How To Work With This Repository section to know how to request help.

Content

Most of the concepts discussed here can be applied to many other programming languages, although you'll need to use the proper technology to apply them. For example, you will need to use JUnit specific assertEquals instead of XCAssertEquals from XCTest. This makes this knowledge valuable, independently from your experience.

The repository is organized into chapters. We will start with the basics and with the tools. Moving on, we will analyze more complex problems, understanding how we can test them. For every chapter, I'll try to explain the theory, provide some examples and leave some exercises to work with the concepts.

Summary

  1. Basics and Pure Functions
  2. Tesing in An OOP Settings
  3. Working with Dependencies
  4. Avoiding Expectations in Tests
  5. Test Driven Development
  6. Snapshot Testing
  7. Basics of UITesting

Prerequisites

The requisites to fully profit from this repository are:

  • Xcode. We will use Xcode 13.2 when developing the examples and exercises.
  • a basic knowledge of Swift. We won't use super-advanced tricks, but you need to be comfortable with protocols and closures.

How to Work With This Repository

To request a review, you can follow this process:

  1. Fork this repository in your Github.
  2. Invite me to the repository (@cipolleshi).
  3. Choose a chapter you want to exercise with.
  4. Create a branch.
  5. Execute the exercises.
  6. Open a PR from your development branch to your main branch
  7. Wait for my review. I usually receive the Github notification in the email, so I should be notified when there is a change. If I haven't reviewed the PR after one week, feel free to send me an email.

I hope this can help all of you improve your testing skills and, together with them, your software engineering skills.

You might also like...
A Simple way help you drop or drag your source (like UIImage) between different App.

A Simple way help you drop or drag your source (like UIImage) between different App.

It can help you to prepare yourself for interview ๐Ÿš€

Note I will keep updating the content table as I am going through, keep connected to stay updated ! Contribution You can contribute here as well, crea

FocusSpace - A time-management tool to help you stay focus with your friends
FocusSpace - A time-management tool to help you stay focus with your friends

FocusSpace ๐Ÿ† ElleHacks2022 - (Telus) First Place ๐Ÿ‘ฉ Developers Manyi Cheng(@man

Rosetta Enforcer is a macOS utility designed to help developers convert Universal Binary application to Single Architecture, vice versa.
Rosetta Enforcer is a macOS utility designed to help developers convert Universal Binary application to Single Architecture, vice versa.

Rosetta Enforcer Rosetta Enforcer is a macOS utility designed to help developers convert Universal Binary application to Single Architecture, vice ver

KYSelectBox Repository
KYSelectBox Repository

KYSelectBox Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements platform :ios, '12.

This repository hosts the PushwooshGeozones iOS SDK as an XCFramework based Swift Package.

This repository hosts the PushwooshGeozones iOS SDK as an XCFramework based Swift Package. Use this repository's Swift Package in Xcode 12+

A repository that demonstrates the difficulty to run async tests with Xcode 13.2 beta on pre iOS-15 simulators

A repository that demonstrates the difficulty to run async tests with Xcode 13.2 beta on pre iOS-15 simulators This demonstration uses an iOS 13.7 sim

A repository to experiment around the use and generation of tokens for the JLL/T Design System

Basic Style Dictionary This example code is bare-bones to show you what this framework can do. If you have the style-dictionary module installed globa

SwiftUITemplate - Template repository for SwiftUI projects

SwiftUITemplate Template repository for SwiftUI projects. Environment Name Versi

Owner
Riccardo
Riccardo
Unmutify: Helping mute people to talk

Unmutify Helping mute people to talk Important Links Demo Video Devpost Problem Statement Many people are unable to talk due to their disabilities & m

Seungjun 4 Nov 27, 2021
Use this template as a starting point for any Swift 5 module that you want other people to include in their projects

Swift 5 Module Template Use this template as a starting point for any Swift 5 mo

James Knipe 0 Dec 28, 2021
Calculate your tip and split the bill between any number of people

Calculate your tip and split the bill between any number of people

Tirupati Balan 6 Feb 9, 2022
BoldContacts mobile app for people with visual/cognitive/motor disabilities

BoldContacts mobile app BoldContactsโ„ข is a mobile app that helps you browse your contacts and connect with them. BoldContacts is intended for people w

SixArm 25 Dec 15, 2022
This is MVP pattern testing with Swift.

sample-swift-mvp MVP ํŒจํ„ด์— ๋Œ€ํ•œ ์ดํ•ด๋ฅผ ๋†’์ด๊ธฐ ์œ„ํ•ด์„œ ์ƒ˜ํ”Œ ์ฝ”๋“œ ์ž‘์„ฑ ๋ฐ ๊ธฐ๋ก MVP ํŒจํ„ด MVP(Model-View-Presenter) ํŒจํ„ด์€ ์†Œํ”„ํŠธ์›จ์–ด ์•„ํ‚คํ…์ฒ˜ ํŒจํ„ด์ด๋‹ค M (Model) - ๋ฐ์ดํ„ฐ ๋ชจ๋ธ - ์‹ค์งˆ์ ์ธ ๋ฐ์ดํ„ฐ V (View) - M

Youngwoo Lee 0 Nov 10, 2021
A testing MQTT react native library

react-native-awesome-testing abc Installation npm install react-native-awesome-testing Usage import { multiply } from "react-native-awesome-testing";

null 0 Nov 26, 2021
A Swift package that provides convenient Lorem Ipsum text, images, colors and other placeholders for rapidly prototyping, building and testing your iOS applications.

Lorem Introducing Lorem, a placeholder generator library for iOS to help you rapidly prototype, build and test your iOS applications. By leveraging Sw

Thirdfort Limited 10 Dec 5, 2022
Learning iOS Frontend: Aplikasi iOS Pemesanan Makanan dengan SwiftUI, WidgetKit, Google Fonts, dan Assets dari Figma

Foody Aplikasi Foody adalah Aplikasi iOS Pemesanan Makanan dengan SwiftUI, WidgetKit, Google Fonts, dan Assets dari Figma untuk Mempelajari Ilmu Front

DK 10 Aug 20, 2022
My english learning by reading application swift, realm

read-answer-learn-app My english learning by reading application swift, realm I used Swift language and storyboard, realm, tureng translate service in

null 4 Aug 18, 2022
I am learning to build an iOS app with SwiftUI.

ios-quiz-app I am learning to build an iOS app with SwiftUI. This is a quiz app with SwiftUI although tutorial was on UIKit Challenges Faced navigatio

null 3 Nov 25, 2022