🗃
CSVReporter
Comma separate your results.
The CSVReporter can be used to create csv files that contain the test output. The file output location is {testname}.spec.csv. It can be used directly from the configuration file.
It must be installed manually via the CLI.
1
const { CSVReporter } = require("@as-pect/csv-reporter").default;
2
3
// export your configuration
4
module.exports = {
5
reporter: new CSVReporter(),
6
};
Copied!
It can also be used from the cli using the --csv flag.
1
npm install --save-dev @as-pect/csv-reporter
2
npx asp --csv
Copied!
This is a list of all the columns in the exported csv file.
1
const csvColumns = [
2
"Group", // The Test Group
3
"Name", // The Test Name
4
"Ran", // If it ran
5
"Pass", // If it passed
6
"Runtime", // The total test runtim
7
"Message", // The error message
8
"Actual", // Actual value message if an expectation failed
9
"Expected", // Expected value message if an expectation failed
10
"Average", // The average run time (performance)
11
"Median", // The median run time (performance)
12
"Max", // The maximum run time (performance)
13
"Min", // The minimum run time (performance)
14
"StdDev", // The standard deviation of the run times (performance)
15
"Variance", // The variance of the run times (performance)
16
];
Copied!
Last modified 2yr ago
Copy link