Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cucumber/messages

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cucumber/messages

JSON schema-based messages for Cucumber's inter-process communication

  • 27.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.1M
decreased by-15.02%
Maintainers
2
Weekly downloads
 
Created

What is @cucumber/messages?

The @cucumber/messages package is designed to provide a protocol for communication between different components of the Cucumber testing tool. It defines a set of message formats that can be used for representing test cases, test results, and other information in a standardized way. This facilitates interoperability between different parts of the Cucumber ecosystem, such as between the Cucumber framework itself and various plugins or integrations.

What are @cucumber/messages's main functionalities?

Serialization and Deserialization of Messages

This feature allows for the serialization and deserialization of Cucumber messages. It's useful for transmitting test results over a network or storing them in a file. The code sample demonstrates how to create an Envelope message, serialize it to a binary format, and then deserialize it back to a message object.

"use strict";
const { messages } = require('@cucumber/messages');
const { Envelope } = messages;
const envelope = Envelope.fromObject({ testStepFinished: { testStepResult: { status: 'PASSED' } } });
const serialized = Envelope.encode(envelope).finish();
const deserialized = Envelope.decode(serialized);

Creating and Working with Messages

This feature involves creating and manipulating various types of messages defined by the package, such as test cases, test steps, and results. The code sample shows how to create a TestCase message with specific properties.

"use strict";
const { messages } = require('@cucumber/messages');
const { TestCase } = messages;
const testCase = TestCase.create({ id: '1', pickleId: '2' });
console.log(testCase);

Other packages similar to @cucumber/messages

FAQs

Package last updated on 15 Nov 2024

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