# aft-logging-html

> Automated Functional Testing (AFT) package that creates a HTML results file as a Logging Plugin

Latest version **9.0.0** (published 2022-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install aft-logging-html
pnpm add aft-logging-html
yarn add aft-logging-html
bun add aft-logging-html
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 9.0.0 |
| Published | 2022-09-27 |
| First published | 2021-05-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 142.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jason Holt Smith |
| Maintainers | bicarbon8 |
| Keywords | aft, automation, e2e, unit, integration, functional, html, logging |

## Links

- npm: https://www.npmjs.com/package/aft-logging-html
- Repository: https://github.com/bicarbon8/automated-functional-testing
- Homepage: https://github.com/bicarbon8/automated-functional-testing#readme
- Issues: https://github.com/bicarbon8/automated-functional-testing/issues
- npm.io page: https://npm.io/package/aft-logging-html

## Dependencies (1)

- [aft-core](https://npm.io/package/aft-core.md) ^9.0.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 9.0.0 (latest) — 2022-09-27
- 8.4.2 — 2022-07-12
- 8.4.1 — 2022-07-07
- 8.4.0 — 2022-07-05
- 8.3.0 — 2022-07-01
- 8.2.0 — 2022-06-30
- 8.1.0 — 2022-06-29
- 8.0.0 — 2022-06-29
- 7.0.0 — 2022-05-10
- 6.0.1 — 2022-01-25
- 5.0.1 — 2021-05-24
- 5.0.0 — 2021-05-20

## README

# AFT-Logging-HTML
an Automated Functional Testing (AFT) library providing logging to an HTML file for any `TestResult` objects logged via the `aft-core.LogManager`

## Installation
`> npm i aft-logging-html`

## Configuration
to specify the filename and output directory for the generated HTML results add the following to your `aftconfig.json`:
```json
{
  "LogManager": {
    "level": "info",
    "plugins": [
      {
        "name": "html-logging-plugin",
        "searchDirectory": "./node_modules/",
        "options": {
          "enabled": true,
          "level": "warn",
          "fileName": "TestResultsSummary.html",
          "outputDir": "./dist",
          "maxLogLines": 4
        }
      }
    ]
  }
}
```
- **level** - an optional `string` containing the `LogLevel` to be used in capturing logs _(defaults to value set for `LogManager`)_
- **fileName** - a `string` containing the full file name to write results into _(defaults to `testresults.html`)_
- **outputDir** - a `string` containing either a relative path from the current execution directory or an absolute path to where the results file will be written _(defaults to `process.cwd()`)_
- **maxLogLines** - a `number` indicating how many previous calls to the `log` method will be tracked. numbers greater than this will be discarded from the results _(defaults to `5`)_

> NOTE: any of the above `string` configuration values may be set to read from environment variables by setting their value to the name of the environment variable surrounded by `%` like `"fileName": "%JENKINS_ARTEFACTS_DIR%"` which would read from an environment variable named `JENKINS_ARTEFACTS_DIR`

## Example Report
the report generated by this plugin displays the description passed to your `Verifier` or `verify` function via the `Verifier.withDescription` function followed by any test ID passed in via the `Verifier.withTestId` function and the last 5 log lines for each test result
[![example report](./ExampleReport.png)](./src/templates/tmp.html)

---
_Source: https://npm.io/package/aft-logging-html · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
