Interop between XCTest and Swift Testing? In the economy? It's more likely than you think.

Legitimately, I'm really excited for this. This'll enable much more consistent set of tooling that can easily be used in Swift Testing and in XCTest. It'll also make migrating from XCTest to Swift Testing much more simpler and much safer.

Go leave feedback at https://forums.swift.org/t/st-0021-targeted-interoperability-between-swift-testing-and-xctest/84965

#SwiftLang #XCTest #SwiftTesting #UnitTesting

ST-0021: Targeted Interoperability between Swift Testing and XCTest

Hello Swift Community! The review of ST-0021 "Targeted Interoperability between Swift Testing and XCTest" starts now and runs through Tuesday, March 10th, 2026. The proposal is available here: swift-evolution/proposals/testing/0021-targeted-interoperability-swift-testing-and-xctest.md at main · swiftlang/swift-evolution · GitHub Reviews are an important part of the Swift evolution process. All review feedback should be either on this forum thread or, if you would like to keep your feedback pri...

Swift Forums

Also in related news: I updated my UI testing helpers library with a few macOS specific additions that I needed to test this application.

https://github.com/Tunous/XCAppTest

#Swift #XCTest #XCUITest

SPM + GTest

If you need to expose a C++ library with #gtest via #spm, there is a straightforward way to wrap existing tests with #xctest:

1. Add gmock as a .systemLibrary target in your Package.swift and link it to your .testTarget.

2. Create a module map and an umbrella header for gmock.

3. Create an Obj-C++ adapter that wraps GoogleTest with XCTestCase.

🚀 CMD + U

Rafinad: сахар для UI-тестирования iOS-приложений

Мы в hh очень любим UI-тесты, ими покрывается практически вся функциональность наших приложений, и даже backend-разработчики прогоняют тесты мобильных платформ перед развертыванием своих фич. Однако наши механизмы UI-тестирования разрабатывались более 8 лет назад и с тех пор почти не изменились. Кто-то скажет, что старые решения прошли проверку временем и что «работает — не трогай»... Возможно, и так. Но сейчас мы внедряем новую дизайн-систему, а новые компоненты требуют адаптации всех тестов — не лучшее ли время для перемен? Поэтому мы пересмотрели наши подходы к UI-тестированию и теперь готовы поделиться наработками с сообществом в виде open-source проекта — Rafinad . В этой статье расскажем, что он умеет и как им пользоваться.

https://habr.com/ru/companies/hh/articles/910380/

#ios #uiтесты #uiтестирование #тестирование #swift #swiftui #uikit #xctest #xcuitest #dsl

Rafinad: сахар для UI-тестирования iOS-приложений

Мы в hh очень любим UI-тесты, ими покрывается практически вся функциональность наших приложений, и даже backend-разработчики прогоняют тесты мобильных платформ перед развертыванием своих фич. Однако...

Хабр
And a code snippet for the `assertThrowsAsyncError` function that can be used with #XCTest: #SwiftDev
https://gitlab.com/-/snippets/2567566
Asynchronous test assertion helper ($2567566) · Snippets · GitLab

GitLab.com

GitLab

Latest little hobby rabbit hole: automated iOS UI testing. It's always difficult for me to wrap my head around UI testing tools and frameworks, but I'm getting there! The least useful manual test cases for my app Playway are now automated. More useful ones to follow, hopefully. A good side effect is that I took the time to make sure all (OK, most) views have good accessibility settings.

#ios #testing #UITesting #XCTest #accessibility #a11y

I open sourced a new Swift Package.

𝗫𝗖𝗨𝗜𝗧𝗲𝘀𝘁𝗛𝗲𝗹𝗽𝗲𝗿
𝚇𝙲𝚄𝙸𝚃𝚎𝚜𝚝𝙷𝚎𝚕𝚙𝚎𝚛 𝚑𝚎𝚕𝚙𝚜 𝚢𝚘𝚞 𝚠𝚛𝚒𝚝𝚒𝚗𝚐 𝚄𝙸 𝚝𝚎𝚜𝚝𝚜 𝚠𝚒𝚝𝚑𝚒𝚗 𝚂𝚠𝚒𝚏𝚝𝚄𝙸. 𝙸𝚝 𝚙𝚛𝚘𝚟𝚒𝚍𝚎𝚜 𝚊 𝚜𝚎𝚝 𝚘𝚏 𝚞𝚜𝚎𝚏𝚞𝚕 𝚎𝚡𝚝𝚎𝚗𝚜𝚒𝚘𝚗𝚜 𝚘𝚗 𝚇𝙲𝚄𝙸𝙰𝚙𝚙𝚕𝚒𝚌𝚊𝚝𝚒𝚘𝚗, 𝚇𝙲𝚄𝙸𝙴𝚕𝚎𝚖𝚎𝚗𝚝 𝚊𝚗𝚍 𝚇𝙲𝚄𝙸𝙴𝚕𝚎𝚖𝚎𝚗𝚝𝚀𝚞𝚎𝚛𝚢 𝚝𝚘 𝚖𝚊𝚔𝚎 𝚢𝚘𝚞𝚛 𝚝𝚎𝚜𝚝𝚜 𝚖𝚘𝚛𝚎 𝚛𝚎𝚊𝚍𝚊𝚋𝚕𝚎 𝚊𝚗𝚍 𝚎𝚊𝚜𝚒𝚎𝚛 𝚝𝚘 𝚖𝚊𝚒𝚗𝚝𝚊𝚒𝚗.

https://github.com/0xWDG/XCUITestHelper

#Swiftlang #XCTest #UITesting #Xcode #XCTestCase #SwiftUI #iOS #macOS #oss

GitHub - 0xWDG/XCUITestHelper: XCUITestHelper helps you writing UI tests within SwiftUI. It provides a set of useful extensions on XCUIApplication, XCUIElement and XCUIElementQuery to make your tests more readable and easier to maintain.

XCUITestHelper helps you writing UI tests within SwiftUI. It provides a set of useful extensions on XCUIApplication, XCUIElement and XCUIElementQuery to make your tests more readable and easier to ...

GitHub
Had to knock off most of the last week after having come down with a bout of the the 'flu. But I did try @mattiem's suggestion of creating a separate #swift library package to be able to run #XCTest unit tests on code for a command line script. Works as expected.
Hmm... Apparently one cannot create an #XCTest target for a command line app in #Xcode. Why does #Apple hate the command line? #swift
https://stackoverflow.com/questions/34097287/xcode-7-cant-create-a-swift-command-line-tool-with-a-unit-test-target
Xcode 7: Can't create a Swift command line tool with a unit test target

Oh, Xcode! I'm stymied. If I create a Mac OS Cocoa app, I get a unit test target for free. But I want to write a command line tool (or even a library that I can link into a command line tool) and ...

Stack Overflow

Введение в тестирование на Swift Testing

XCTest является основным инструментом для тестирования в Swift и широко используется разработчиками. Однако, новая библиотека Testing предлагает дополнительные возможности и синтаксический сахар, который делает процесс тестирования еще более удобным и мощным. В данной статье мы рассмотрим основные аспекты тестирования на Swift, включая использование библиотеки Testing.

https://habr.com/ru/articles/823396/

#swift #testing #swift__разработка #swift_development #xcode #xctest

Введение в тестирование на Swift Testing

Обзор тестирования в Swift Тестирование кода является важной и неотъемлемой частью процесса разработки программного обеспечения. Оно позволяет разработчикам проверять функциональность своих программ,...

Хабр