1.4.0 • Published 12 days ago

@testomatio/reporter v1.4.0

Weekly downloads
785
License
MIT
Repository
github
Last release
12 days ago

@testomatio/reporter

Send test run reports to your testomat.io project. Get the API key from testomat.

You can refer sample tests from example folder of this repo. This is a basic example. If you need something full fledged you can refer this example repo

Add @testomatio/reporter package to your project:

npm i @testomatio/reporter --save

For testcafe use testcafe reporter

npm i testcafe-reporter-testomatio

CodeceptJS

Make sure you load all your tests using check-test.

Add plugin to codecept conf

plugins: {
  testomatio: {
    enabled: true,
    require: '@testomatio/reporter/lib/adapter/codecept',
    apiKey: process.env.API_KEY || 'API_KEY', // pass in api key via config or env variable
  }
}

Note: Get the API_KEY from your testomat console

Normal run : Run the test with codecept command npx codeceptjs run

Parallel run

If tests run parallel, like workers in codeceptJS use start-test-run command to get proper reports

usage:

TESTOMATIO=<API_KEY> npx start-test-run -c 'npx codeceptjs run-workers 2'

-c : Actual test run command

Mocha

Load the test using using check-test if not done already. Get the test id from testomat account and add it to your mocha test like in this example

run the following command from you project folder

mocha --reporter ./node_modules/testomat-reporter/lib/adapter/mocha.js  --reporter-options apiKey=API_KEY

Jest

Load the test using using check-test . Add the test id to your tests like in this example

Add the following line to jest.config.js

reporters: ['default', ['../../lib/adapter/jest.js', { apiKey: API_KEY }]],

Run your tests.

Cucumber

Load you test using check-cucumber

Run cucumber test with this formatter and API key in environment in TESTOMATIO

TESTOMATIO=api_key ./node_modules/.bin/cucumber-js --format ./node_modules/@testomatio/reporter/lib/adapter/cucumber.js

TestCafe

Load the test using using check-test .

run the following command from you project folder

TESTOMATIO={apiKey} npx testcafe chrome -r testomatio

Protractor

Load the test using using check-test .

Add the following line to conf.js

const JasmineReporter = require("@testomatio/reporter/lib/adapter/jasmine");

exports.config = {
  onPrepare: () => {
    jasmine
      .getEnv()
      .addReporter(new JasmineReporter({ apiKey: process.env.TESTOMATIO }));
  },
};

run the following command from you project folder

TESTOMATIO={apiKey}  npx @testomatio/reporter@latest -c 'npx protractor conf.js'

Advanced Usage

Naming Report and Adding report to group

Give a title to your reports by passing it as environment variable to TESTOMATIO_TITLE.

Create/Add run to group by providing TESTOMATIO_RUNGROUP_TITLE,

For example

TESTOMATIO={apiKey} TESTOMATIO_TITLE="title for the report" TESTOMATIO_RUNGROUP_TITLE="Build ${1}" <actual run command>

Store screenshots in third party storage

  1. S3 - Provide following configuration from S3 bucket S3_REGION - Region your bucket lies. S3_BUCKET - Bucket name. S3_ACCESS_KEY_ID - Access key. S3_SECRET_ACCESS_KEY - Secret.

If you are credential files, you can leave last 2 variables

Development

To change host of endpoint for receiving data, and set it to other than app.testomat.io use TESTOMATIO_URL environment variable:

TESTOMATIO_URL=http://127.0.0.1:3000
1.4.0

18 days ago

1.3.0

2 months ago

1.2.2

2 months ago

1.2.1

2 months ago

1.2.0

3 months ago

1.1.1

3 months ago

1.1.0-rc.2

4 months ago

1.1.0

4 months ago

1.1.0-rc.1

4 months ago

1.4.1-beta-1

5 months ago

1.0.18-beta.1

5 months ago

1.1.0-beta-3

6 months ago

1.1.0-beta-2

6 months ago

1.0.1-6.1

6 months ago

1.3.4-beta

9 months ago

1.0.15-beta

7 months ago

1.0.12-beta.4

8 months ago

1.0.12-beta.3

8 months ago

1.3.3-beta

9 months ago

1.0.12-beta.2

8 months ago

1.0.12-beta.1

8 months ago

1.2.3-beta

10 months ago

1.0.14-beta

7 months ago

1.3.1-beta

9 months ago

1.3.1-beta.5

9 months ago

1.3.1-beta.4

9 months ago

1.3.1-beta.3

9 months ago

1.3.1-beta.2

9 months ago

1.2.0-beta-2

6 months ago

1.2.0-beta-1

6 months ago

1.2.0-beta-4

