Skip to content

restqa/restqa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RestQA logo

RestQA

Test Driven Happiness

Making Backend engineer happy by applying world class developer experience through Microservice Testing

npm package node compatility github action build Docker build discord chat

πŸ“– Documentation

Still under development... The release 1.0.0 is coming soon, Feel free to contribute!

πŸ˜ƒ Why Test Driven Happiness?

Within our DEV team while working with microservice, we realized a few thing:

  • WE HATE Writting Local Test
  • WE HATE Reviewing long unreadable Local Test full of mocks
  • WE HATE Maintaining the Integration Test
  • WE HATE Maintaining the Performance Test
  • WE HATE Maintaining the API specification
  • WE HATE Maintaining the postman collection
  • WE HATE Maintaining the HTTP Mocks
  • WE HATE Rewrite the test while changing the microservice technology

This is why we decided to challenge ourself on how to transform this frustration into a positive initative. RestQA was build with a simple goal: Driving the happiness of the DEV team through testing.

Run one command and get everything that you need to enjoy maintaining your microservice.

Synthax

Gherkin Based but KEEP CALM It aint's BDD!

Step definition

The RestQA Community maintains the step definitions! YOU focus on writting scenarios WE taking care of everything else πŸ€—

Screenshot

πŸ‘‰ Access to our online demo

Screenshot

Benefits

  • No Gherkin step to maintain (50+ steps out of the box)
  • Gherkin step maintain by the community
  • Test Ready in a minute
  • Outside in testing: Code refactoring friendly
  • Code Review friendly
  • Test driven development friendly
  • Mock ready in a minute
  • Community driven

⭐️ Features

  • 🌈 Local API test as Single source of truth
  • πŸ’¬ Write local API test using ordinary language
  • 🚦 Reuse your local API test to run the integration test
  • 🎯 Get code coverage from your local tests
  • 🏎 Generate Performace Test scenario compatible with your favorite Performance testing tool
  • πŸ“š Generate an up to date API specification from the test results
  • πŸ‘©β€πŸš€ Generate an up to date postman collection
  • πŸ• Instant result
  • πŸ‘‘ Programming language Agnostic
  • πŸ‘©β€πŸ’» Community Driven

πŸ•΅οΈ Under the scene

Only one command to run and everything else is taking care of:

%%{init: {'theme': 'forest' } }%%
stateDiagram-v2
    direction LR
    state "npm test" as cmd
    state "RestQA" as restqa
    state "run tests" as runner
    state "Test report" as formatter
    state "Microservice" as mc
    state "External dependencies (container)" as extenal
    state "3rd party mock" as mock
    state "console output" as console

    [*] --> cmd
    cmd --> restqa
    state restqa {
      direction LR
      
      runner --> mc
      mc --> runner
      mc --> extenal
      extenal --> mc
     
      state mc {
        direction LR
        [*] --> running
        running --> [*]
      }

      state extenal {
        direction LR
        [*] --> mock
        mock --> [*]
      }
      mc --> result
      result --> formatter
      result --> console
    }

    restqa --> [*]

🎬 Demo

demo-restqa.mp4

πŸ“¦ Install

Once you get nodeJs on your local machine run the command

npm install -D @restqa/restqa@next
yarn add @restqa/restqa@next -D

🎯 Usage

In you package.json add the script:

  "scripts": {
    "test": "restqa run",
    "happy": "restqa run --report"
  }

Run the command:

npm test

It will automatically initialize RestQA into your project and generate the initial test for you ^^

Then you can Write your Unit Test Using ordinary language:

Feature: GET /api/infos

Scenario: Get the list of informations
Given a request
When GET "/api/info"
Then status = 200
  And the body:
  """
{
  "message": "Hello World!"
}
  """

Then simply run the command to get full report:

npm run happy

🌈 Example

Take a look at the examples folder to see a basic setup.

🚧 Roadmap

πŸš€ Local Test
🏎 Performance Test
  • Artillery.io
  • K6 (Need contribution #291)
  • Jmeter (Need contribution #290)
  • Vegeta (Need contribution #289)

πŸ“š API Specification

  • OAS (swagger)
  • Raml

πŸ‘©β€πŸš€ API Collection

  • Postman

Big Love ❀️

RestQA Team would like to give a hug πŸ€— to thanks the excellent work of the following dependent open source project:

Contribution

See Contributing Guide.

Author

License

MIT License