<commit_before># Coverage Testing

smalltalkCI has built-in support for per-method coverage testing in Squeak and Pharo.
It natively supports uploading coverage to [Coveralls][coveralls] from GitHub Actions, Travis CI, or AppVeyor.

Other CI services/Coverage reporters are supported by smalltalkCI with the [LCOV output format](#uploading-with-different-ci-services%2Fcoverage-reporters).

## Configuring coverage testing

To enable coverage testing behavior, add a `#coverage` dictionary to the `#testing` slot of your `.smalltalk.ston`:
```javascript
SmalltalkCISpec {
  ...
  #testing : {
    ...
    #coverage : {
      #packages : [ 'Packages-To-Cover.*' ],
      #classes : [ #ClassToCover, #'ClassToCover class' ],
      #categories : [ 'Categories-To-Cover*' ]
      #format : #coveralls
    }
  }
}
```
The `#coverage` dictionary can contain the following options:
- `#packages` (recommended)
  - Measure coverage of all instance side methods in the provided packages
- `#classes`
  - Measures all methods of all provided classes (instance side)
- `#categories`
  - Measure coverage for all classes' methods as well as their meta classes' methods
- `#format` (defaults to `#coveralls`)
  - The output format of the Coverage data 
  - May be either `#coveralls` or `#lcov`<commit_msg>Add missing comma to `.smalltalk.ston` coverage example<commit_after># Coverage Testing

smalltalkCI has built-in support for per-method coverage testing in Squeak and Pharo.
It natively supports uploading coverage to [Coveralls][coveralls] from GitHub Actions, Travis CI, or AppVeyor.

Other CI services/Coverage reporters are supported by smalltalkCI with the [LCOV output format](#uploading-with-different-ci-services%2Fcoverage-reporters).

## Configuring coverage testing

To enable coverage testing behavior, add a `#coverage` dictionary to the `#testing` slot of your `.smalltalk.ston`:
```javascript
SmalltalkCISpec {
  ...
  #testing : {
    ...
    #coverage : {
      #packages : [ 'Packages-To-Cover.*' ],
      #classes : [ #ClassToCover, #'ClassToCover class' ],
      #categories : [ 'Categories-To-Cover*' ],
      #format : #coveralls
    }
  }
}
```
The `#coverage` dictionary can contain the following options:
- `#packages` (recommended)
  - Measure coverage of all instance side methods in the provided packages
- `#classes`
  - Measures all methods of all provided classes (instance side)
- `#categories`
  - Measure coverage for all classes' methods as well as their meta classes' methods
- `#format` (defaults to `#coveralls`)
  - The output format of the Coverage data 
  - May be either `#coveralls` or `#lcov`
{'fraction_non_alphanumeric': 0.10688474705211107, 'fraction_numerical': 0.0007607455306200076, 'mean_word_length': 4.02868068833652, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '2591295', 'n_tokens_mistral': 798, 'n_tokens_neox': 746, 'n_words': 279}