Skip to contents

Base class for cucumber reporters that extends testthat::Reporter. Adds step-level and feature-level reporting hooks while maintaining full compatibility with testthat reporters.

Details

CucumberReporter extends testthat's Reporter class to add: - Feature-level hooks: `start_feature()`, `end_feature()` - Step-level hooks: `start_step()`, `end_step()`

These additional hooks are called during cucumber test execution to provide visibility into individual step execution. Standard testthat reporters will continue to work unchanged, reporting only at the scenario (test) level.

Methods

`start_feature(feature_name)`

Called before executing a feature's scenarios

`end_feature()`

Called after all scenarios in a feature complete

`start_step(step)`

Called before executing a step

`end_step(step)`

Called after a step completes, with status/error/duration populated

Super class

testthat::Reporter -> CucumberReporter

Public fields

current_feature

Current feature name being executed

current_pickle

Current pickle (scenario) being executed

Methods

Inherited methods


Method start_feature()

Start a feature

Usage

CucumberReporter$start_feature(feature_name)

Arguments

feature_name

Name of the feature


Method end_feature()

End the current feature

Usage

CucumberReporter$end_feature()


Method start_step()

Start a step

Usage

CucumberReporter$start_step(step)

Arguments

step

Pickle step object


Method end_step()

End a step (called after execution with status/error/duration populated)

Usage

CucumberReporter$end_step(step)

Arguments

step

Pickle step object with execution results


Method clone()

The objects of this class are cloneable with this method.

Usage

CucumberReporter$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.