Deprecated as of 10.7.0. highlight(lang, code, ...args) has been deprecated. Deprecated as of 10.7.0. Please use highlight(code, options) instead. https://github.com/highlightjs/highlight.js/issues/2277

Step 0 - Choose a tutorial setup

Welcome to this tutorial on black-box API testing with webspicy!

There are three main ways to run the tutorial: Gitpod, docker, or by cloning our repository. Whatever option you choose, you will need to end up with a shell where the following commands work:

curl http://127.0.0.1:3000/version
webspicy --help

Use gitpod

We provide a Gitpod development environment that runs inside your browser. You don't have to install anything, just click the link below:

The tutorial instructions are fully integrated in the Gitpod experience:

Run tutorial on Gitpod

Use our docker image

We provide a Docker image that automatically clones our github repository on your computer and give you a shell to execute webspicy commands on an existing (broken) backend written in node.js.

docker pull enspirit/yourbackendisbroken
mkdir -p yourbackendisbroken
docker run -it \
  -p 3000:3000 \
  -p 8080:8080 \
  -v $PWD/yourbackendisbroken:/ybib \
  --user ${UID}:${GID} \
  -e YBIB_PWD=${PWD}/yourbackendisbroken \
  enspirit/yourbackendisbroken

This command will create a yourbackendisbroken folder in which you will find the code used in this tutorial.

After running the command, you should be greeted by webspicy.

Clone the github repository

The third option is to clone the tutorial repository on github. It requires a bit more work, but is probably closer to what you would need to test your own backend on a developer machine.

First clone the repository from github then install nodejs (for the backend example) and ruby (for webspicy itself):

git clone --branch nodejs-tuto https://github.com/enspirit/yourbackendisbroken.dev.git
cd yourbackendisbroken.dev
apt-get install nodejs ruby

Install the webspicy ruby gem:

gem install webspicy
webspicy --help

Start the todo API in one terminal to keep an eye on the logs. The API will automatically restart if you change the source code:

cd todo-api
npm install
npm start

You are ready to start the tutorial, open another terminal and run:

cd yourbackendisbroken.dev
bin/start

This second terminal will help you progress through the tutorial steps of this website.