README.md in danger-junit-0.6.1 vs README.md in danger-junit-0.6.3
- old
+ new
@@ -1,17 +1,48 @@
# danger-junit
-A description of danger-junit.
+This Danger Plugin allows you to standardise the output for all of your testing runs. Most test runners include an ability to have a reporter that conforms to the JUnit XML standard. This plugin will understand that file and offer a way to introspect it, and to report on it.
+![](img/example.png)
+
## Installation
$ gem install danger-junit
## Usage
+### Ruby
+For Rspec, add the gem `rspec_junit_formatter` to your project. Then use a `.rspec` file to configure your tests to have multiple reporters. This file looks like:
+``` sh
+...
+--format documentation
+--format RspecJunitFormatter --out junit-results.xml
+...
+```
+
+Then you can pass the `junit-results.xml` file to the plugin in your `Dangerfile`.
+
+### JS
+
+In a Jasmine, or Jest testing project, you want to install the module `jasmine-reporters`. Then as you are setting up your Jasmine runner, [add the following](https://github.com/larrymyers/jasmine-reporters#basic-usage):
+
+```
+var junitReporter = new jasmineReporters.JUnitXmlReporter({
+ savePath: 'junit-results.xml',
+ consolidateAll: false
+});
+jasmine.getEnv().addReporter(junitReporter);
+```
+
+Then you can pass the `junit-results.xml` file to the plugin in your `Dangerfile`.
+
+### iOS
+
+Both [xcpretty](https://github.com/supermarin/xcpretty#reporters) and [XCTool](https://github.com/facebook/xctool#included-reporters) include reporters for creating a JUnit XML file. As Fastlane's [scan](https://github.com/fastlane/fastlane/tree/master/scan) uses xcpretty, it also has support for the file.
+
### junit
Report, or inspect any JUnit XML formatted test suite report.
Testing frameworks have standardized on the JUnit XML format for
@@ -56,22 +87,22 @@
</blockquote>
#### Attributes
-<tr>
+
`tests` - All the tests for introspection
-<tr>
+
`passes` - An array of XML elements that represent passed tests.
-<tr>
+
`failures` - An array of XML elements that represent failed tests.
-<tr>
+
`errors` - An array of XML elements that represent passed tests.
-<tr>
+
`skipped` - An array of XML elements that represent skipped tests.
-<tr>
+
`show_skipped_tests` - An attribute to make the plugin show a warning on skipped tests.
-<tr>
+
`headers` - An array of symbols that become the columns of your tests,
if `nil`, the default, it will be all of the attribues.