New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mmisty/cypress-allure-adapter

Package Overview
Dependencies
Maintainers
1
Versions
302
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mmisty/cypress-allure-adapter

cypress allure adapter to generate allure results during tests execution

  • 0.2.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21K
decreased by-19.8%
Maintainers
1
Weekly downloads
 
Created
Source

Cypress-allure-adapter

This is allure adapter for cypress providing realtime results. It is useful when using Allure TestOps - so you can watch tests execution.

Installation

Install adapter by npm i -D @mmisty/cypress-allure-adapter

Setup:

  1. Update support: add allureAdapterSetup(); in your support/index.ts file (or e2e.ts file)

    import { allureAdapterSetup } from '@mmisty/cypress-allure-adapter';
    
    allureAdapterSetup();
    
  2. Update plugins: add configureAllureAdapterPlugins(on, config); into your plugins file:

    // cypress.config.ts
    import { configureAllureAdapterPlugins } from '@mmisty/cypress-allure-adapter/plugins';
    
    export default defineConfig({
      e2e: {
        setupNodeEvents(on, config) {
          configureAllureAdapterPlugins(on, config);
          
          return config;
        },
        // ...
      }
    });
    
  3. Update environment variables: in cypress.config.ts or in your env files:

    • allure => true - will enable reporting
    • allureResults => allure-results - path to allure-results
    • allureCleanResults => true - will remove allure results on cypress start
    • allureSkipCommands => wrapNoLog,sync - commands that will not be logged, separated with comma
    env: {
       allure: 'true',
       allureResults: 'allure-results',
       allureCleanResults: 'true',
       allureSkipCommands: 'wrapNoLog,sync', // separated comma
       //...
    }
    
  4. no need to setup types - should be done automatically

Advanced

If you are using Cypress action 'after:spec' in plugins you can use the following configuration to have video attached to tests:

// cypress.config.ts
import { configureAllureAdapterPlugins } from '@mmisty/cypress-allure-adapter/plugins';

export default defineConfig({
  e2e: {
    setupNodeEvents(on, config) {
      const reporter = configureAllureAdapterPlugins(on, config);
      
      on('after:spec', (spec, results) => {
        // your code in after spec
        reporter.afterSpec({ results });
      })
      
      return config;
    },
    // ...
  }
});

Allure Interface

todo

Scripts

scriptdescription
husky:installinstall precommit hooks
lintlint code
buildcompile typescript by tsconfig.build.json
testrun all jest tests

Troubleshooting

To see debug log run cypress with DEBUG env variable like: DEBUG=cypress-allure* npm run cy:open

Change log

0.0.2

Initial version

Keywords

FAQs

Package last updated on 10 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc