hazel-ys-lin / serval-run

An automated integration testing and document tool for developers and non-developers πŸ§‘β€πŸ’» Test your Server as Rapid as Serval 🐈

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ServelRun

serval-run_logo-2

ServelRun | Test Your Server as Rapid as Serval

An automated integration testing and document tool for developers and non-developers.

Test account

We now welcome everyone join testing our testing service!

email: prettyServal@gmail.com
password: 123456

Tech Stacks

JavaScript NodeJS Express

AWS MongoDB Redis

pug CodeMirror Socket.IO BootStrap FontAwesome

Table of Contents

Features

  • Running integration testing by 3 levels:
    • APIs' colleciton
    • Single API
    • Single scenario in an API
  • Compiling Gherkin to testable documents
  • Viewing real-time charts of testing results

Introduction

We need to write documents when developing.

We also need to write tests when developing.

How about testable documents, which combine these two important tasks and execute it in the meantime?

That's why ServelRun born.

Feature: Sign in
user system to make user sign in

  @signin
  Scenario Outline: user sign in
    Given I am an existing <provider> user
    And I have entered <email> in the form
    And I have entered <password> into the form
    When I press signin
    Then the result should be <status> on the screen

    Examples:
      | provider | email             | password      | status |
      | native   | serval@gmail.com  | Serval123     |    200 |
      | native   | serval@gmail.com  | Serval1234444 |    403 |
      | native   | serval@gmail.com  | Serval1234444 |    404 |
      | native   | admin@company.com | admin123      |    200 |

For example, this snippet of code (or text) can be compiled into specification datasheet for conducting tests.

  • Feature means what feature this snippet is going to test.
  • Scenario Outline means under this circumstance, all the steps of this test.
  • Examples indicates the data which will be sent to the target server.

That's how it works. This is the magic of Gherkin and BDD. ServalRun utilized the power of this language, turning single test under single scenario to integration testing.

Start your test journey now by creating an account.

Happy testing!

Technologies

  • Derived from BDD (Behavior-Driven Development) concept, and provided an integration testing tool for non-developers
  • Organized test creation and execution simultaneously with Redis queue job
  • Designed multi-level tests and database schema with MongoDB Atlas
  • Constructed test CRUD operations with RESTful API pattern
  • Assured test data atomicity in the database by implementing transaction operation
  • Executed integration testing with axios

Architecture

Table Schema

  • ServalRun Used MongoDB to suffice multiple levels requirements of storing and structuring testing data
  • By following MongoDB Best practice, we tried to meet the suggestion of embedding and referencing data together 1031-table-schema-1

Usage/Examples

Explanation of Test Levels

  • In ServalRun, you may choose different test level to test your server.
  • The levels include "collection", "API", and "scenario".
    • Project may include multiple collections.
    • Collection may include multiple APIs.
    • API may include multiple scenarios.
    • You may create scenarios by writing Gherkin.

1017-test-level-1

  • For example, under "user" collection, "sign up", "sign in" and "profile" may all be included.

    • If there is a project named "STYLiSH", which is an e-commerce website:

      1017-test-level-2
  • So the levels may be built as a pyramid:

    1017-test-level-3

How To Use

  1. Sign In
  • Here is the test account you may get started without registering a new one:
email: prettyServal@gmail.com
password: 123456

index&signin

  1. View Project

project

  1. Set up environment
  • Create environment to use different domain name or IP address to request your API.
  • When setting up new environment, you may add develop stage such as "develop", "staging", or "production", etc.

environment

  1. Create collection
  • Collection may include multiple APIs.
    • For example, under "user" collection, "sign up", "sign in" and "profile" may all be included.
  • What's better is that ServalRun can run collection test (which means run bulk of APIs) by one click!

collection

  1. The environments and the collections are both editable
  • Click on the pencil icon to modify the environments and collections whenever you want.

edit

  1. Create API
  • When creating API to test, users need to provide informations as below:
    • API endpoint
    • HTTP method
    • Severity of the API

api

  1. Create scenario
  • Write your first testable document with Gherkin!
    • There is already a short snippet of gherkin example document in the creating scenario form. Feel free to test it!

scenario

  1. Run tests in scenario/API/collection level

run-test

  1. Check the reports

report

reportdetail

Demo

Demo Video (Mandarin)

FAQ

Does ServalRun support other testing language? I have never been using Gherkin to conduct testing before.

We feel sorry to inform that ServalRun only support Gherkin to generate testing document by now.

However, supporting other testing language is on our to-do list.

Author

Hazel Lin

Or email me at: hazel.ys.lin@gmail.com

About

An automated integration testing and document tool for developers and non-developers πŸ§‘β€πŸ’» Test your Server as Rapid as Serval 🐈


Languages

Language:JavaScript 95.2%Language:Gherkin 3.3%Language:SCSS 0.7%Language:HTML 0.6%Language:Shell 0.3%