https://github.com/aphistic/sweet-junit
A plugin for the Sweet testing framework to output JUnit files for test results
https://github.com/aphistic/sweet-junit
junit junit-report sweet unit-testing
Last synced: 8 months ago
JSON representation
A plugin for the Sweet testing framework to output JUnit files for test results
- Host: GitHub
- URL: https://github.com/aphistic/sweet-junit
- Owner: aphistic
- License: mit
- Created: 2017-02-08T16:05:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-08-18T23:28:01.000Z (almost 7 years ago)
- Last Synced: 2025-01-13T05:22:03.242Z (over 1 year ago)
- Topics: junit, junit-report, sweet, unit-testing
- Language: Go
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sweet-junit #
A plugin for the Sweet testing framework to output JUnit files for test results
## Usage ##
Using this plugin with [sweet](https://www.github.com/aphistic/sweet) is pretty
straightforward:
```go
func Test(t *testing.T) {
sweet.T(func(s *sweet.S) {
s.RegisterPlugin(junit.NewPlugin())
s.RunSuite(t, &mySuite{})
})
}
```
Once the plugin is registered with sweet, you can specify the file to write the
output to by passing the `-sweet.opt` when running `go test` and providing the
`junit.output` key with the path you'd like to write the junit file to, such as:
```bash
$ go test -sweet.opt "junit.output=junit.xml"
```