Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/allegro/swift-junit
A Swift library for creating JUnit XML test results that can be interpreted by tools such as Bamboo or Jenkins. Macos and Linux ready.
https://github.com/allegro/swift-junit
junit junit-report junit-xml server-side-swift swift xctest xctest-linux xml
Last synced: about 2 months ago
JSON representation
A Swift library for creating JUnit XML test results that can be interpreted by tools such as Bamboo or Jenkins. Macos and Linux ready.
- Host: GitHub
- URL: https://github.com/allegro/swift-junit
- Owner: allegro
- License: apache-2.0
- Created: 2019-04-11T07:23:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-20T21:20:03.000Z (almost 2 years ago)
- Last Synced: 2024-03-14T16:23:18.165Z (9 months ago)
- Topics: junit, junit-report, junit-xml, server-side-swift, swift, xctest, xctest-linux, xml
- Language: Swift
- Homepage:
- Size: 281 KB
- Stars: 29
- Watchers: 4
- Forks: 13
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
# Swift Test Reporter
[![CI](https://github.com/allegro/swift-junit/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/allegro/swift-junit/actions/workflows/ci.yml)
A Swift library for creating JUnit XML test results that can be interpreted by tools such as Bamboo or Jenkins.
Sample output:
```
```
# How to use it?
## Linux
Add ``SwiftTestReporter`` to ``Package.swift``:```
import PackageDescriptionlet package = Package(
dependencies: [
...
.package(url: "https://github.com/allegro/swift-junit.git", from: "2.0.0"),
// or for Swift 4.x
// .package(url: "https://github.com/allegro/swift-junit.git", from: .upToNextMajor(from: "1.0.0")),
]
...
targets: [
...
.testTarget(
name: "AppTests",
dependencies: [
"App",
"SwiftTestReporter"
]
),
]
)
```Next, add:
```
import SwiftTestReporter_ = TestObserver()
```
To ``LinuxMain.swift``. Done.## XCode
In ``Project Navigator``, select particular project:![test](doc/intro-mac-1.png)
Next, select test target:
![test](doc/intro-mac-2.png)
Add a new property named ``Principal class`` and set it to ``SwiftTestReporter.TestObserver``
![test](doc/intro-mac-3.png)