Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Delete me #124

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -0,0 +1 @@
* @aegrey
2 changes: 1 addition & 1 deletion .github/workflows/build-docker.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.GH_TOKEN }}

- name: Build and push ghcr.io
id: build-and-push
Expand Down
22 changes: 4 additions & 18 deletions .github/workflows/build-on-tag.yml
Expand Up @@ -33,21 +33,7 @@ jobs:
- name: Bundle
run: yarn bundle

# - name: Publish to NPM
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: npm publish

# - name: Build docker image
# run: |
# echo '${{ secrets.DOCKERHUB_PASSWORD }}' | \
# docker login \
# --username ${{ secrets.DOCKERHUB_USERNAME }} \
# --password-stdin
# export tag=${GITHUB_REF/refs\/tags\/v/}
# docker build . -t loadimpact/postman-to-k6:$tag
# docker tag \
# loadimpact/postman-to-k6:$tag \
# loadimpact/postman-to-k6:latest
# docker push loadimpact/postman-to-k6:$tag
# docker push loadimpact/postman-to-k6:latest
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish
10 changes: 9 additions & 1 deletion CHANGELOG.md
Expand Up @@ -5,7 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/apideck-libraries/postman-to-k6/compare/v1.8.7...HEAD)
## [Unreleased](https://github.com/aegrey/postman-to-k6/compare/v1.8.7...HEAD)

## [1.9.0] - 2024-03-26

### Added

- Support for pm.response.headers.get() (#1)

---

## [1.8.10] - 2024-01-05

Expand Down
21 changes: 12 additions & 9 deletions README.md
@@ -1,22 +1,25 @@
<div align="center">
# POSTMAN TO k6

![postman-to-k6-cover](./assets/postman-to-k6-cover.png)

</div>
This project is a friendly fork of [apideck-libraries/postman-to-k6](https://github.com/apideck-libraries/postman-to-k6) from the original [grafana/postman-to-k6](https://github.com/grafana/postman-to-k6), where I will focus on **building out new features not currently supported** alongside maintenance.

# Postman-to-k6
#### Request a New Features
Open an issue with your feature request (must me something currently supported in postman) and I'll work on the requests with the most votes in order.

Also feel free to contribute or pass any suggestions along!


---

Converts a [Postman collection](https://www.getpostman.com/docs/collections) to a [k6 script](https://docs.k6.io/docs).

The postman-to-k6 converter utilizes your Postman collection and converts all the Postman requests, including tests,
variables, ... to K6 scripts that can be executed by K6 to run performance tests.

![Github badge](https://github.com/apideck-libraries/postman-to-k6/actions/workflows/build-on-tag.yml/badge.svg)
<a href="https://www.npmjs.com/package/@apideck/postman-to-k6" alt="Latest Stable Version">![npm](https://img.shields.io/npm/v/@apideck/postman-to-k6.svg)</a>
<a href="https://www.npmjs.com/package/@apideck/postman-to-k6" alt="Total Downloads">![npm](https://img.shields.io/npm/dw/@apideck/postman-to-k6.svg)</a>
![Github badge](https://github.com/aegrey/postman-to-k6/actions/workflows/build-on-tag.yml/badge.svg)
<a href="https://www.npmjs.com/package/@aegrey/postman-to-k6" alt="Latest Stable Version">![npm](https://img.shields.io/npm/v/@aegrey/postman-to-k6.svg)</a>
<a href="https://www.npmjs.com/package/@aegrey/postman-to-k6" alt="Total Downloads">![npm](https://img.shields.io/npm/dw/@aegrey/postman-to-k6.svg)</a>

This project is a friendly fork of the original [grafana/postman-to-k6](https://github.com/grafana/postman-to-k6)
converter, actively maintained and open for new contributions.

## Content

Expand Down
8 changes: 8 additions & 0 deletions aegrey-changes.md
@@ -0,0 +1,8 @@
# Changelog highlights - by aegrey

## Support for Response Headers

By adding support for the
Postman [Response Data](https://learning.postman.com/docs/writing-scripts/script-references/postman-sandbox-api-reference/#scripting-with-response-data)
has long been unsupported, despite it being a fairly straightforward change. v1.9.0 implements support for `pm.response.headers.get()`

2 changes: 1 addition & 1 deletion changes-since-1.5.0-release.md → apideck-changes.md
@@ -1,4 +1,4 @@
# Changelog highlights
# Changelog highlights - by apideck-libraries

As you might have noticed, the postman-to-k6 converter was rather inactive the last couple of months. With the help of the k6 team, the project will continue to be actively developed and maintained in a friendly fork => https://github.com/apideck-libraries/postman-to-k6.

Expand Down
9 changes: 6 additions & 3 deletions lib/shim/core.js
Expand Up @@ -461,12 +461,15 @@ const pm = Object.freeze({

/* Response information */
response: Object.freeze({
headers: Object.freeze({
get(name) {
const header = store.response.headers.cased[name];
return header ? header : null;
},
}),
get code() {
return store.response.code;
},
get headers() {
throw new Error('pm.response.headers not supported');
},
json() {
parseBodyJson();
const body = store.response.body;
Expand Down