diff --git a/docs/assets/circleci-test-collapsed-with-methodname-class.png b/docs/assets/circleci-test-collapsed-with-methodname-class.png new file mode 100644 index 0000000..b607cb1 Binary files /dev/null and b/docs/assets/circleci-test-collapsed-with-methodname-class.png differ diff --git a/docs/assets/circleci-test-collapsed-with-methodname-default.png b/docs/assets/circleci-test-collapsed-with-methodname-default.png new file mode 100644 index 0000000..cf2e670 Binary files /dev/null and b/docs/assets/circleci-test-collapsed-with-methodname-default.png differ diff --git a/docs/assets/circleci-test-expanded-with-failure-default.png b/docs/assets/circleci-test-expanded-with-failure-default.png new file mode 100644 index 0000000..afa3a1a Binary files /dev/null and b/docs/assets/circleci-test-expanded-with-failure-default.png differ diff --git a/docs/assets/circleci-test-expanded-with-failure-verbose.png b/docs/assets/circleci-test-expanded-with-failure-verbose.png new file mode 100644 index 0000000..752db41 Binary files /dev/null and b/docs/assets/circleci-test-expanded-with-failure-verbose.png differ diff --git a/docs/circleci-recommendation.md b/docs/circleci-recommendation.md index 699ba9b..c9820c5 100644 --- a/docs/circleci-recommendation.md +++ b/docs/circleci-recommendation.md @@ -1,3 +1,53 @@ # CircleCI Recommendation -**TODO** If you are a Circle CI user who is willing to help, please see Issue #37 +## Summary + +```yml +- run: + command: | + vstest.console.exe ... --logger:"junit;LogFilePath=TestResults/test-result.xml;FailureBodyFormat=Verbose" +- store_test_results: + path: TestResults/ +``` + +## Details + +CircleCI uses just a few pieces of the JUnit XML report to generate the displayed user interface. + +For each failed test (i.e. for each JUnit `` element containing a failure or an error), +CircleCI only shows the testcase's failure/error message, any text within the failure/error element, plus any `` or `` text. +It does not show the testcase's properties. +It does not show data from the testsuite. + +By default, the logger records test console output in the JUnit testsuite, +which CircleCI ignores; +this can be improved upon by setting FailureBodyFormat when invoking the logger. +Setting MethodFormat provides no additional information or functionality. + +### FailureBodyFormat + +Setting `FailureBodyFormat=Verbose` when invoking the logger ensures that any test console output is visible in the CircleCI UI for (failed) tests. +This can provide important/useful information, +especially if the test failure message is insufficiently informative on its own. + +- `Default`: + ![FailureBodyFormat Default](assets/circleci-test-expanded-with-failure-default.png) + +- `Verbose`: + ![FailureBodyFormat Verbose](assets/circleci-test-expanded-with-failure-verbose.png) + +### MethodFormat + +CircleCI shows the class names of each failed test so setting `MethodFormat=Class` or `MethodFormat=Full` provides no further information on the CircleCI UI; the effect is purely cosmetic and is a matter of personal preference. + +- `Default`: + ![MethodFormat Default](assets/circleci-test-collapsed-with-methodname-default.png) +- `Class`: + ![MethodFormat Class](assets/circleci-test-collapsed-with-methodname-class.png) +- `Full`: + Same as `Class`.