# Exporting as Jest Project (CI-friendly)

Project suites can be exported as [Jest test project](https://jestjs.io/) and be ran in command line by, for example, Continuous Integration server.&#x20;

Press **Ctrl+Shift-E** (⌘⇧E) or click on **File/Export Project as...** menu item:

![Export Project as...](https://3461068122-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-zzeS2hB7DF04J%2F-LuIBYFi-rHiGpXnUF5q%2F-LuIFVt4ThCtvMvhwGpC%2Fexport-menu.png?alt=media\&token=55d546b8-31bf-4173-b77a-fb3d5adc69e6)

**Export Project** modal window shows up.&#x20;

![Export project modal](https://3461068122-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-zzeS2hB7DF04J%2F-LuIFqj6Vou_pgk8jLWK%2F-LuIGM_-KS-FcLyMeW9j%2Fexport1.png?alt=media\&token=7567733c-4ead-472d-884c-4060cf221430)

It is quite  similar to [Run Tests ](https://docs.puppetry.app/v/3.0.0/running-tests)window. Similarly we can choose a target environment (see also [Template variables](https://docs.puppetry.app/v/3.0.0/template)) and set up **Browser options**. What it's new we have to specify the destination folder for the exported project.

After exporting we can jump to the given export directory and install npm dependencies:

```bash
npm install
```

then we run the tests:

```bash
npm test
```

We are expected to get output like that:

![](https://3461068122-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-zzeS2hB7DF04J%2F-M0X3KH8Ac5_WXMPJgGZ%2F-M0XPaWnYSraNeli9VH7%2Fcli-report.png?alt=media\&token=ccc47641-cbb5-47cf-9f8e-f2f420087239)

## View Test Reports with Allure

If you have [Allure](http://allure.qatools.ru) installed on your system you can also run&#x20;

```bash
npm run report
```

It will load the generated test report in Allure browser

![Allure test report](https://3461068122-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-zzeS2hB7DF04J%2F-LuIBYFi-rHiGpXnUF5q%2F-LuIBo-boyhWGyvUt8ek%2Fallure.png?alt=media\&token=1e80745e-cc48-4aeb-bbe4-9bf8ab6a0d9c)

## Configuring Puppeteer

You can change the configuration set while exporting in `puppeteer.config.json`

* `incognito` - when true the test will run in incognito window
* `puppeteer.launch` - options to pass to [puppeteer.launch](https://pptr.dev/#?product=Puppeteer\&version=v2.1.0\&show=api-puppeteerlaunchoptions)
* `puppeteer.connect` - options to pass to [puppeteer.connect](https://pptr.dev/#?product=Puppeteer\&version=v2.1.0\&show=api-puppeteerconnectoptions)

#### Example:

```
{
  "incognito": true,
  "puppeteer.connect": {
    "browserWSEndpoint": null,
    "ignoreHTTPSErrors": true
  },
  "puppeteer.launch": {
    "product": "chrome",
    "headless": false,
    "devtools": false,
    "ignoreHTTPSErrors": true,
    "args": [
      "--start-maximized",
      "--ignore-certificate-errors"
    ],
    "executablePath": "/usr/bin/google-chrome"
  }
}
```
