Coder Social home page Coder Social logo

qa-node-typescript-backend's Introduction

TypeScript Node npm MongoDB Jest eslint GitHubActions CodeClimate


Release CI - Test

Requirements Coverage

A good point is calculate Requirements coverage, if you define all use cases on test controllers (INT or E2E) you can calculate if your test are passing throw all logic (As in UNIT tests with code climate but with INT or e2e tests as well).

Use cases coverage

PETSTORE NODEJS TYPESCRIPT

This project is a little template that how to make the diferent testing layers in node backend.

Quality there are not only on the test, the processes are important, on the following link you can se a litle list of basic checks:

  • Code coverage with code climate and jest
  • Branch protection
    • PR reviews are mandatories with template (Defined on Github project)
    • Husky pre hooks, run linter on pre-commit hook
  • Run test on Github actions CI - Release Workflow
  • Custom .eslintrc.json configuration for preserve the code quality

Prerequisites

Docker Desktop installed and Node 14 or higher

API testing project

You should do the following steps:

On Terminal into project path:

> npm i
> npm run test:unit
> npm run test:contract:consumer
> npm run test:contract:provider
> npm run test:int
> npm run test:specification

CI Checks

To simulate the PR review pipeline, I've changed the webhook event for master branch push. Alt text

Github tools

  • Github actions for automating the release
  • Pull request tempplate (with all checks)

A list of test cases proposed for automation:

  • You can see all test cases into the reports folder, you just need to open the .html file.

A short explanation of the provided solution.

  • I've use Typescript because is an oriented and typed language with an easy way to build, configure and launch whatever thing you want to do.
  • I use Jest as test runner because is a delightful Testing Framework with a focus on simplicity.

The reports are located on reports folder into api project.

Artifacts

The Artifacts are on workflow action section.

https://github.com/ferraobox/qa-node-typescript-backend/actions/

you can check them opening the specific run.

qa-node-typescript-backend's People

Contributors

ferraobox avatar

Stargazers

Roman avatar  avatar  avatar  avatar Ruben Miguel Corcoba avatar David Benlloch avatar

Watchers

David Benlloch avatar  avatar  avatar

Forkers

avall

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.