# hornet-js-codeceptjs

> CodeceptJs

Latest version **3.0.0** (published 2020-04-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install hornet-js-codeceptjs
pnpm add hornet-js-codeceptjs
yarn add hornet-js-codeceptjs
bun add hornet-js-codeceptjs
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2020-04-07 |
| First published | 2020-04-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 18.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | moulinw |

## Links

- npm: https://www.npmjs.com/package/hornet-js-codeceptjs
- npm.io page: https://npm.io/package/hornet-js-codeceptjs

## Dependencies (9)

- [faker](https://npm.io/package/faker.md) 4.1.0
- [jsdoc](https://npm.io/package/jsdoc.md) 3.6.2
- [mocha](https://npm.io/package/mocha.md) ^5.2.0
- [axe-core](https://npm.io/package/axe-core.md) 3.0.3
- [codeceptjs](https://npm.io/package/codeceptjs.md) ^2.4.1
- [mochawesome](https://npm.io/package/mochawesome.md) ^3.1.1
- [webdriverio](https://npm.io/package/webdriverio.md) ^5.18.5
- [junit-report-builder](https://npm.io/package/junit-report-builder.md) ^1.3.2
- [mocha-junit-reporter](https://npm.io/package/mocha-junit-reporter.md) ^1.23.2

## Recent versions

- 3.0.0 (latest) — 2020-04-07

## README

HornetJs CodeceptJS
===================

Ce package embarque [CodeceptJS](https://codecept.io/) avec une [configuration préétablie](./codecept.conf.js) ainsi que quelques [helpers](./HELPERS.md) supplémentaires (dont l'analyse d'accessibilité).

Prérequis
---------

Il faut un selenium (vous pouvez utiliser l'image docker [Selenium](https://forge.diplomatie.gouv.fr/gitlab/hornet.js/docker/tools/selenium/blob/master/HOWTO.md) fournie pour Hornet)

Et configurer les variables d'environnements suivantes (utilisé par la configuration de base de HornetJs CodeceptJs) :

* SELENIUM_HOST : Ip/Hostname de selenium (ex.: 172.17.0.1)
* SELENIUM_POST : Port de selenium (ex. : 4444)
* TARGET_URL : Url du site que vous souhaitez tester

Usage
-----

Il y a deux façons de l'utiliser :

* En tant que dépendances NPM (préconisé)
* Avec une image docker

Installation en dépendances NPM
-------------------------------

```bash
npm install 'hornet-js-codeceptjs'
```

### Configuration

Dans le ficher codecept.conf.js, à la racine de votre projet :

```js
module.exports = require('hornet-js-codeceptjs');
```

En entête de vos fichiers de tests :

```js
const hlp = require('../node_modules/hornet-js-codeceptjs/src/helper/global-helpers/helper');
```

### Lancement des tests

```bash
./node_modules/bin/codeceptjs run

# Si vos test ne sont pas dans le répertoire test
./node_modules/bin/codeceptjs run <votre répertoire>
```

Utilisation de l'image docker
-------------------------------

```bash
docker run codeceptjs \
    -e SELENIUM_HOST=<selenium_host> \
    -e SELENIUM_PORT=<selenium_port> \
    -e TARGET_URL=<targeted_url> \
    -v <local_reports_path>:/usr/app/codecept/reports \
    -v <local_test_path>:/usr/app/codecept/test \
    -v <local_output_path>:/usr/app/codecept/output
```

### Volumes

* /usr/app/codecept/test : Chemin où monter vos tests codeceptJS
* /usr/app/codecept/reports : Chemin où seront déposés les rapports
* /usr/app/codecept/output : Chemin où seront déposés les screenshots

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