With XCTest you were able to tun tests with:
MyTestCase.defaultTestSuite.run()
How can we use the new testing framework with Swift Playgrounds?
Swift Playgrounds doesn't support Swift Testing and XCTest. Please file a suggestion if you would like Apple to consider adding such a feature. To file your suggestion, use Feedback Assistant then post the Feedback number here.