kiel
(Kiel Gillard)
1
How unrealistic is the idea of a refactor command in Xcode (or whatever) that attempts to convert an XCTestCase to a type using swift-testing macros?
Having such a command may take much of the tedium out of the effort and rapidly increase adoption. When I look in my code bases, there are a large number of subclasses of XCTestCase containing usage of XCTAssert* that could be refactored fairly straightforwardly.
1 Like
Matejkob
(Mateusz Bąk)
2
You might find this lovely third-party tool created by @giginet helpful: swift-testing-revolutionary. It's designed to convert XCTest cases to swift-testing format–does not support all cases but it support a lot of them.
4 Likes
kiel
(Kiel Gillard)
3
That looks sweet. Thanks for sharing this!
giginet
(Kohki Miki)
4
Thank you for introducing my product 
Feel free to open an issue if you have any problems.
3 Likes
maartene
(Maarten Engels)
5
@giginet
thank you for this tool!
Just gave this a go on one of my projects. Took me all of 15 minutes to convert 32 tests. This is including the one time setup and figuring out how the tool works. (Probably 14 minutes of those 15 minutes, so a 'fixed cost'). Imagine applying this to 3200 tests... 
Note: I opened two minor issues for findings.