Class StatsReporter

The stats reporter creates a csv file with the duration and the result of all your steps and tests. It's usefull to use it with other reporters, like spec progress.

Methods

NameDescription
begin (testCount) This method is trigered when before the test start
begin (suite, ) Called before a test execution
begin () Called before a suite execution
begin (suite, test, ) Called before a step begins
end () This method is trigered when your tests are ended
end () Called after a suite execution
end (suite, test, ) Called after a step ended
update () This method is triggered when you can perform some updates. The frequency varries by the test executor that you choose

Example

It should write the stats to the expected path

scope(exit) {
  if(exists("destination.csv")) {
    std.file.remove("destination.csv");
  }
}

auto stats = new StatsReporter("destination.csv");
stats.end([]);

"destination.csv".exists.should.equal(true);