GithubHelp home page GithubHelp logo

hazel-ys-lin / serval-run Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 1.39 MB

An automated integration testing and document tool for developers and non-developers ๐Ÿง‘โ€๐Ÿ’ป Test your Server as Rapid as Serval ๐Ÿˆ

JavaScript 95.16% Shell 0.27% SCSS 0.71% HTML 0.57% Gherkin 3.28%
integration-testing mongodb nodejs queue-workers redis socket-io bdd gherkin pubsub

serval-run's Introduction

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: [email protected]
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: [email protected]
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: [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.