Skip to content

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Specmatic Arazzo Demo

Specmatic Arazzo is a NO-CODE workflow testing tool that allows users to efficiently author, validate, test, and mock workflows, leveraging Arazzo API Specifications

🎬 Video Walkthrough

Visual API Workflow Mocking and Testing with Specmatic and Arazzo API Specifications

This video uses this very same demo project repo to showcases how to author a workflow specification using Specmatic Arazzo via Specmatic Studio interactively with a drag‑and‑drop interface, validate the workflow, and test it against two microservices Order API and the Location API, We will also demonstrate how to mock the workflow so that the Frontend can consume it independently from these microservices without a single line of code.

You can also use this repo to follow along with the video and learn about the various capabilities. Please do read through the detailed instructions below to know more.

🏗️ Application Architecture

This project includes below services:

🛠️ Prerequisites

🔧 Setup

Clone the Specmatic Arazzo UI Sample repository:

git clone https://github.com/specmatic/specmatic-arazzo-ui-sample

Launch the Extension:

Launch it within the Specmatic Arazzo UI Sample project directory as shown in the image below

Specmatic Docker Extension

📝 Flow

Diagram

Running the Project

Execute run.py to get both Front-end and Back-end running. Please choose appropriate commands below as per your system setup.

For Windows:

python run.py

For Unix:

python3 run.py

What does run.py do?

  1. In the backend directory:

    1. Creates a venv virtual environment.
    2. Installs Python dependencies from requirements.txt.
    3. Starts both the order_api and location_api microservices.
    4. Populates the database with dummy data.
  2. In the frontend directory:

    1. Installs the frontend dependencies specified in package.json.
    2. Launches the frontend application in development mode using Vite.
    3. Opens the frontend in a web browser.

Verify the setup

  1. In the UI please use username as test@specmatic.io and password as specmatic. This should show you a couple of products.
  2. Now you can log out and try again with username as random@specmatic.io and password as user. This shows you an empty list.

Input for backend workflow testing

{
    "PlaceOrder": {
        "DEFAULT": {
            "GetUserDetails": {
                "email": "test@specmatic.io",
                "password": "specmatic",
                "internalToken": "API-TOKEN"
            }
        },
        "RetrieveProducts.IsArrayEmpty": {
            "$failureMessage": "Expected not to find any products for random@specmatic.io, as they belong to B Zone",
            "GetUserDetails": {
                "email": "random@specmatic.io",
                "password": "user"
            }
        }
    }
}

Running the frontend manually

cd frontend
npm install
npm run dev

Running the backend manually

  • On Unix machines:
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 run.py
  • On Windows:
cd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python run.py

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages