diff --git a/.gitignore b/.gitignore index f16c0633..a47479e9 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ localConfig.cjs config.json reports/** !.gitkeep +allure-results/ \ No newline at end of file diff --git a/README.md b/README.md index c9626b9c..7ef41d55 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ specification. - [Setup](#setup) - [Usage](#usage) - [Testing Locally](#testing-locally) + - [Allure Reporting](#allure-reporting) - [Implementation](#implementation) - [VC-API](#vc-api) - [Contribute](#contribute) @@ -282,6 +283,18 @@ module.exports = { }]; ``` +### Allure Reporting +It's also possible to generate local allure reports for analyzing and debugging results. [Allure](https://allurereport.org/) is a language agnostic reporting framework which enables useful features for developers and test-suite designers. + +To run the tests and browse the report, use the following commands: +```bash +# Running the tests +npx mocha tests/ + +# Running the reporting server +allure serve allure-results +``` + ## Implementation ### VC-API diff --git a/package.json b/package.json index 7e7906dd..ca3626f3 100644 --- a/package.json +++ b/package.json @@ -49,9 +49,18 @@ "vc-test-suite-implementations": "github:w3c/vc-test-suite-implementations" }, "devDependencies": { + "allure-commandline": "^2.30.0", + "allure-mocha": "^3.0.3", "eslint": "^8.19.0", "eslint-config-digitalbazaar": "^4.0.1", "eslint-plugin-jsdoc": "^39.3.3", "eslint-plugin-unicorn": "^43.0.0" + }, + "mocha": { + "parallel": false, + "reporter": "allure-mocha", + "reporterOptions": { + "resultsDir": "allure-results" + } } }