GithubHelp home page GithubHelp logo

isabella232 / reportportal-testcafe-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redislabs/reportportal-testcafe-plugin

0.0 0.0 0.0 1.43 MB

TestCafe reporter built to integrate with the Report Portal services.

License: MIT License

JavaScript 90.46% TypeScript 9.54%

reportportal-testcafe-plugin's Introduction

This is the reportportal-plugin reporter plugin for TestCafe.

Integrate with Reporter in your project

  1. Needs npm version>=6.9.0 (sudo npm install -g [email protected])

  2. Add the below to your external project: In package.json under "dependencies" add:

    "testcafe-reporter-reportportal-plugin": "npm:@redislabs/testcafe-reporter-reportportal-plugin@^0.1.1",
    
  3. In .npmrc add:

    @redislabs:registry=https://npm.pkg.github.com/redislabs
    

    Install the reporter via NPM

npm install @redislabs/[email protected]

Use the reporter in your TestCafe test run

When you run tests from the command line, specify the reporter name by using the --reporter option:

testcafe chrome 'path/to/test/file.js' --reporter reportportal-plugin

OR:

testcafe chrome 'path/to/test/file.js' --reporter=reportportal-plugin

When you use API, pass the reporter name to the reporter() method:

testCafe
    .createRunner()
    .src('path/to/test/file.js')
    .browsers('chrome')
    .reporter('reportportal-plugin') // <-
    .run();

Map of existing CLI Arguments:

Required Argument Description Example
Yes rdomain The domain of the report portal. https://{domain}/ --rdomain=reports.pl.portal.com
Yes rtoken The token to auth report portal with. Taken from the 'Profile' of your user. --rtoken=gfkbv5994350mg
Yes rlaunch The name of your launch. Required (Unless replaced by rlaunch-id argument). --rlaunch=my-launch
Yes rproject The name of your project. --rproject=my-project
No rlaunch-id The ID of an existing launch, can replace the rlaunch parameter. --rlaunch-id=fjvkdnvjgnf
No rsuite An optional suite name, adding a suite will put all tests under the suite instead of directly under the launch. --rsuite=my-suite-name
No rprotocol An optional ability to override the protocol of the API protocol. {protocol}://{domain}/. --rprotocol=http
No disable-live-reporting An optional ability to disable the live reporting --disable-live-reporting

Devloping the plugin?

in order to run tests in this plugin environment , in your cli run: (your reportportal parameters are listed under your reportportal profile)

npm run test ./tests/test.e2e.ts -- --rprotocol=https --rlaunch=launchName --rsuite=suitName --rdomain=YourReportportalDomain --rtoken=yourReportportalToken --rproject=YourReportportalProject

or

 testcafe chrome:headless tests/test.e2e.ts --rprotocol=https --rsuite=suitName --rdomain=YourReportportalDomain --rtoken=yourReportportalToken --rproject=YourReportportalProject --rlaunch=launchName --reporter reportportal-plugin

Adding a new appender

  1. extend LogAppender and implement its methods.
  2. in index.js: await this.logManager.addAppenders( { type: ConsoleLogAppender }, { type: ReportPortalAppender } );

Interested in contributing?

Please read our contributing guidelines here

Author

Redis https://github.com/RedisLabs/reportportal-testcafe-plugin/ forked from Dani Tseitlin (https://github.com/danitseitlin)

reportportal-testcafe-plugin's People

Contributors

danitseitlin avatar talamirredislabs avatar mendybr avatar danieltseitlin avatar dependabot[bot] avatar yoavws avatar michaelkondratiev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.