6 months ago

1.3.0-beta

9 months ago

1.2.0-beta-3

6 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.17

6 months ago

1.0.16

6 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.3.5-beta

9 months ago

1.3.2-beta

9 months ago

1.0.9-beta.1

9 months ago

1.0.9-beta.2

9 months ago

1.2.4-beta

10 months ago

1.0.15-beta.2

7 months ago

1.0.15-beta.1

7 months ago

1.3.6-beta

9 months ago

1.0.6-beta.1

9 months ago

1.0.11

8 months ago

1.0.10

8 months ago

1.0.15

7 months ago

1.0.14

7 months ago

1.0.13

7 months ago

1.0.12

8 months ago

1.2.2-beta

11 months ago

1.2.1-beta

11 months ago

1.1.0-beta

11 months ago

1.2.0-beta

11 months ago

1.0.0

11 months ago

1.0.0-beta.2

11 months ago

1.0.0-beta.3

11 months ago

1.0.0-beta.4

11 months ago

1.0.0-beta.1

11 months ago

0.8.0-beta.32

12 months ago

0.8.1

12 months ago

0.8.3

12 months ago

0.8.2-beta.1

12 months ago

0.8.0-beta.31

1 year ago

0.8.0-beta.30

1 year ago

0.8.0-beta.20

1 year ago

0.7.6

1 year ago

0.7.6-beta.1

1 year ago

0.7.5

1 year ago

0.7.5-beta.1

1 year ago

0.7.4

1 year ago

0.8.0-beta.14

1 year ago

0.8.0-beta.15

1 year ago

0.8.0-beta.10

1 year ago

0.8.0-beta.11

1 year ago

0.8.0-beta.12

1 year ago

0.7.2-beta.1

1 year ago

0.7.2

1 year ago

0.7.1

1 year ago

0.7.3

1 year ago

0.7.0

2 years ago

0.7.0-beta.1

2 years ago

0.7.0-beta.2

2 years ago

0.7.0-beta.3

2 years ago

0.7.0-beta

2 years ago

0.7.0-beta.4

2 years ago

0.7.0-beta.5

2 years ago

0.7.0-beta.6

2 years ago

0.7.0-beta.7

2 years ago

0.7.3-beta.1

1 year ago

0.8.0-beta.7

1 year ago

0.8.0-beta.8

1 year ago

0.8.0-beta.5

1 year ago

0.8.0-beta.6

1 year ago

0.8.0-beta.9

1 year ago

0.8.0-beta.3

1 year ago

0.8.0-beta.4

1 year ago

0.8.0-beta.1

1 year ago

0.8.0-beta.2

1 year ago

0.6.7

2 years ago

0.6.9

2 years ago

0.6.8

2 years ago

0.6.8-beta.1

2 years ago

0.6.10

2 years ago

0.6.7-beta.2

2 years ago

0.6.7-beta.1

2 years ago

0.6.6

2 years ago

0.6.0-beta.1

2 years ago

0.6.3

2 years ago

0.6.2

2 years ago

0.6.5

2 years ago

0.6.4

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.10

2 years ago

0.5.8

2 years ago

0.5.9

2 years ago

0.5.4

2 years ago

0.5.3

2 years ago

0.5.6

2 years ago

0.5.5

2 years ago

0.5.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.7

2 years ago

0.5.4-beta.1

2 years ago

0.5.0-beta.1

2 years ago

0.5.0-beta.3

2 years ago

0.5.0-beta.2

2 years ago

0.3.16

2 years ago

0.4.5

2 years ago

0.4.4

2 years ago

0.4.6

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.3.15

3 years ago

0.3.14

3 years ago

0.3.13

3 years ago

0.3.12

3 years ago

0.3.11

3 years ago

0.3.11-beta.2

3 years ago

0.3.11-beta

3 years ago

0.3.10-beta.9

3 years ago

0.3.10

3 years ago

0.3.10-beta.7

3 years ago

0.3.10-beta.8

3 years ago

0.3.10-beta.5

3 years ago

0.3.10-beta.6

3 years ago

0.3.10-beta.3

3 years ago

0.3.10-beta.4

3 years ago

0.3.9

3 years ago

0.3.10-beta

3 years ago

0.3.10-beta.2

3 years ago

0.3.8

3 years ago

0.3.6

3 years ago

0.3.7

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.2-beta

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.3.0-beta.4

3 years ago

0.3.0-beta.3

3 years ago

0.3.0-beta.2

3 years ago

0.3.0-beta.1

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.17

3 years ago

0.1.16

4 years ago

0.1.15

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.4

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.3

4 years ago

0.1.0

4 years ago