Giter VIP home page Giter VIP logo

xk6-yaml's Introduction

xk6-yaml

A k6 extension enables k6 tests to comfortably encode and decode YAML values.

The underlying implementation is https://github.com/go-yaml/yaml

Built for k6 using xk6.

Usage

Import an entire module's contents:

import * as YAML from "k6/x/yaml";

Import a single export from a module:

import { parse } from "k6/x/yaml";

API

Functions:

For complete API documentation click here!

Build

To build a k6 binary with this extension, first ensure you have the prerequisites:

Then:

  1. Install xk6:
$ go install go.k6.io/xk6/cmd/xk6@latest
  1. Build the binary:
$ xk6 build --with github.com/szkiba/xk6-yaml@latest

xk6-yaml's People

Contributors

mstoykov avatar szkiba avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mstoykov

xk6-yaml's Issues

package for type definitions

I see you have typescript definitions, but I haven't found a way to install them other than directly from this repo. Are they published anywhere? If not, it would be helpful to make that available. For now I'll copy the .d.ts to my code and put the proper namespacing in there.

unknown module Error

I am getting an error while running a k6 script which attempts to import module k6/x/yaml. I am running the below command to build the k6 binary with xk6.

xk6 build --with github.com/szkiba/xk6-yaml@latest

The binary is building successfully.

I am attempting to run my script (which works without import { parse } from "k6/x/yaml";) via the following command:

k6 run performance/policy_k6.js

And I am running into the below error:

ERRO[0000] unknown module: k6/x/yaml
	at go.k6.io/k6/js.(*InitContext).Require-fm (native)
	at file:///Users/tylerpospisil/projects/system-tests/performance/policy_k6.js:4:0(43)  hint="script exception"

OS: macOS Big Sur (11.3.1)
Go version: go version go1.18.1 darwin/amd64

Any help would be greatly appreciated! Thanks in advance.

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.