# taler-harness

This package implements the `taler-harness` CLI tool.  It contains integration
tests for GNU Taler and GNU anastasis, as well as various helpers for managing
deployments of GNU Taler.

## Debugging

To get more actionable stack traces, enable source maps for node:

```
export NODE_OPTIONS=--enable-source-maps
```

## Headless Web Integration test

1) First you need the browsers that you are going to use to test

Puppeteer scripts can be used to download

```
npx @puppeteer/browsers install firefox@stable
npx @puppeteer/browsers install chrome@stable

npx @puppeteer/browsers install firefox@beta
npx @puppeteer/browsers install chrome@beta

npx @puppeteer/browsers install firefox@144
npx @puppeteer/browsers install chrome@144
```

Or can be download manually from

Firefox: https://archive.mozilla.org/pub/firefox/
Chrome: https://googlechromelabs.github.io/chrome-for-testing/

2) Then you need the respective webdriver binaries

Firefox: https://github.com/mozilla/geckodriver/
Chrome: https://googlechromelabs.github.io/chrome-for-testing/

3) The integration tests will expect the driver+browser available on PATH

If there are multiple binaries on the system the BROWSER_PATH environment variable
can be used to narrow the search path. This environment will replace the PATH 
environment for the driver so it will limit the scope of 
search for the driver and the browser.

For example 
```
export BROWSER_PATH=/opt/browsers/chromedriver/linux-145.0.7632.46/chromedriver-linux64/:/opt/browsers/chrome/linux-145.0.7632.45/chrome-linux64/
taler-harness run-integrationtests web-merchant-login
```

The default browser is "chrome" unless the env variable DEFAULT_BROWSER is set to either "firefox" or "chrome".

