XCTestPlayground
No description available
Install / Use
/learn @Liquidsoul/XCTestPlaygroundREADME
XCTestPlayground
This repository contains a simple implementation of most XCTAssert macros to use in a Playground.
With the Playground feature that display the result of an executed line, it will show the assert result like this:

I use this to do TDD directly inside a Playground and then move the code as-is inside my test files.
It contains a XCTestCase base class that, when instantiated, will run all methods with names beginning with "test", to mimic XCTestCase behaviour and make moving the code to your Xcode project easier.
How to install it in an existing playground
Simply add the XCTestPlayground.swift file to your Playground Sources folder.
Using it directly
The repo contains a fully configured Xcode workspace containing a playground importing XCTestPlayground.
All you have to do is:
- clone the repo
- build the framework on a 64-bit target (e.g. iPhone 5s simulator)
- go and play in the
XCTestPlaygroundExampleplayground! 🎉
Swift version
Xcode 9 has been released and since the playgrounds in this version uses swift 4 tools intended to be used inside them should use this version.
Nevertheless, if you want to use XCTestPlayground with previous versions of Xcode, you can still checkout the last commit using the Swift 2.2 version: af05981c214a3a5ac1fa7b298787d517100db868
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
