XCTest is a standard testing framework from Apple. It comes bundled up with Xcode and bundled up with SwiftPM for other platforms. Open-source version could be found here
Official doc on how to use SwiftPM: SPM Usage
To build your package:
$ swift build
(And most importantly) to run tests:
$ swift test
The best way to write Swift code is by using Xcode, but you can also VSCode or any other text editor. In Xcode just select File -> Open and click on folder that contains this file.
To use Swith with other text editors check out SourceKit LSP from Apple Also for VSCode users, there is official Swift support: Swift for Visual Studio Code