diff --git a/package.json b/package.json index 5c4ced347..e6ec7daa6 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ "packages/bruno-js", "packages/bruno-lang", "packages/bruno-tests", - "packages/bruno-testbench", "packages/bruno-toml", "packages/bruno-graphql-docs" ], diff --git a/packages/bruno-testbench/.gitignore b/packages/bruno-testbench/.gitignore deleted file mode 100644 index 0862435ad..000000000 --- a/packages/bruno-testbench/.gitignore +++ /dev/null @@ -1,107 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ -pnpm-lock.yaml -yarn.lock -package-lock.json - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port diff --git a/packages/bruno-testbench/config/default.yml b/packages/bruno-testbench/config/default.yml deleted file mode 100644 index 2d234ba44..000000000 --- a/packages/bruno-testbench/config/default.yml +++ /dev/null @@ -1 +0,0 @@ -port: 6000 \ No newline at end of file diff --git a/packages/bruno-testbench/package.json b/packages/bruno-testbench/package.json deleted file mode 100644 index d1e7bb722..000000000 --- a/packages/bruno-testbench/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "@usebruno/testbench", - "version": "1.0.0", - "description": "", - "main": "src/index.js", - "scripts": { - "start": "node .", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/usebruno/bruno" - }, - "keywords": [], - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/usebruno/bruno/issues" - }, - "homepage": "https://github.com/usebruno/bruno", - "dependencies": { - "body-parser": "^1.20.0", - "config": "^3.3.8", - "cors": "^2.8.5", - "express": "^4.18.1", - "express-xml-bodyparser": "^0.3.0", - "js-yaml": "^4.1.0", - "lodash": "^4.17.21", - "multer": "^1.4.5-lts.1" - } -} diff --git a/packages/bruno-testbench/readme.md b/packages/bruno-testbench/readme.md deleted file mode 100644 index abef8519b..000000000 --- a/packages/bruno-testbench/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -# bruno-testbench - -A simple expressjs server that I use to test bruno. - -### License -[MIT](LICENSE) \ No newline at end of file diff --git a/packages/bruno-testbench/src/index.js b/packages/bruno-testbench/src/index.js deleted file mode 100644 index ecc8870f5..000000000 --- a/packages/bruno-testbench/src/index.js +++ /dev/null @@ -1,52 +0,0 @@ -const express = require('express'); -const bodyParser = require('body-parser'); -const xmlparser = require('express-xml-bodyparser'); -const cors = require('cors'); -const config = require('config'); -const multer = require('multer'); - -const app = new express(); -const port = config.port; -const upload = multer(); - -app.use(cors()); -app.use(xmlparser()); -app.use(bodyParser.text()); -app.use(bodyParser.json()); -app.use(bodyParser.urlencoded({ extended: true })); - -app.get('/ping', function (req, res) { - return res.send('pong'); -}); - -app.get('/headers', function (req, res) { - return res.json(req.headers); -}); - -app.get('/query', function (req, res) { - return res.json(req.query); -}); - -app.get('/echo/json', function (req, res) { - return res.json({ ping: 'pong' }); -}); - -app.post('/echo/json', function (req, res) { - return res.json(req.body); -}); - -app.post('/echo/text', function (req, res) { - return res.send(req.body); -}); - -app.post('/echo/xml', function (req, res) { - return res.send(req.body); -}); - -app.post('/echo/multipartForm', upload.none(), function (req, res) { - return res.json(req.body); -}); - -app.listen(port, function () { - console.log(`Testbench started on port: ${port}`); -}); diff --git a/packages/bruno-tests/readme.md b/packages/bruno-tests/readme.md index 0b09a96b2..db6ecf233 100644 --- a/packages/bruno-tests/readme.md +++ b/packages/bruno-tests/readme.md @@ -20,7 +20,11 @@ npm start ```bash cd collection +# run collection against local server node ../../bruno-cli/bin/bru.js run --env Local --output junit.xml --format junit + +# run collection against prod server hosted at https://testbench.usebruno.com +node ../../bruno-cli/bin/bru.js run --env Prod --output junit.xml --format junit ``` ### License