<commit_before>---
title: Reporters
---

Because Cypress is built on top of Mocha, that means any reporter built for Mocha can be used with Cypress. Here is a list of built in Mocha reporters.

* {% url "Mocha's built-in reporters" https://mochajs.org/#reporters %}

We've also added the two most common 3rd party reporters for Mocha. These are built into Cypress and you can use them without installing anything.

* {% url "`teamcity`" https://github.com/cypress-io/mocha-teamcity-reporter %}
* {% url "`junit`" https://github.com/michaelleeallen/mocha-junit-reporter %}

Finally, we support creating your own custom reporters or using any kind of 3rd party reporter.

{% note %}
Once you've read through the documentation below, we invite you to experience the power of Cypress reporters via {% url "Section 9" https://github.com/cypress-io/testing-workshop-cypress/blob/master/slides/09-reporters/PITCHME.md %} of our open source {% url "testing workshop for Cypress" https://github.com/cypress-io/testing-workshop-cypress %}.
{% endnote %}

# Custom reporter

## Installed locally

Custom reporters can be loaded through a relative or absolute path. These can be specified in your configuration file (`cypress.json` by default) or via the {% url "command line" command-line %}.

For example, if you have the following directory structure:

```txt
> my-project
  > cypress
  > src
  > reporters
    - custom.js
```

You would specify the path to your custom reporter in either of the ways below.

### Config File

```json
{
  "reporter": "reporters/custom.js"
}<commit_msg>Add link to Mocha custom reporters docs (#3305)<commit_after>---
title: Reporters
---

Because Cypress is built on top of Mocha, that means any reporter built for Mocha can be used with Cypress. Here is a list of built in Mocha reporters.

* {% url "Mocha's built-in reporters" https://mochajs.org/#reporters %}

We've also added the two most common 3rd party reporters for Mocha. These are built into Cypress and you can use them without installing anything.

* {% url "`teamcity`" https://github.com/cypress-io/mocha-teamcity-reporter %}
* {% url "`junit`" https://github.com/michaelleeallen/mocha-junit-reporter %}

Finally, we support creating your own custom reporters or using any kind of 3rd party reporter.

{% note %}
Once you've read through the documentation below, we invite you to experience the power of Cypress reporters via {% url "Section 9" https://github.com/cypress-io/testing-workshop-cypress/blob/master/slides/09-reporters/PITCHME.md %} of our open source {% url "testing workshop for Cypress" https://github.com/cypress-io/testing-workshop-cypress %}.
{% endnote %}

# Custom reporter

## Installed locally

{% url "Custom Mocha reporters" https://mochajs.org/api/tutorial-custom-reporter.html %} can be loaded through a relative or absolute path. These can be specified in your configuration file (`cypress.json` by default) or via the {% url "command line" command-line %}.

For example, if you have the following directory structure:

```txt
> my-project
  > cypress
  > src
  > reporters
    - custom.js
```

You would specify the path to your custom reporter in either of the ways below.

### Config File

```json
{
  "reporter": "reporters/custom.js"
}
{'fraction_non_alphanumeric': 0.10620012277470842, 'fraction_numerical': 0.004297114794352364, 'mean_word_length': 4.132283464566929, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 11, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '801406', 'n_tokens_mistral': 1020, 'n_tokens_neox': 928, 'n_words': 382}