@@ -569,6 +569,49 @@ More config options are available:
569569
570570* ` config` (optional, default ` {}` )
571571
572+ ## junitReporter
573+
574+ Generates a JUnit-compatible XML report after a test run.
575+
576+ Unlike Mocha's ` mocha- junit- reporter` , this plugin understands CodeceptJS steps and substeps.
577+ For every ` < testcase> ` it includes:
578+
579+ * ` < properties> ` — the test's meta information: every ` meta` key from ` Scenario (' ...' , { meta })` , plus its ` tags` and ` retries`
580+ * ` < system- out> ` — an indented step/substep log (substeps are nested under their meta step); only failed steps are marked
581+ * ` < failure> ` — for failed tests: the error message, type, stack trace and (optionally) the step trace
582+
583+ The produced file is consumable by Jenkins, GitLab CI, CircleCI, GitHub Actions test reporters, etc.
584+
585+ #### Configuration
586+
587+ ` ` ` js
588+ " plugins" : {
589+ " junitReporter" : {
590+ " enabled" : true
591+ }
592+ }
593+ ` ` `
594+
595+ Possible config options:
596+
597+ * ` outputName` : file name for the report. Default: ` report .xml ` .
598+ * ` output` : directory where the report is stored, relative to the project root. Default: the ` output` directory.
599+ * ` testGroupName` : value of the ` name` attribute on the root ` < testsuites> ` element. Default: ` CodeceptJS` .
600+ * ` attachMeta` : add the test's meta information (` meta` keys, ` tags` , ` retries` ) as ` < properties> ` . Default: true.
601+ * ` attachSteps` : add the step/substep log as ` < system- out> ` . Default: true.
602+ * ` stepsInFailure` : append the step trace to the ` < failure> ` body. Default: true.
603+
604+ CLI examples:
605+
606+ npx codeceptjs run -p junitReporter
607+ npx codeceptjs run -p junitReporter:outputName=junit.xml
608+
609+ > ℹ When running with ` run- workers` , steps are serialized between processes and substep nesting is flattened.
610+
611+ ### Parameters
612+
613+ * ` config` **any** (optional, default ` {}` )
614+
572615## pageInfo
573616
574617Collects information from web page after each failed test and adds it to the test as an artifact.
0 commit comments