Skip to content

Dataprovider Service is built on Javascript and based on faker.js to provide dummy data in JSON and CSV format for test automation through the REST API.

Notifications You must be signed in to change notification settings

leoduprates/dataprovider-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Javascript NodeJS Express.js Mocha Mocha LinkedIn

Dataprovider Service

Dataprovider Service is built on Javascript and based on faker.js to provide dummy data in JSON and CSV format for test automation through the REST API.

Server was developed with Express.js and Consign.

Unit Tests uses mochajs and chaijs.

Built With

Design Patterns

This project uses the design patterns from Airbnb JavaScript Style Guide.

REST Endpoints

Title : Get data in JSON format.
URL : /dataprovider?format=json&property=name.firstName,name.lastName&quantity=1
Method : GET
Response Codes: Success (200 OK)
Response:

[
  {
    "firstName": "Yago",
    "lastName": "Barros"
  }
]

Title : Get data in CSV format.
URL : /dataprovider?format=csv&property=name.firstName,name.lastName&quantity=1
Method : GET
Response Codes: Success (200 OK)
Response:

"firstName","lastName"
"Bruna","Macedo"

Getting Started

  1. Install Node

  2. Install Dependencies

    $ npm install
  3. Start Service

    $ npm start
  4. Run Unit Tests

    $ npm test
  5. Run Test Coverage

    $ npm run coverage
  6. Run Lint

    $ npm run lint

Methods (Dummy Data)

Check the methods available in faker.js

Links

About

Dataprovider Service is built on Javascript and based on faker.js to provide dummy data in JSON and CSV format for test automation through the REST API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published